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 

GroupAdd help

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Thu Sep 25, 2008 4:25 pm    Post subject: GroupAdd help Reply with quote

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
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Thu Sep 25, 2008 4:44 pm    Post subject: Reply with quote

I gave you a pretty good example in your last topic... Maybe work off that.
Back to top
View user's profile Send private message MSN Messenger
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Thu Sep 25, 2008 5:31 pm    Post subject: Reply with quote

I had a look though and i didn't get it.
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Thu Sep 25, 2008 7:15 pm    Post subject: Reply with quote

Did you try it?
Back to top
View user's profile Send private message MSN Messenger
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Thu Sep 25, 2008 7:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 517

PostPosted: Thu Sep 25, 2008 8:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Thu Sep 25, 2008 8:46 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Sat Sep 27, 2008 8:58 am    Post subject: Reply with quote

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
View user's profile Send private message
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Mon Sep 29, 2008 8:23 am    Post subject: Reply with quote

Well? Any help? Cause I still can't work out how to do it.
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Mon Sep 29, 2008 2:49 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Tue Sep 30, 2008 9:26 am    Post subject: Reply with quote

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
View user's profile Send private message
jamie.ds



Joined: 23 Jul 2008
Posts: 39

PostPosted: Fri Oct 03, 2008 6:38 am    Post subject: Reply with quote

Should I try the code you gave you know instead of me placing s,h,y into the code.
Back to top
View user's profile Send private message
Dra_Gon



Joined: 25 May 2007
Posts: 314

PostPosted: Fri Oct 03, 2008 3:58 pm    Post subject: Reply with quote

There was a script for hiding multiple windows posted a while back by Charon the Hand:
http://www.autohotkey.com/forum/viewtopic.php?p=139652#139652
This is a pretty good script and you might be able to modify it to your script, or even just add it in. It works great, though I've only tested it a little bit.

Ciao,
Dra'Gon
_________________

For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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