stuartmcgarrity Posted December 10, 2005 Report Share Posted December 10, 2005 I'd like to test a custom windows application I have created by writing a macro to get it to load a succession of files and perform operations on them. I can't just open the file from windows because they are not associated with the application. For example, its like writing a macro to tell Excel to open a series of .txt files. The only way I thought you could do this was to capture individual macros for opening each file, put those macro name in a text and read them in one at a time. I was using the "process text file" example, reading in each line, assiging it to a varible, then using the run macro in variable commnand. I have 3 macros: open file 1, open file 2, open file 3, and I put them into a text file as: open file 1 open file 2 open file 3 I've verified that the trsings ar egetting into the variable. But all I get is text coming out into my other application. Any suggestion to do this? Perhaps I need to use a special syntax for the macro name in the text file? Or is there an easier was to do the required task? Thanks, Stuart Quote Link to comment Share on other sites More sharing options...
randallc Posted December 10, 2005 Report Share Posted December 10, 2005 i'd have to see your exact macro to help. Have you tried the "Launch program" command in a macro; you can specify the program and the file there... Best, Randall Quote Link to comment Share on other sites More sharing options...
stuartmcgarrity Posted December 11, 2005 Author Report Share Posted December 11, 2005 The application needs to be already running, so I don't think I can use the lanuch program command. Here is teh macro: <ACTIVATE2:MDF File Import> <REM2:Initialization> <TVAR2:10:01:D:\Archive_Documents\Customers\Auto Data Analysis\MDF_Reader\> <TVAR2:11:01:%T10%openfilemacros.txt> <REM2:Process the file> <DIS:<TFILE:D:\Archive_Documents\Customers\Auto Data Analysis\MDF_Reader\openfilemacros.txt> <BTFBEG:001:000001:000000:%T11%> <RUNMACVAR:1> <BTFEND> text file contains: open file 1 open file 2 open file 3 Thanks, Stuart Quote Link to comment Share on other sites More sharing options...
stuartmcgarrity Posted December 11, 2005 Author Report Share Posted December 11, 2005 I figured it out. Thanks. Quote Link to comment Share on other sites More sharing options...
Cory Posted December 12, 2005 Report Share Posted December 12, 2005 Don't forget you can use the Launch Program to load files too. As long as the association is there it usually works fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.