Sign in to follow this  
Followers 0
autoitquestion

send param to autoit script

6 posts in this topic

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 :-)

Share this post


Link to post
Share on other sites



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

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites

thanks-will read it..

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

Hi

can you give us an example of a script to receive a command line param? into a msgbox for example?

cheers

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Hannes123

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0