Sign in to follow this  
Followers 0
antiufo

Processes communications

4 posts in this topic

Is there any way to make AutoIt3 processes communicate, eg. send messages, send variables or ask to call a function loaded in an other autoit3 process?

(This is because I use a script loaded when I switch the computer on, this script asks the users if start emule and the desktop tools, manages system optimizations, makes sure the internet connections are working, it starts an other script that registers hotkeys to make actions like start cmd.exe, open a registry key stored in the clipboards, type the date, launch programs I use often...)


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is there any way to make AutoIt3 processes communicate, eg. send messages, send variables or ask to call a function loaded in an other autoit3 process?

(This is because I use a script loaded when I switch the computer on, this script asks the users if start emule and the desktop tools, manages system optimizations, makes sure the internet connections are working, it starts an other script that registers hotkeys to make actions like start cmd.exe, open a registry key stored in the clipboards, type the date, launch programs I use often...)

see stdread, and consolewrite

Edited by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

see stdread, and consolewrite

it doesn't show the console window, does it?


Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

run script2. see if it works.

script 1 - sends message

sleep(2000)


For $x = 1 To 10
    sleep(2000)
    ConsoleWrite($x & 'this is script1 '&@LF& 'Hello i am talking to u')
    
Next

ConsoleWrite($x & 'this is script1 '&@lf &'good bye')
oÝ÷ ÚÇ+v­æ²g¬±¨jëh×6
#include <Constants.au3>


$script1 = @ScriptDir & '\script1.au3'

$nPID = Run(@HomeDrive & '\Program Files\AutoIt3\autoit3.exe '& '"'& $script1 &'"' ,@WorkingDir,@SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)

sleep(5000)


while ProcessExists($nPID)
    
    While 1
        
        $line = StdoutRead($nPID)
        If @error = -1 Then ExitLoop
        MsgBox(0, "STDOUT read:", $line)
        
        Sleep(10)
    Wend
    
    Sleep(100)
WEnd
Edited by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

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