Jump to content

Search the Community

Showing results for tags 'guitoolbar'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello. I hope everyone is having a great day today and looking forward to a great weekend. I am new to manipulating GUI in AutoIt, especially built in Windows stuff. I am having problems sending any command after the execution of _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") This command lets me "RightClick" on an icon, but after that no other command responds. Ideally, I would like to send("{DOWN}{ENTER}") or send {"e"}, but none of these commands are sent. Even MouseMove(1000,500) doesn't move the cursor. Below is the code. #include <GuiToolbar.au3> disable_Dragon() MouseMove(1000,500,10) send("e") MsgBox(0,"heh","done") Exit func disable_Dragon() Global $hSysTray_Handle, $iSystray_ButtonNumber Global $sToolTipTitle = "dragon" ; <<<<<<<<<<<<<<<< Enter some tooltip text for the icon you want here $iSystray_ButtonNumber = Get_Systray_Index($sToolTipTitle) If $iSystray_ButtonNumber = 0 Then MsgBox(16, "Error", "Icon not found in system tray") ;~ Exit Else MouseClick("left",1710,1070) Sleep(100) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") MouseMove(1000,500) Send ("E") EndIf EndFunc Func Get_Systray_Index($sToolTipTitle) ; Find systray handle ;$hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:Button;Instance:2]') ;$hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:3]') $hSysTray_Handle = ControlGetHandle('[Class:NotifyIconOverflowWindow]', '', '[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 For $i = 0 To $iSysTray_ButCount - 1 $cID = _GUICtrlToolbar_IndexToCommand($hSysTray_Handle, $i) ;MsgBox(0,"heh",(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $cID))) Next ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) = 1 Then ExitLoop Next If $iSystray_ButtonNumber = $iSystray_ButCount Then Return 0 ; Not found Else Return $iSystray_ButtonNumber ; Found EndIf EndFunc What it's supposed to do is, find an icon called "Dragon". It is always in the Windows 10 overflow system tray, so I access NotifyIconOverFlowWindow class in ControlGetHandle. I move mouse to click the open hidden tray icon which is at 1710,1070 << unfortunately its not always at this coordinates, so if lucky it will do a mouseclick at the right arrow. Then I will do a _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") to do a right click on the Dragon system tray icon. What appears on screen now is an Exit button. But I can't seem to use it. I can't MouseMove to the exit button (relative coordinates are -10,10 to where current cursor appears on screen). I can't send a keyboard "E" using Send("e"). Even if I Sleep(10000) before that, it still won't respond to any command to move mouse or send keyboard key. So in summary, there are 2 issues 1) I can't get AutoIt to send mouse move command or send key command after performing a _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") 2) I don't know how to press the Arrow key to open the hidden system notification tray. In the Finder Tool it says Class "Shell_TrayWnd" window info, Class "Button" Instance "2" in Basic Control Info. But I don't know how to perform a click on it other than hardcoding its coordinates. Please help. Thanks! masCh
×
×
  • Create New...