Jump to content

send param to autoit script


Recommended Posts

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!

Link to comment
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]
Link to comment
Share on other sites

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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...