Joboy2k Posted April 10, 2016 Share Posted April 10, 2016 Hello there, I've been making a program for work that relys on hamachi running at all times (which unfortunately has become unreliable and disconnects itself) I have been able to restart hamachi with a simple ControlSend("LogMeIn Hamachi","",1000,"{SPACE}"). What i'm having trouble with is being able to know when hamachi should be interacted with to turn it back online. Using the window info tool i was able to get the details in the >>>>toolsbar<<<<< section that said "Hamachi - - Offline" I can't find anywhere a command that will read this information, i have tried wingettext and controlgettext. I have attached the photo from the info window. if someone could point me in the right direction that would be amazing thank you. Thanks in advance. Link to comment Share on other sites More sharing options...
MichaelHB Posted April 10, 2016 Share Posted April 10, 2016 You really should use the forum search, this would save you time. From @Melba23: #include <Array.au3> #Include <GuiToolBar.au3> Get_SysTray_IconText() Func Get_SysTray_IconText() ; Find systray handle Local $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "System tray not found") Exit EndIf ; Get systray item count Local $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) If $iSysTray_ButCount = 0 Then MsgBox(16, "Error", "No items found in system tray") Exit EndIf Local $aSysTray_ButtonText[$iSysTray_ButCount] ; Look for wanted tooltip For $iSysTray_ButtonNumber = 0 To $iSysTray_ButCount - 1 $aSysTray_ButtonText[$iSysTray_ButtonNumber] = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSysTray_ButtonNumber) Next _ArrayDisplay($aSysTray_ButtonText, "SysTray Icon Text", Default, 8) EndFunc Exit Link to comment Share on other sites More sharing options...
Joboy2k Posted April 12, 2016 Author Share Posted April 12, 2016 thats worked perfectly thank you, i had looked around the forum but didn't realise that the GUI functions work on anything rather than just on autoit made GUI's. Thank you so much Link to comment Share on other sites More sharing options...
AutoBert Posted April 12, 2016 Share Posted April 12, 2016 26 minutes ago, joboy2k said: but didn't realise that the GUI functions work on anything rather than just on autoit made GUI's They work not on anything but on (nearly?) everything what Au3Info found. I never had a Control found by Au3Info that was resistent against automation with a AutoIt-func which uses handles. 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