Who Posted July 16, 2007 Share Posted July 16, 2007 I'm new to AutoIT and I'm confusing about a question : If I'm having some programs are minimized in tray icon ( e.g : Yahoo! Messenger ), are there anyway for me to maximize them ? Thanks Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 16, 2007 Share Posted July 16, 2007 Hi, #include<Systray.au3> Global $title = "XXX" ;Global $prcoess = "icqlite.exe" Global $prcoess = "winampa.exe" ;clickSysTrayByTitle($title, "right") clickSysTrayByProcess($prcoess, "right") Func clickSysTrayByTitle($winTitle, $click = "left", $times = 1) Local $a = _SysTrayIconTitles () Local $p = MouseGetPos() For $i = 0 To UBound($a) - 1 If $a[$i] = $winTitle Then $pos = _SysTrayIconPos ($i) MouseClick($click, $pos[0], $pos[1], $times, 1) ExitLoop EndIf Next MouseMove($p[0], $p[1], 1) EndFunc ;==>clickSysTrayByTitle Func clickSysTrayByProcess($winProcess, $click = "left", $times = 1) If Not ProcessExists($winProcess) Then Return -1 Local $a = _SysTrayIconProcesses () Local $p = MouseGetPos() For $i = 0 To UBound($a) - 1 If $a[$i] = $winProcess Then $pos = _SysTrayIconPos ($i) MouseClick($click, $pos[0], $pos[1], $times, 1) ExitLoop EndIf Next MouseMove($p[0], $p[1], 1) EndFunc ;==>clickSysTrayByProcess So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Who Posted July 16, 2007 Author Share Posted July 16, 2007 (edited) Thanks but when I tried your code, it returned this : >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\d.au3" Info: 198424RECT[0](left): 836RECT[1](top): 746RECT[2](right): 854RECT[3](bottom): 764 >Exit code: 0 Time: 0.209 I tested with the Yahoo! Messenger. When opened first time, both tray icon and YM were shown and it showed the menu of the traying program. But after I closed the YM and remained the tray icon, it wouldn't work at all. Can you take a look at it please ? Edited July 16, 2007 by Who Link to comment Share on other sites More sharing options...
Who Posted July 16, 2007 Author Share Posted July 16, 2007 Yay, I have figured it out and it works very well .But the only problem is if there are more than 1 process then the script will show only 1 . Can you make this more please ? Thanks. 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