cstangor Posted December 18, 2014 Share Posted December 18, 2014 OK, sorry, I'm sure this is all in the guides somewhere, but could someone please point me to a snippet that would Run in the background and then: When a key combination is pressed (say CTRL-y) locate a minimized window and maximize it. Thanks in advance, and sorry for being lame. CS Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 18, 2014 Moderators Share Posted December 18, 2014 (edited) cstangor, welcome to the forum. Please realize we are here to assist you with your scripts, but follow the "teach a man to fish" methodology. For your request: Look in the helpfile under HotKeySet for catching keys (or _IsPressed for a single key) Look in the helpfile under WinActivate for locating and maximizing your window. Try something out, if you run into trouble, post your code here and we'll do our best to help. Edited December 18, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
computergroove Posted December 18, 2014 Share Posted December 18, 2014 WinGetState -> https://www.autoitscript.com/autoit3/docs/functions/WinGetState.htm WinSetState -> https://www.autoitscript.com/autoit3/docs/functions/WinSetState.htm Use a while 1 loop and hotkeyset: HotKeySet("{F2}","MaximizeWindow") While 1 Sleep(100) WEnd Func MaximizeWindow() ;Your code here WEnd Hit F2 to search for a minimized window and change its state to something else Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 18, 2014 Moderators Share Posted December 18, 2014 follow the "teach a man to fish" methodology. Or we spoon feed it to you so you never learn anything... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
cstangor Posted December 18, 2014 Author Share Posted December 18, 2014 Thanks you guys! Super helpful. I'm on my way! I'm having another problem which is that when I run AutoIT Window Info it says that it is (Frozen) and no window information is appearing. Thanks Link to comment Share on other sites More sharing options...
Radiance Posted December 18, 2014 Share Posted December 18, 2014 Link to comment Share on other sites More sharing options...
computergroove Posted December 18, 2014 Share Posted December 18, 2014 Or we spoon feed it to you so you never learn anything... There is teaching to fish and then there's "make no visible progress so I give up". I didn't tell him everything. Now he only needs to make the functions work which is where the real meat of autoit is. I think that if there were any real money to be made with Autoit I would never help anyone with anything. I feel good about sharing what I know and expanding this free community. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Solution cstangor Posted December 18, 2014 Author Solution Share Posted December 18, 2014 OK, missed that "freeze" in the dropdown. Got it going now. My windows are flying open. Not really a spoonfeed but you did save me some time . I should have realized to search in Google not locally! Thanks everyone and happy holidays! ;HotKeySet("{F2}","MaximizeDOM") HotKeySet("^a","MaximizeDOM") HotKeySet("^b","MaximizeControlCenter") ; Set the Escape hotkey to terminate the script. HotKeySet("{ESC}", "_Terminate") While 1 Sleep(100) WEnd Func MaximizeDOM() WinActivate("Sim101") EndFunc Func MaximizeControlCenter() WinActivate("Control Center - Small") EndFunc Func _Terminate() MsgBox(4096, "", "BYE!") Exit EndFunc ;==>_Terminate 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