autoitquestion Posted April 28, 2011 Share Posted April 28, 2011 Hi, How can I send param to 2nd autoit script (from 1st autoit script) and how the 2nd autoit script scan this param? Can you pls give me simple example? Thanks a lot ahead! Noa :-) Link to comment Share on other sites More sharing options...
JScript Posted April 28, 2011 Share Posted April 28, 2011 Hi,How can I send param to 2nd autoit script (from 1st autoit script) and how the 2nd autoit script scan this param?Can you pls give me simple example?Thanks a lot ahead!Noa :-)Interprocess communication: http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
autoitquestion Posted April 28, 2011 Author Share Posted April 28, 2011 thanks-will read it.. Link to comment Share on other sites More sharing options...
hannes08 Posted April 28, 2011 Share Posted April 28, 2011 HI autoitquestion, you can call any other program with ShellExecute() e.g. ShellExecute("Script2.exe","param1 param2") In the second script (in all autoit scripts) there is a constant called CmdLine. CmdLine[0] holds the amount of parameters, CmdLine[1] to CmdLine[n] the parameters itself. As far as I know you can setup up to 64 parameters. But please feel free to look it up in the helpfile under "Running Scripts" => "Command Line Parameters". Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
nevodj Posted April 28, 2011 Share Posted April 28, 2011 Hi can you give us an example of a script to receive a command line param? into a msgbox for example? cheers Link to comment Share on other sites More sharing options...
hannes08 Posted April 28, 2011 Share Posted April 28, 2011 (edited) If $CmdLine[0] > 1 Then MsgBox(0, "First Parameter:", $CmdLine[1]) EndIf Either compile and call like: script.exe parameter Or use SciTe and add up to 4 parameters for testing over the menues View => Parameters Edited April 28, 2011 by Hannes123 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now