Taps Posted November 9, 2021 Share Posted November 9, 2021 (edited) Hello, I need doubleclick icon in system tray. I used this script, but now work. I have win 10. I'm beginner on scripting autoit. Can I help me, please? Thank you very much. _SysTrayIconTitles () is empty #include<SysTray_UDF.au3> #include<Array.au3> Global $title = "ShareX" clickSysTray($title, "right") Func clickSysTray($winTitle, $click = "left", $times = 1) Local $a = _SysTrayIconTitles () Local $p = MouseGetPos() For $i = 1 To UBound($a) - 1 If $a[$i] = $title Then $pos = _SysTrayIconPos ($i) MouseClick($click, $pos[0], $pos[1], $times, 1) sleep(1000) MouseClick($click, $pos[0], $pos[1], $times, 1) ExitLoop EndIf Next MouseMove($p[0], $p[1], 1) EndFunc ; Edited November 9, 2021 by Taps Link to comment Share on other sites More sharing options...
Danyfirex Posted November 9, 2021 Share Posted November 9, 2021 what behavior you see on double click? Open the Application? If It is. you could execute it. ShellExecute("C:\Users\" & @UserName & "\Desktop\ShareX.lnk") Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Danp2 Posted November 9, 2021 Share Posted November 9, 2021 Another option that should be more reliable is to simply restore the hidden window -- WinSetState("ShareX", "", @SW_RESTORE) Danyfirex 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Taps Posted November 10, 2021 Author Share Posted November 10, 2021 ShareX was just an example. When I click on my application's icons on the desktop, the application immediately appears in the system tray. If I click on the icon on the desktop repeatedly, I will see information that the application is already running Link to comment Share on other sites More sharing options...
Danp2 Posted November 10, 2021 Share Posted November 10, 2021 18 hours ago, Taps said: clickSysTray($title, "right") That should perform a right click. Does it? If you want to perform a double click, you should change that line to clickSysTray($title, "left", 2) If that doesn't solve your problem, then you'll come back with more details than "doesn't work". 😉 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Taps Posted November 14, 2021 Author Share Posted November 14, 2021 (edited) OK.Thank you Edited November 14, 2021 by Taps 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