Yashied Posted March 16, 2009 Share Posted March 16, 2009 (edited) LAST VERSION - 1.106-Apr-09Deprecated.This library based on MessageHandler UDF.Available functions_MsgReceiverList_MsgRegister_MsgRelease_MsgSend_MsgTimerInterval_MsgWindowHandle_IsReceiverMessages UDF Library v1.1Previous downloads: 446Messages.au3Exampleexpandcollapse popup#Include <EditConstants.au3> #Include <GUIConstantsEx.au3> #Include <GUIEdit.au3> #Include <GUISlider.au3> #Include <StaticConstants.au3> #Include <WindowsConstants.au3> #Include <Messages.au3> #NoTrayIcon If Not @Compiled Then MsgBox(64, 'Messages UDF Library Demonstration', 'To run this script, you must first compile it and then run the (.exe) file.') Exit EndIf Opt('MustDeclareVars', 1) If $CmdLine[0] = 0 Then ShellExecute(@ScriptFullPath, '1') ShellExecute(@ScriptFullPath, '2') ShellExecute(@ScriptFullPath, '3') Exit EndIf Global $Form, $Input1, $Input2, $Radio1, $Radio2, $Radio3, $ButtonSend, $Edit, $Slider, $Check Switch $CmdLine[1] Case '1', '2', '3' _Main(Int($CmdLine[1])) Case Else EndSwitch Func _Main($Index) Local $GUIMsg, $nScript, $Data, $Timer = _MsgTimerInterval(0) $Form = GUICreate('Script' & $Index, 324, 384, (@DesktopWidth - 1018) / 2 + ($Index - 1) * 344, (@DesktopHeight - 440) / 2, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_TOPMOST) GUISetFont(8.5, 400, 0, 'Tahoma', $Form) GUICtrlCreateLabel('Message:', 14, 22, 48, 14) $Input1 = GUICtrlCreateInput('', 64, 19, 246, 20) GUICtrlCreateLabel('Send to:', 14, 56, 48, 14) GUIStartGroup() $Radio1 = GUICtrlCreateRadio('Script1', 64, 56, 56, 14) GUICtrlSetState(-1, $GUI_CHECKED) $Radio2 = GUICtrlCreateRadio('Script2', 130, 56, 56, 14) $Radio3 = GUICtrlCreateRadio('Script3', 196, 56, 56, 14) $ButtonSend = GUICtrlCreateButton('Send', 236, 88, 75, 23) GUICtrlSetState(-1, $GUI_DEFBUTTON) GUICtrlCreateLabel('', 14, 128, 299, 2, $SS_ETCHEDHORZ) GUICtrlCreateLabel('Received message:', 14, 142, 98, 14) $Edit = GUICtrlCreateEdit('', 14, 160, 296, 129, BitOR($ES_READONLY, $WS_VSCROLL, $WS_HSCROLL)) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateLabel('Timer interval (ms):', 14, 316, 98, 14) $Slider = GUICtrlCreateSlider(110, 312, 162, 26, BitOR($TBS_AUTOTICKS, $WS_TABSTOP)) GUICtrlSetLimit(-1, 20, 1) GUICtrlSetData(-1, $Timer / 50) _GUICtrlSlider_SetTicFreq(-1, 1) $Input2 = GUICtrlCreateInput($Timer, 274, 313, 36, 20, $ES_READONLY) GUICtrlSetBkColor(-1, 0xFFFFFF) $Check = GUICtrlCreateCheckbox('Enable receiver', 14, 354, 96, 19) GUICtrlSetState(-1, $GUI_CHECKED) Opt('GUICloseOnESC', 0) GUISetState() _MsgRegister('Script' & $Index, '_Receiver') While 1 $GUIMsg = GUIGetMsg() Select Case $GUIMsg = $GUI_EVENT_CLOSE Exit Case $GUIMsg = $ButtonSend For $i = $Radio1 To $Radio3 If GUICtrlRead($i) = $GUI_CHECKED Then $nScript = 1 + $i - $Radio1 ExitLoop EndIf Next $Data = GUICtrlRead($Input1) If StringStripWS($Data, 3) = '' Then $Data = '(empty)' EndIf If _IsReceiver('Script' & $nScript) Then _MsgSend('Script' & $nScript, 'From Script' & $Index & ': ' & $Data) EndIf Case $GUIMsg = $Slider _MsgTimerInterval($Timer) Case $GUIMsg = $Check If GUICtrlRead($Check) = $GUI_CHECKED Then _MsgRegister('Script' & $Index, '_Receiver') GUICtrlSetState($Edit, $GUI_ENABLE) GUICtrlSetBkColor($Edit, 0xFFFFFF) GUICtrlSetState($Slider, $GUI_ENABLE) GUICtrlSetState($Input2, $GUI_ENABLE) Else _MsgRegister('Script' & $Index, '') GUICtrlSetState($Edit, $GUI_DISABLE) GUICtrlSetBkColor($Edit, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetState($Slider, $GUI_DISABLE) GUICtrlSetState($Input2, $GUI_DISABLE) EndIf EndSelect $Data = GUICtrlRead($Slider) * 50 If BitXOR($Data, $Timer) Then GUICtrlSetData($Input2, $Timer) $Timer = $Data EndIf WEnd EndFunc ;==>_Main Func _Receiver($sMessage) _GUICtrlEdit_AppendText($Edit, $sMessage & @CRLF) Return 0 EndFunc ;==>_Receiver Edited December 25, 2013 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
dmob Posted March 16, 2009 Share Posted March 16, 2009 (edited) Powerful stuff, well done! I am certainly going to use this in my ICafe application to take some of the the load off the main script. Thanks for sharing. Edited March 16, 2009 by dmob Link to comment Share on other sites More sharing options...
Yashied Posted March 16, 2009 Author Share Posted March 16, 2009 Powerful stuff, well done! I am certainly going to use this in myICafe application to take some of the the load off the main script.Thanks for sharing.Thanks. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted April 6, 2009 Author Share Posted April 6, 2009 This library has been updated. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2009 Share Posted April 11, 2009 Concept looks great!! However, This makes no sense to me... func _MsgWindowHandle($controlID) if not IsInt($controlID) then return 0 endif for $i = 1 to $msgId[0][0] if $msgId[$i][0] = $MsgID then return $msgId[$i][3] endif next return 0 endfunc; _MsgWindowHandle According to that function, the $ControlID is not utilized except that it is tested as an Int() Also, you really should use "tidy" from Scite Tools Thanks for sharing!! 8) Link to comment Share on other sites More sharing options...
Yashied Posted April 11, 2009 Author Share Posted April 11, 2009 (edited) Concept looks great!!Thanks. According to that function, the $ControlID is not utilized except that it is tested as an Int()You're right in that there was no need. Also here there is an error ($MsgID, instead of $controlID). func _MsgWindowHandle($controlID) for $i = 1 to $msgId[0][0] if $msgId[$i][0] = $controlID then return $msgId[$i][3] endif next return 0 endfunc; _MsgWindowHandle Also, you really should use "tidy" from Scite Tools??? Edited April 11, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2009 Share Posted April 11, 2009 (edited) If you don't have SciTe editor get it here...SciTe EditorIn SciTe Press> Tools > Tidy Autoit SourceThis will clean, capitalize, tab and line-up the source code8) Edited April 11, 2009 by Valuater Link to comment Share on other sites More sharing options...
Yashied Posted April 11, 2009 Author Share Posted April 11, 2009 If you don't have SciTe editor get it here...SciTe EditorIn SciTe Press> Tools > Tidy Autoit SourceThis will clean, capitalize, tab and line-up the source code8)Thanks. I use SciTE editor. If you mean like "func" instead of "Func", etc, then is comfortable for me. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2009 Share Posted April 11, 2009 (edited) Thanks. I use SciTE editor. If you mean like "func" instead of "Func", etc, then is comfortable for me. Yes, that and much more is built-in to Tidy8) Edited April 11, 2009 by Valuater Link to comment Share on other sites More sharing options...
CrewXp Posted February 1, 2010 Share Posted February 1, 2010 Awesome tool. Have to switch to something else though. Seems I can't send data as fast as I want. If it tries to send too fast, the queue system you put in place takes effect (awesome idea! but bad for fast script2script communication). Looking for alternatives. Link to comment Share on other sites More sharing options...
Sven Posted May 20, 2010 Share Posted May 20, 2010 Useful library, if timing isn't of the essence. Is there anything else that sends and receives messages more quickly? Link to comment Share on other sites More sharing options...
Yashied Posted May 20, 2010 Author Share Posted May 20, 2010 Is there anything else that sends and receives messages more quickly?#681941 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Sven Posted May 20, 2010 Share Posted May 20, 2010 #681941Thanks a lot. With this, passing a message to script B and returning it to script A depends on how long each script pauses. Such a round trip can take as little as 0.5ms on my CPU, but then eats up all cycles of the CPU core it's running on.Utilizing the messages.au3 library from this here thread, a round trip usually takes 140ms, but the script can pretty much do what it wants.I also checked out Kip's TCP client/server "inter-script communication" approach, and it seems to be the best of both worlds. A round trip usually takes 31.5ms, but passing around messages between scripts may be done even if they're busy. Link to comment Share on other sites More sharing options...
guinness Posted September 10, 2010 Share Posted September 10, 2010 (edited) Shouldn't "dword;dword;ptr" be changed to "ulong_ptr;dword;ptr" as you suggested? Plus forgot to mention thanks for providing this example. Edited September 10, 2010 by guinness UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Yashied Posted September 10, 2010 Author Share Posted September 10, 2010 (edited) This UDF is deprecated. You can do with it whatever you want. Edited September 10, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
gcue Posted April 6, 2011 Share Posted April 6, 2011 I am trying to get the GUI to start the receiver function automatically. but it seems if i do that the _MsgSend doesn't work anymore. The only way I can get it working is if I manually startup the Receiver first then the GUI.Any Ideas on how I should do this differently to accomplish both?Thanks in Advance,GUI Script (not a GUI yet)#include <Messages.au3> Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) $exititem = TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetState(1) RunWait(@ScriptDir & "\IsProcessing.exe " & @AutoItPID) _MsgRegister('IsProcessing', '_MyReceiver2') _MsgSend('GUI', "msg from GUI") While 1 Sleep(10) WEnd Func _MyReceiver2($sMessage) MsgBox(0, 'IsProcessing', $sMessage, 1) EndFunc ;==>_MyReceiver2 Func _Exit() Exit EndFunc ;==>_ExitIsProcessing (Receiver Function)expandcollapse popup#include <Messages.au3> Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) $exititem = TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetState(1) Global $gui_pid _MsgRegister('GUI', '_MyReceiver1') If $CmdLine[0] > 0 Then For $i = 1 To $CmdLine[0] Select Case $CmdLine[$i] <> "" $gui_pid = $CmdLine[$i] EndSelect Next EndIf While 1 Sleep(10) If Not ProcessExists($gui_pid) Then _Exit() EndIf WEnd Func _MyReceiver1($sMessage) MsgBox(0, '', $sMessage, 1) _MsgSend('IsProcessing', "msg from Receiver") EndFunc ;==>_MyReceiver1 Func _Exit() Exit EndFunc ;==>_Exit Link to comment Share on other sites More sharing options...
Yashied Posted April 6, 2011 Author Share Posted April 6, 2011 What about RunWait()? #include <Messages.au3> Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) $exititem = TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetState(1) Run(@ScriptDir & "\IsProcessing.exe " & @AutoItPID) Do Sleep(100) Until _IsReceiver('GUI') _MsgRegister('IsProcessing', '_MyReceiver2') _MsgSend('GUI', "msg from GUI") While 1 Sleep(10) WEnd Func _MyReceiver2($sMessage) MsgBox(0, 'IsProcessing', $sMessage, 1) EndFunc ;==>_MyReceiver2 Func _Exit() Exit EndFunc ;==>_Exit My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
gcue Posted April 6, 2011 Share Posted April 6, 2011 runwait didnt work but your suggestion did work! Run(@ScriptDir & "\IsProcessing.exe " & @AutoItPID) Do Sleep(100) Until _IsReceiver('GUI') many thanks for the awesome UDF and for your help! Link to comment Share on other sites More sharing options...
gcue Posted April 6, 2011 Share Posted April 6, 2011 anyway to send an array between scripts? Link to comment Share on other sites More sharing options...
Yashied Posted April 6, 2011 Author Share Posted April 6, 2011 This UDF is deprecated. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now