Hi,
I need to create a Macro/exe which will get its value passed from another script. Could you please explain the steps for the scenario as given below:
The called Exe:mac_chk.exe
==============
//Value of "k" need to be passed from Parent exe...
Repeat>k
Add>k,1
WriteLn>%flle_nm%,RES,%k%
Until>k=1000
The calling exe:
================
Let> RP_WAIT=0
//Macro>%SCRIPT_DIR%\mac_chk.scp
RunProgram>%SCRIPT_DIR%\mac_chk.exe %k=1
//ExecuteFile>%SCRIPT_DIR%\mac_chk.exe
mdl>I m here...!
//other code....
.....
....
.....
Here I want to run the "mac_chk.exe" in the back-end so RP_WAIT=0 for it.
My main aim is to run "mac_chk.exe" that need to be invoked by the Parent exe without disturbing the flow of parent exe.
Pass parameters to a macro/exe and run in the backend
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
In "The called Exe:mac_chk.exe" you are OK as-is. Just so you don't redefine the variable "K" prior to the repeat> loop.
Macro Scheduler has built in command line parameter structure. The syntax is:
Filename.exe /variable_name=value
This format will pass a variable "variable_name" with a value of "value" to the Macro Scheduler executable "Filename.exe"
Tharefore:
In your calling exe the RunProgram> line should look like:
RunProgram>%SCRIPT_DIR%\mac_chk.exe /k=1
FYI
As a general rule I advise against using single characters as variable names.
Macro Scheduler has built in command line parameter structure. The syntax is:
Filename.exe /variable_name=value
This format will pass a variable "variable_name" with a value of "value" to the Macro Scheduler executable "Filename.exe"
Tharefore:
In your calling exe the RunProgram> line should look like:
RunProgram>%SCRIPT_DIR%\mac_chk.exe /k=1
FYI
As a general rule I advise against using single characters as variable names.
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am