Jump to content

Noobie help


cstangor
 Share

Go to solution Solved by cstangor,

Recommended Posts

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

  • Moderators

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 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

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

  • Moderators

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

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

  • Solution

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...