| View previous topic :: View next topic |
| Author |
Message |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Mon Aug 28, 2006 2:48 pm Post subject: Additional Group command |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Aug 28, 2006 3:27 pm Post subject: |
|
|
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 |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Mon Aug 28, 2006 3:30 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Aug 28, 2006 3:45 pm Post subject: |
|
|
| .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 |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Mon Aug 28, 2006 3:48 pm Post subject: |
|
|
| I thought that "DetectHiddenWindows Off" should of prevented this problem. Does the "GroupAdd" command ignore this command? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Aug 28, 2006 3:59 pm Post subject: |
|
|
| 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 |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Mon Aug 28, 2006 4:02 pm Post subject: |
|
|
| (post accidentally deleted) |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Aug 30, 2006 2:35 am Post subject: |
|
|
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 |
|
 |
.AHK
Joined: 26 Apr 2006 Posts: 662 Location: USA
|
Posted: Wed Aug 30, 2006 12:14 pm Post subject: |
|
|
| No problem about the deletion and yes that was the only important question I had mentioned. Thanks for the information. |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 264
|
Posted: Sun Aug 05, 2007 6:13 pm Post subject: GroupRemove, GroupClear etc. |
|
|
| 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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Aug 07, 2007 1:22 pm Post subject: |
|
|
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 |
|
 |
Piz
Joined: 16 Feb 2008 Posts: 46
|
Posted: Mon Feb 25, 2008 12:23 am Post subject: |
|
|
Just want to add a vote for more functionality for window groups. They've become quite useful for me.
Thanks! |
|
| Back to top |
|
 |
ewerybody
Joined: 18 Sep 2006 Posts: 14
|
Posted: Sat May 17, 2008 10:18 am Post subject: VOTE! |
|
|
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?  |
|
| Back to top |
|
 |
infogulch
Joined: 27 Mar 2008 Posts: 114 Location: KC, MO
|
Posted: Sun May 18, 2008 1:52 pm Post subject: |
|
|
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.
 |
|
| Back to top |
|
 |
|