Jump to content

Noob: need help on return value


 Share

Recommended Posts

Please explain to me, can autoit return values from another application and the application receive the output from autoit.

Example:

APP1 run autoitscript using:

run("runme.exe param1 param2")

autoit(runme.exe):

dim $c
Select 
    case $cmdline[0]=1
                $c=$cmdline[1]+$cmdline[2]
    case $cmdline[0]=2
                $c = $cmdline[1]*$cmdline[2]
    case $cmdline[0]=0
        MsgBox(0,"Info","Please insert the paramater")
EndSelect

How may APP1 or other application reads/receives the $c value??

Helpme please :shocked:

Link to comment
Share on other sites

Link to comment
Share on other sites

I have no idea on this as I have know experience with it, but I think what you're looking for is StdinWrite ()

Regards,

Sorry for my dumb scripting as my posted code will always read 2 parameters

Another example using the posted code:

If i run from command prompt

C:\runme.exe 3 2

6 <----Output in DOS command window

I want the output just like that, so any application can read the output of the $c

Link to comment
Share on other sites

Sorry for my dumb scripting as my posted code will always read 2 parameters

Another example using the posted code:

If i run from command prompt

C:\runme.exe 3 2

6 <----Output in DOS command window

I want the output just like that, so any application can read the output of the $c

Look at help for StdoutRead, and search this forum for other examples.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...