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 

Close My Computer with CLSID?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
m0h4n



Joined: 22 Jul 2007
Posts: 86

PostPosted: Sat Aug 18, 2007 6:33 pm    Post subject: Close My Computer with CLSID? Reply with quote

hai friends... is it possible to close My Computer with CLSID?
as it can be run by ClSID

Run::{20d04fe0-3aea-1069-a2d8-08002b30309d}

this will open My Computer .. how to close with the same clsid?
which command????
Back to top
View user's profile Send private message Yahoo Messenger
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Sat Aug 18, 2007 6:52 pm    Post subject: Reply with quote

you cannot close with the clsid. just WinClose, My Computer
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
m0h4n



Joined: 22 Jul 2007
Posts: 86

PostPosted: Sat Aug 18, 2007 6:55 pm    Post subject: Reply with quote

What if we rename the "My Computer" to "Computer" or something else???
Back to top
View user's profile Send private message Yahoo Messenger
trik



Joined: 15 Jul 2007
Posts: 1320

PostPosted: Sat Aug 18, 2007 7:28 pm    Post subject: Reply with quote

It closes the window with the title "My Computer" so yes, if you put Computer in place of it, it would.
_________________
Religion is false. >_>
Back to top
View user's profile Send private message
m0h4n



Joined: 22 Jul 2007
Posts: 86

PostPosted: Sat Aug 18, 2007 7:43 pm    Post subject: Reply with quote

Guys..... please understand my question ..
whatever may the name of my computer be, the script must get its title by its CLSID or something else.

is that possible???
Back to top
View user's profile Send private message Yahoo Messenger
trik



Joined: 15 Jul 2007
Posts: 1320

PostPosted: Sat Aug 18, 2007 7:53 pm    Post subject: Reply with quote

engunneer wrote:
you cannot close with the clsid.

_________________
Religion is false. >_>
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Sun Aug 19, 2007 1:08 am    Post subject: Reply with quote

is it the active window? or you want to always close it?

There may be somthing you can do with SysGet to determine what the proper name is.

Is your script starting the window?
You could get the window ID when you start it and close based on that.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
m0h4n



Joined: 22 Jul 2007
Posts: 86

PostPosted: Sun Aug 19, 2007 5:20 pm    Post subject: Reply with quote

ok guys.. thanks for your help...
its confirmed that we cannot close it with CLSID ....

think better to stop it here....


thanks for trying to help me out...


keep rockin guys..... Smile
Back to top
View user's profile Send private message Yahoo Messenger
userabuser



Joined: 15 Jul 2006
Posts: 31

PostPosted: Tue Sep 18, 2007 4:17 am    Post subject: Reply with quote

engunneer wrote:
just WinClose, My Computer


Oddly enough, I can not close My Computer or My Documents with winclose, My Computer or winclose, My Documents. WinKill also does not work.

Though other windows like the antivir popup close just fine with winkill. What's up with that?
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Tue Sep 18, 2007 4:29 am    Post subject: Reply with quote

are you in Vista or XP?
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
userabuser



Joined: 15 Jul 2006
Posts: 31

PostPosted: Tue Sep 18, 2007 4:37 am    Post subject: Reply with quote

engunneer wrote:
are you in Vista or XP?


WinXP, running under virtualbox, inside linux of course. Smile
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Tue Sep 18, 2007 4:46 am    Post subject: Reply with quote

This works for me whether the window is the active window or not and even if you change the name...

Code:

WinGet, Number_of_Windows, List,,, Program Manager
Loop, %Number_of_Windows%
   {
      ID := Number_of_Windows%A_Index%
      StatusBarGetText, Text1, 1, ahk_id %ID%
      StatusBarGetText, Text2, 2, ahk_id %ID%
      StatusBarGetText, Text3, 3, ahk_id %ID%
      If Text1 =
         If Text2 =
            If Text3 = My Computer
               WinClose, ahk_id %ID%
   }

_________________

HTH...
Back to top
View user's profile Send private message
Display posts from previous:   
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