monte Posted February 25, 2006 Share Posted February 25, 2006 I'm at the end of my long work week...finally! My brain is pretty much fried and I can't think of anyway to do this, so here it is. Is there a way to set a hotkey (run within main gui) that winactivates my main gui or brings it to the front ( guitofront() )? Link to comment Share on other sites More sharing options...
Valuater Posted February 25, 2006 Share Posted February 25, 2006 (edited) WinSetOnTop("My GUI", "", 1) 8) Edited February 25, 2006 by Valuater Link to comment Share on other sites More sharing options...
nfwu Posted February 25, 2006 Share Posted February 25, 2006 (edited) Try this: Hotkeyset("!^s", "_showgui") Func _showgui() WinSetOnTop ( $main_gui, "", 1 ) endfunc Hotkeyset("!^h", "_hidegui") Func _hidegui() WinSetOnTop ( $main_gui, "", 0 ) endfunc Where $main_gui is the variable that represents your gui (the value returned by GUICreate() ) #) Edited February 25, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
monte Posted February 25, 2006 Author Share Posted February 25, 2006 thanks valuater, but I don't want to always have the window on top of all windows. I just want to be able to bring the window to the front when needed (without clicking on the taskbar or alt+tab ' ing ). I'd like to implement this from a hotkey if possible. Thanks for your help! Link to comment Share on other sites More sharing options...
ChrisL Posted February 25, 2006 Share Posted February 25, 2006 Would WinActivate() work for you? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
monte Posted February 25, 2006 Author Share Posted February 25, 2006 thanks nfwu! I didn't want to have the window always on top, so I changed your code to winsetstate. Thanks! Hotkeyset("#!s", "_showgui") Func _showgui() winsetstate ( $main_gui, "", @SW_SHOW ) endfunc Hotkeyset("#!h", "_hidegui") Func _hidegui() Winsetstate ( $main_gui, "", @SW_HIDE ) endfunc 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