ashley Posted January 26, 2008 Share Posted January 26, 2008 ok well ita a very small gui that appears on your task bar, but when u right click on the task bar it dissapers any ideas here my code: CODE;Include constants #include <GUIConstants.au3> #NoTrayIcon $GUI = GUICreate("", 100, 25, @DesktopWidth- 300, @DesktopHeight -27, BitOR($WS_POPUP,$WS_CLIPSIBLINGS), 0x00000088) ;Set color (black) GUISetBkColor(0x000000) ;set the text - No more than 10 chars $Label1 = GUICtrlCreateLabel("Test", 25, 5, 60, 17) ;pick the color GUICtrlSetColor(-1, 0xFFFFFF) ;choose an icon $Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY,$WS_GROUP)) ;Show window/Make the window visible GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd If you can fix it that would help. Free icons for your programs Link to comment Share on other sites More sharing options...
Swift Posted January 26, 2008 Share Posted January 26, 2008 haha @Ashley...i dont know why it does that... weird...but its kinda cool actually O.O Link to comment Share on other sites More sharing options...
ashley Posted January 26, 2008 Author Share Posted January 26, 2008 thanks, if you have norton anti-virus then you will know that it don't happen with that but does with mine. any ways of making it check if it being shown and if its not make it show again. Free icons for your programs Link to comment Share on other sites More sharing options...
Swift Posted January 26, 2008 Share Posted January 26, 2008 (edited) Hmm...maybe you need to keep the GUI active after you've clicked. Something deletes the GUI...because...i checked my process list..and i had 7 autoit3.exe's Edited January 26, 2008 by Swift Link to comment Share on other sites More sharing options...
ashley Posted January 26, 2008 Author Share Posted January 26, 2008 any ideas how? Free icons for your programs Link to comment Share on other sites More sharing options...
Danp2 Posted January 27, 2008 Share Posted January 27, 2008 FWIW, the graphic is still there. It's just hidden behind the taskbar. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ashley Posted January 27, 2008 Author Share Posted January 27, 2008 so how i bring it back, to front with it not letting me do anything else. Free icons for your programs Link to comment Share on other sites More sharing options...
Swift Posted January 27, 2008 Share Posted January 27, 2008 hehe wierd Link to comment Share on other sites More sharing options...
ashley Posted January 27, 2008 Author Share Posted January 27, 2008 lol, i have no idea, well im goin to bed nah its 00:20 in england so night everybody. Free icons for your programs Link to comment Share on other sites More sharing options...
Squirrely1 Posted January 27, 2008 Share Posted January 27, 2008 (edited) ashley - I found out what is wrong when I set the task bar to auto-hide - your gui is being covered up by the task-bar. I found out using this modification of your code: ;Include constants HotKeySet("{ESC}", "EXIT_MYScript") #include <GUIConstants.au3> #NoTrayIcon $GUI = GUICreate("", 100, 25, @DesktopWidth - 300, @DesktopHeight - 27, $WS_POPUP);BitOR($WS_POPUP, $WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) ;Set color (black) GUISetBkColor(0x000000) ;set the text - No more than 10 chars $Label1 = GUICtrlCreateLabel("Test", 25, 5, 60, 17) ;pick the color GUICtrlSetColor(-1, 0xFFFFFF) ;choose an icon $Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY, $WS_GROUP)) ;Show window/Make the window visible GUISetState(@SW_SHOW) WinSetOnTop($GUI, "", 1) While 1 $nMsg = GUIGetMsg() ;GUISetState(@SW_SHOW) Sleep(80) ;Switch $nMsg ; Case $GUI_EVENT_CLOSE ; Exit ;EndSwitch WEnd Func EXIT_MYScript() Exit EndFunc The GUI doesn't disappear, it gets covered up by the task-bar which, I guess, won't let any other windows cover it up, if it isn't set to auto-hide. Edited January 27, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
ashley Posted January 27, 2008 Author Share Posted January 27, 2008 ok, but this dont fix it.... Free icons for your programs Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 27, 2008 Share Posted January 27, 2008 Use WinGetState() to check if it's visible and then WinSetOnTop() or _WinAPI_SetWindowPos to set it on top of your taskbar again .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Swift Posted January 27, 2008 Share Posted January 27, 2008 wow...actually a great idea! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 27, 2008 Share Posted January 27, 2008 (edited) I had some free time so I did this ;Include constants #include <GUIConstants.au3> #NoTrayIcon $GUI = GUICreate("Gui1", 100, 25, @DesktopWidth- 300, @DesktopHeight -27, BitOR($WS_POPUP,$WS_CLIPSIBLINGS), 0x00000088) ;Set color (black) GUISetBkColor(0x000000) ;set the text - No more than 10 chars $Label1 = GUICtrlCreateLabel("Testâ„¢", 25, 5, 60, 17) ;pick the color GUICtrlSetColor(-1, 0xFFFFFF) ;choose an icon $Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY,$WS_GROUP)) ;Show window/Make the window visible GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch $state = WinGetState("Gui1") If BitAnd($state, 2) Then WinSetOnTop("Gui1", "", 1) WEnd Works good for me!! Edit: this was what you wanted ashley, right?? Edited January 27, 2008 by TzarAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
ashley Posted January 27, 2008 Author Share Posted January 27, 2008 Thanks. One problem, if taskbar is set on autohide, then its still visable. Free icons for your programs 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