Jump to content

Processes communications


Recommended Posts

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...)

Link to comment
Share on other sites

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

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()
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...