.NET & Compiled Exes
Moderators: JRL, Dorian (MJT support)
.NET & Compiled Exes
Anyone has experience calling compiled exes and passing variables to it from C#.NET? I'm trying to automate a tool but need to pass variable to the compiled script from my .NET desktop app. Any help/hint is greatly appreciated. Thanks!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: .NET & Compiled Exes
To pass variables just use exename.exe /variablename=value etc. Shell the exe the same way you would any other. E.g.: http://stackoverflow.com/questions/1567 ... to-be-done
Sent from my iPad using Tapatalk
Sent from my iPad using Tapatalk
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: .NET & Compiled Exes
Hi Marcus,
Thanks for your reply, another question though, when you create a variable on your script does it automatically become a parameter when you compile the script into exe? Or is there anything else needed before you can use it as a parameter. Thanks!
Thanks for your reply, another question though, when you create a variable on your script does it automatically become a parameter when you compile the script into exe? Or is there anything else needed before you can use it as a parameter. Thanks!
Re: .NET & Compiled Exes
1) Create a script named display_text.scp and put in one line.
2) Compile display_text.scp
3) Run display_text.exe with /strText= as the parameter and whatever text you add will be displayed.
display_text /strText="Hello World"
You should see a Macro Scheduler message that contains Hello World.
Basically the parameter is automatically a variable in the script.
Code: Select all
MDL>strText
3) Run display_text.exe with /strText= as the parameter and whatever text you add will be displayed.
display_text /strText="Hello World"
You should see a Macro Scheduler message that contains Hello World.
Basically the parameter is automatically a variable in the script.