Jump to content

Pass variable to another script ?


Recommended Posts

I have done only simples scripts with AutoIt.

I was wondering if I can pass a variable to another AutoIt script that I run using the Run function.

Is there another way to calling another AutoIt script from a running script?

Thank you

Link to comment
Share on other sites

Look up Command Line Parameters in your help file. eg:

msgbox(1,"",$CmdLine[1])oÝ÷ Ø*&¦)^¶­jË^²×±zØ^)íëçè׫r·µæ§¢Ø^®Ç+ZºÚ"µÍ[ ][ÝÝÝ^H^TÜÙYXXI][ÝÊ

Run that, and you should see the message box with the "MyPassedVariable" you passed in.

Other things you can try are using temp files or SendMessage. I don't have it anymore, but I used to have a script that would display text on the screen that it got from another script, and the other script used SendMessage to pass the strings. That way the first script could be running all the time, get messages containing the string and display them, without having to restart everytime to get the new command line arguments, or fish them out of a file.

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

  • Recently Browsing   0 members

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