Or from the RR source:
Once the script is running, you can send commands to it from RR via "SENDMSG;Receiver;<cmd>"
Global Const $StructDef_COPYDATA = "ptr;dword;ptr"
Global Const $WM_COPYDATA = 0x4A
Global Const $WM_CLOSE = 0x10
Global Const $STRUCTDEF_AU3MESSAGE = "char"
; Create Reciver window
$hwmd_Reciver = GUICreate("Receiver")
; Register Windows Messages
;Loop indefinitely - put your commands in here
If $cmd = "this" Then
$cmd = ""
If $cmd = "that" Then
$cmd = ""
; Message Handler
Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam)
If $MsgID = $WM_COPYDATA Then
; We Recived a WM_COPYDATA Message
; $LParam = Poiter to a COPYDATA Struct
$vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam)
; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct
$vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3))
$SciTECmdLen = DllStructGetData($vs_cds, 2)
$cmd = StringLeft(DllStructGetData($vs_msg, 1), $SciTECmdLen)
; Display what we have recived
MsgBox(0, "Test String", $cmd)
ElseIf $MsgID = $WM_CLOSE Then
; We Recived a WM_CLOSE Message
In this example, <cmd> can be "this" or "that."
*Note the the "Receiver" name has to match
Sonic's way is good too. I prefer the method above as it's more process friendly for my M10K since it just sleeps until a message is recieved.