Sign in to follow this  
Followers 0
cstangor

Noobie help

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

follow the "teach a man to fish" methodology.

 

Or we spoon feed it to you so you never learn anything...


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

EcPYeru.png

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0