AutoHotkey Community

It is currently May 25th, 2012, 3:11 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: August 18th, 2007, 7:33 pm 
Offline

Joined: July 22nd, 2007, 3:18 pm
Posts: 86
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????


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2007, 7:52 pm 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8657
Location: Salem, MA
you cannot close with the clsid. just WinClose, My Computer

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2007, 7:55 pm 
Offline

Joined: July 22nd, 2007, 3:18 pm
Posts: 86
What if we rename the "My Computer" to "Computer" or something else???


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2007, 8:28 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
It closes the window with the title "My Computer" so yes, if you put Computer in place of it, it would.

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2007, 8:43 pm 
Offline

Joined: July 22nd, 2007, 3:18 pm
Posts: 86
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???


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2007, 8:53 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
engunneer wrote:
you cannot close with the clsid.

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2007, 2:08 am 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8657
Location: Salem, MA
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.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 19th, 2007, 6:20 pm 
Offline

Joined: July 22nd, 2007, 3:18 pm
Posts: 86
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..... :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2007, 5:17 am 
Offline

Joined: July 15th, 2006, 7:36 pm
Posts: 31
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2007, 5:29 am 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8657
Location: Salem, MA
are you in Vista or XP?

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2007, 5:37 am 
Offline

Joined: July 15th, 2006, 7:36 pm
Posts: 31
engunneer wrote:
are you in Vista or XP?


WinXP, running under virtualbox, inside linux of course. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2007, 5:46 am 
Offline

Joined: July 21st, 2006, 6:13 am
Posts: 558
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...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: azure, BrandonHotkey, engunneer, gemisigo, Yahoo [Bot] and 9 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group