| View previous topic :: View next topic |
| Author |
Message |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Thu Sep 25, 2008 4:25 pm Post subject: GroupAdd help |
|
|
Ok My StealthX s almost ready for the official release i need some help please. Here is my code;
| Code: | #SingleInstance force
#NoEnv
#NoTrayIcon
SetWorkingDir %A_ScriptDir%
IfExist, running.txt
{
FileDelete, running.txt
ExitApp
}
Else
FileAppend, This a temp file. DO NOT DELETE!!!, running.txt
SendMode Input
^h::
WinHide, A
Return
^s::
WinShow, A
Return
|
What i want to be able to do is to be able to hide and show multiple windows without them closing completly. Sivvy told me that GroupAdd can do just that, but i looked at it in the help file and WOW it was total madness for me. As you can tell in the part of the code in a previous version is.
| Code: | About:
MsgBox Please do not use this version of StealthX to hide more than one windows. To hide more than one window please download another copy of StealthX with a different hide/show combination to this one.
MsgBox IF YOU HIDE MORE THAN ONE WINDOW, SOME OF THE WINDOWS WILL CLOSE!!!
|
Can someone please help. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Sep 25, 2008 4:44 pm Post subject: |
|
|
| I gave you a pretty good example in your last topic... Maybe work off that. |
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Thu Sep 25, 2008 5:31 pm Post subject: |
|
|
| I had a look though and i didn't get it. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Sep 25, 2008 7:15 pm Post subject: |
|
|
| Did you try it? |
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Thu Sep 25, 2008 7:45 pm Post subject: |
|
|
| Try what? The hiding of the active window? Yeah I tried it and it worked thank you. But I want it so I can hide more than window at a time. |
|
| Back to top |
|
 |
aCkRiTe
Joined: 21 Jul 2006 Posts: 517
|
Posted: Thu Sep 25, 2008 8:06 pm Post subject: |
|
|
Heres a little example that might help you out.
| Code: |
Run, %A_WinDir%\System32\calc.exe
Run, %A_WinDir%\system32\cmd.exe
Run, %A_WinDir%\system32\notepad.exe
GroupAdd, Group, Calculator
GroupAdd, Group, Untitled - Notepad
GroupAdd, Group, C:\WINDOWS\system32\cmd.exe
^h::
WinHide, ahk_group Group
Return
^s::
WinShow, ahk_group Group
Return
|
_________________
HTH...
 |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Sep 25, 2008 8:46 pm Post subject: |
|
|
Very odd... I remember posting some code I worked long and hard on in your other topic... And it's not there anymore.
| Code: | WinGet, List, List
Loop %List%
{
WindowID := List%A_Index%
WinGet, Name, ProcessName, Ahk_ID %WindowID%
If Name != explorer.exe
GroupAdd, MostWindows, Ahk_ID %WindowID%
}
WinHide, Ahk_Group MostWindows
Sleep, 5000
WinShow, Ahk_Group MostWindows |
There's the code I originally posted. That's what I kept refering to. |
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Sat Sep 27, 2008 8:58 am Post subject: |
|
|
| Hmm that code what i really want to do is, make a seperate exe that adds the active window to a group called HideTest (Change name after) when you press like ctrl+y and then when you run the main program it hides the group called HideTest. I looked at the code but I don't know how it works. |
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Mon Sep 29, 2008 8:23 am Post subject: |
|
|
| Well? Any help? Cause I still can't work out how to do it. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Mon Sep 29, 2008 2:49 pm Post subject: |
|
|
Did you even look in the manual? I remember giving you info on how to find the active window in your last topic.
| Code: | ^y::
GroupAdd, HideTest, A
Return
^q::
WinHide, Ahk_Group HideTest
Return
^o::
WinShow, Ahk_Group HideTest
Return |
|
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Tue Sep 30, 2008 9:26 am Post subject: |
|
|
Huh??? I tried that and put it into the code;
| Code: | #SingleInstance force
#NoEnv
#NoTrayIcon
SetWorkingDir %A_ScriptDir%
IfExist, running.txt
{
FileDelete, running.txt
ExitApp
}
Else
FileAppend, This a temp file. DO NOT DELETE!!!, running.txt
SendMode Input
^y::
GroupAdd, HideTest, A
Return
^h::
WinHide, Ahk_Group HideTest
Return
^s::
WinShow, Ahk_Group HideTest
Return
|
But it now don't hide, I'm not sure if it adds to the group though. |
|
| Back to top |
|
 |
jamie.ds
Joined: 23 Jul 2008 Posts: 39
|
Posted: Fri Oct 03, 2008 6:38 am Post subject: |
|
|
| Should I try the code you gave you know instead of me placing s,h,y into the code. |
|
| Back to top |
|
 |
Dra_Gon
Joined: 25 May 2007 Posts: 314
|
|
| Back to top |
|
 |
|