hosphuman Posted September 13, 2007 Share Posted September 13, 2007 Hi everyone im new here and newbie in autoit!! i need to know how to do a double click in an item on icon tray to show up the window and i try to do it alone, read some topics in this forum but i can't find something to help me. i saw some thing about it using a new library called auto3lib but i can't make it work on my version of autoit. is there a easy way to do this script? i hope someone can help me!! thanks to all!!!!! Link to comment Share on other sites More sharing options...
Buey Posted September 13, 2007 Share Posted September 13, 2007 (edited) Not sure if this would work, but this is what I would do: Opt("TrayMenuMode",1) Opt("TrayOnEventMode",1) TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE,"MyFunc") Func MyFunc ;show or hide gui EndFunc Edited September 13, 2007 by Buey Link to comment Share on other sites More sharing options...
hosphuman Posted September 13, 2007 Author Share Posted September 13, 2007 Thanks for it!!!!!!! but it didn`t Work( maybe because im a newbie) for example i need to do a double click on skype icon and it is the fisrt icon on my system tray how i do it? Link to comment Share on other sites More sharing options...
AlmarM Posted September 13, 2007 Share Posted September 13, 2007 Double click?? $Click = "Left" MouseClick($Click, x, y, 2, 10) ;Mouseclick at: x, y, clicks 2 times and goes with a speed of 10 Is that what you mean ?? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 13, 2007 Developers Share Posted September 13, 2007 Find what the window title is and try to do a WinSetSTate("the-found-title","",@SW_RESTORE) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 13, 2007 Share Posted September 13, 2007 (edited) Thanks for it!!!!!!! but it didn`t Work( maybe because im a newbie) for example i need to do a double click on skype icon and it is the fisrt icon on my system tray how i do it? This is a really good question and I'm not sure how to accomplish the goal the way you described. So for the MVP's and gurus out there, what AutoIt function will provide and array with the process name of the icons running in Class:Shell_TrayWnd, controlID Class:ToolbarWindow32? My thinking is this currently unknown function could help us use ControlClick() with the correct icon. Meanwhile hosphuman, for your good question as a newbie here is some workaround code to do what you wanted. Opt("WinTitleMatchMode", 4) ;; <-- Top of your script If ProcessExists("skype.exe") Then MsgBox(0,"Skype Status","Skype is running") WinSetState("[Class:tSkMainForm.UnicodeClass]","",@SW_SHOW) Else MsgBox(0,"Skype Status","Skype is not running") EndIf Edit: JdeB, come on brother whats a really cool way of pulling the information I described? This should be pretty easy for you and da boyz. This could be handy for others wanting to double click the icon and get their Network Status, Network Connections, Volume Control windows.... IF those icons are in the systray . Edited September 13, 2007 by ssubirias3 Link to comment Share on other sites More sharing options...
Developers Jos Posted September 13, 2007 Developers Share Posted September 13, 2007 I think you need to use: WinSetSTate("windows-title","",@SW_SHOW) have a try ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 13, 2007 Share Posted September 13, 2007 (edited) I think you need to use: WinSetSTate("windows-title","",@SW_SHOW) have a try ... Need another cup of coffee?? Or were you in a rush and didn't eat your Wheaties? Re-read my code example and you'll that I've been there done that . But WinSetState doesn't do what I or the other person are talking about. Sending a click to the correct icon in the tray. I'll order you up some Starbuck, you want that with or without whip? Edit: To make sure I wasn't off my rocker I tried the following and it did not work. I have the little speaker icon in my tray and when I double left click the icon the window "Volume Control" appears. The class for that window is also "Volume Control". So, to the topic of this thread and to the points I've tried to make... the following code doesn't isn't a real answer to the question. WinsetState("[Class:Volume Control]","",@SW_SHOW) Edited September 13, 2007 by ssubirias3 Link to comment Share on other sites More sharing options...
BobK Posted September 13, 2007 Share Posted September 13, 2007 If you're having trouble installing the library because of the "wrong version" problem, this fix, posted Here, may take care of it.CODE$sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt"$sRegValue = "Version"$sRegType = "REG_SZ"$sCurrent = RegRead($sRegKey, $sRegValue)RegWrite($sRegKey, $sRegValue, $sRegType, "v3.2.4.9")MsgBox(0, "", "You are ready to install Auto3Lib." & @CRLF & @CRLF & _ 'Click "OK" when the installation is complete.')RegWrite($sRegKey, $sRegValue, $sRegType, $sCurrent)The double-click thing SOMETIMES can be handled with:$title="Example" $text="" winactivate($title,$text) WinWaitActive($title,$text,5) winsetstate($title,$text,@SW_Show)oÝ÷ Øç¢Ûaz··öÆ欶ޱÊâ¦Ø§¶¥ºÚ¯&Þ-«¢é]mæj^u«¢+Ø¥¹±Õ±ÐíÍ15¹Ô¹ÔÌÐì(¥¹±Õ±ÐíÍ1Q½½±È¹ÔÌÐì()=ÁÐ ÅÕ½Ðí5ÕÍѱÉYÉÌÅÕ½Ðì°Ä¤((ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ìÍÉ¥ÁÑ¥½¸¸¸¸èM¡½ÝÌ¡½ÜѼ±¥¬½¸Ñ¡Ù½±Õµ½¹Ñɽ°¥¸Ñ¡ÑͬÑÉä(ìÕÑ¡½È¸¸¸¸¸¸¸¸èAÕ° µÁ±°¡AÕ±%¤(ì9½Ñ̸¸¸¸¸¸¸¸¸è%å½ÔÉÕÍ¥¹¹½¸¹±¥Í =L°¡¹Ñ¡ÅÕ½ÐíY½±ÕµÅÕ½Ðì½¹ÍѹХ¸Ñ¡ÍÉ¥ÁнÈå½Õȱ¹Õ¸(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô((ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì±½°ÙÉ¥±Ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô()±½°ÀÌØí¡]¹°ÀÌØí¥$°ÀÌØí¥ ½µµ¹°ÀÌØíÍQáаÀÌØíÍY½±ÕµôÅÕ½ÐíY½±ÕµÅÕ½Ðì((ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì5¥¸(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô((ÀÌØí¡]¹ô ½¹Ñɽ±Ñ!¹± ÅÕ½Ðím 1MLéM¡±±}QÉå]¹tÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí9½Ñ¥¥Ñ¥½¸ÉÅÕ½Ðì¤)¥ÀÌØí¡]¹ôÀÑ¡¸}1¥}M¡½ÝÉÉ½È ÅÕ½ÐíU¹±Ñ¼ÐÑÉ䡹±ÅÕ½Ðì¤()½ÈÀÌØí¥$ôÀѼ}Q½½±É} ÕÑѽ¹ ½Õ¹Ð ÀÌØí¡]¹¤´Ä(ÀÌØí¥ ½µµ¹ô}Q½½±É}%¹áQ½ ½µµ¹ ÀÌØí¡]¹°ÀÌØí¥$¤(ÀÌØíÍQáÐô}Q½½±É}Ñ ÕÑѽ¹QáÐ ÀÌØí¡]¹°ÀÌØí¥ ½µµ¹¤(¥ÀÌØíÍQáÐôÀÌØíÍY½±ÕµÑ¡¸( ±½%¹ÁÕРĤ(¥ ½¹Ñɽ±Ñ!¹± ÅÕ½Ðím 1MLéM¡±±}QÉå]¹tÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí ÕÑѽ¸ÈÅÕ½Ð줱ÐìÐìÀÑ¡¸( ½¹Ñɽ± ±¥¬ ÅÕ½Ðím 1MLéM¡±±}QÉå]¹tÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí ÕÑѽ¸ÈÅÕ½Ðì¤(¹¥(}Q½½±É} ±¥ ÕÑѽ¸ ÀÌØí¡]¹°ÀÌØí¥ ½µµ¹°ÅÕ½ÐíÉ¥¡ÐÅÕ½Ðì¤(}5¹Õ} ±¥A½ÁÕÁ° ÅÕ½Ðí Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 13, 2007 Share Posted September 13, 2007 ... there's at least one script in the library (below) that could be adapted.Thanks BobK, I'll look at the auto3lib later to see if it will do what I was describing. If so and no one has given the general all-purpose code I'll try to come up with something and post it here later. Maybe over the weekend or next week. Link to comment Share on other sites More sharing options...
Buey Posted September 13, 2007 Share Posted September 13, 2007 Oh, you're clicking on a DIFFERENT tray icon >.> Link to comment Share on other sites More sharing options...
hosphuman Posted September 14, 2007 Author Share Posted September 14, 2007 thanks to all!!!! i will try it!!! it surely work!!!i will try to do what i want and if everything goes right i will post here!!!once again 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