Jump to content
Macro Express Forums

How Do I Get An Application To Open Files?


stuartmcgarrity
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...