Jump to content
Sign in to follow this  
Elkie

Noob: need help on return value

Recommended Posts

Elkie

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:

Share this post


Link to post
Share on other sites
BrettF
Elkie

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

Share this post


Link to post
Share on other sites
martin

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.

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  

×