AutoHotkey Community

It is currently May 27th, 2012, 2:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: February 14th, 2010, 11:23 pm 
Offline

Joined: January 13th, 2008, 6:00 pm
Posts: 115
I want to make a hotkey that will maximize all the windows of the active window's class or process, but only those windows. I tried the following, but the Group does not reset with each thread:
Code:
+CapsLock::
   WinGet, mx, MinMax, A
   If(mx = 0)
   {
   WinGetClass, gclass, A
   GroupAdd, g2max, ahk_class %gclass%
   WinMaximize, ahk_group g2max
   }
   Else
   WinRestore, A
   return


Is there a GroupRemove function? I don't want windows of another app maximized just because I previously used the hotkey when one of the other app's windows was active.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2010, 11:27 pm 
Offline

Joined: January 13th, 2008, 6:00 pm
Posts: 115
I guess this works:

Code:
+CapsLock::
   WinGet, mx, MinMax, A
   If(mx = 0)
   {
   WinGetClass, gclass, A
   g2max := A_TickCount
   GroupAdd, %g2max%, ahk_class %gclass%
   WinMaximize, ahk_group %g2max%
   }
   Else
   WinRestore, A
   return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Bing [Bot], Google Feedfetcher, rbrtryn and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group