AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Additional Group command

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
.AHK



Joined: 26 Apr 2006
Posts: 662
Location: USA

PostPosted: Mon Aug 28, 2006 2:48 pm    Post subject: Additional Group command Reply with quote

Currently there is:
Code:

GroupActivate
GroupAdd
GroupClose
GroupDeactive

Adding a "GroupHide" to hide all windows of a group with a parameter to unhide the group would be useful.

Code:

GroupHide, GroupName[, H|S A]


Hide|Show Defaults to hide if not ommited. If "A" all windows in the group.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Aug 28, 2006 3:27 pm    Post subject: Reply with quote

It seems unnecessary to add this because: "The commands WinMinimize, WinMaximize, WinRestore, WinHide, WinShow, WinClose, and WinKill will act upon all the group's windows." For example:
Code:
WinHide ahk_group MyGroup  ; Hides all windows in the group
WinShow ahk_group MyGroup  ; Shows all windows in the group
Back to top
View user's profile Send private message Send e-mail
.AHK



Joined: 26 Apr 2006
Posts: 662
Location: USA

PostPosted: Mon Aug 28, 2006 3:30 pm    Post subject: Reply with quote

Yes sorry I figured how simple it is to do without the command. I have found what I believe to be a bug though. This script when used to show all the windows for some reason also shows all hidden windows. It filled my entire screen with tons of hidden windows. Also I have a question how do I loop through a group. Sorry I just found that the Loop for WinHide/Show is not needed because running the command once should act on all windows in the group right?
Code:

#SingleInstance On
DetectHiddenWindows Off
Loop
{
GroupAdd Windows
Sleep 100
}
Return

#H::
Loop
{
WinHide ahk_group Windows
Sleep 50
}
Return

#S::
Loop
{
WinShow ahk_group Windows
Sleep 50
}
Return


The new code has the same effect when "WinShow ahk_group Windows" is activated.

Code:

#SingleInstance On
DetectHiddenWindows Off
Loop
{
GroupAdd Windows
Sleep 100
}
Return

#H::
WinHide ahk_group Windows
Return

#S::
WinShow ahk_group Windows
Return


I have to restart my computer agian after trying new script. Laughing
Back to top
View user's profile Send private message Visit poster's website AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Aug 28, 2006 3:45 pm    Post subject: Reply with quote

.AHK wrote:
This script when used to show all the windows for some reason also shows all hidden windows. It filled my entire screen with tons of hidden windows.
That sounds normal if your group includes all windows on the entire system. You would have to make your group more selective by adding all your favorite windows to it (which I realize might be a burden) or by enumerating all windows via WinGet, ID, List, ahk_group MyGroup and then coding in some exceptions to avoid doing unhiding "bad" windows. There is an example on the WinGet page of how to enumerate all windows on the system, one at a time.
Back to top
View user's profile Send private message Send e-mail
.AHK



Joined: 26 Apr 2006
Posts: 662
Location: USA

PostPosted: Mon Aug 28, 2006 3:48 pm    Post subject: Reply with quote

I thought that "DetectHiddenWindows Off" should of prevented this problem. Does the "GroupAdd" command ignore this command?
Back to top
View user's profile Send private message Visit poster's website AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Aug 28, 2006 3:59 pm    Post subject: Reply with quote

WinShow ignores DetectHiddenWindows. So in fact, GroupAdd has nothing to do with it because it merely adds criteria to the group without even consulting DetectHiddenWindows and SetTitleMatchMode. In other words, GroupAdd doesn't check what windows currently exist on the system; it simply adds the new criteria to its list of criteria.
Back to top
View user's profile Send private message Send e-mail
.AHK



Joined: 26 Apr 2006
Posts: 662
Location: USA

PostPosted: Mon Aug 28, 2006 4:02 pm    Post subject: Reply with quote

(post accidentally deleted)
Back to top
View user's profile Send private message Visit poster's website AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Aug 30, 2006 2:35 am    Post subject: Reply with quote

Sorry about the accidental deletion of your post. Fortunately, I think the following was the most important thing in it:
.AHK wrote:
If I only wanted to hide one window [in a group]
There's no way to do it directly; but I think the following would work:
Code:
id_of_first_window_in_group := WinExist("ahk_group MyGroup")
WinHide ahk_id %id_of_first_window_in_group%
... or a single-line version:
Code:
WinHide % "ahk_id " . WinExist("ahk_group MyGroup")
Back to top
View user's profile Send private message Send e-mail
.AHK



Joined: 26 Apr 2006
Posts: 662
Location: USA

PostPosted: Wed Aug 30, 2006 12:14 pm    Post subject: Reply with quote

No problem about the deletion and yes that was the only important question I had mentioned. Thanks for the information.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Peter



Joined: 30 Dec 2005
Posts: 264

PostPosted: Sun Aug 05, 2007 6:13 pm    Post subject: GroupRemove, GroupClear etc. Reply with quote

Removing items from a group would be handy too. I've made here some emergency solution to that, but a remove command in AHK would be a lot easier.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Aug 07, 2007 1:22 pm    Post subject: Reply with quote

Improvements to Window Groups are planned. It isn't the highest priority because I don't think many people use window groups that often. Even among those who do, not many people need to delete group items or entire groups.

Thanks for creating a temporary solution for others.
Back to top
View user's profile Send private message Send e-mail
Piz



Joined: 16 Feb 2008
Posts: 46

PostPosted: Mon Feb 25, 2008 12:23 am    Post subject: Reply with quote

Just want to add a vote for more functionality for window groups. They've become quite useful for me.

Thanks!
Back to top
View user's profile Send private message
ewerybody



Joined: 18 Sep 2006
Posts: 14

PostPosted: Sat May 17, 2008 10:18 am    Post subject: VOTE! Reply with quote

I'd give a vote for GroupDelete or GroupSubstract (because of GroupAdd) or however you'd like to call it as well.

litterally means Deleting Groups or Removing Items from groups. Plus: I'd love to have a funktion that returns the current criteria of a given Group:

I mean.. would it really be hard to implement this? I really think this is one importat task! But ok maybe not highest prioity...

when can we expect something like this? Smile
Back to top
View user's profile Send private message
infogulch



Joined: 27 Mar 2008
Posts: 114
Location: KC, MO

PostPosted: Sun May 18, 2008 1:52 pm    Post subject: Reply with quote

I use window groups as well, and would love to be able to "Subtract" from or "Delete" groups. My vote's in.

Hmm, I like that idea of a function that returns a group's criteria.

Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group