| View previous topic :: View next topic |
| Author |
Message |
m0h4n
Joined: 22 Jul 2007 Posts: 86
|
Posted: Sat Aug 18, 2007 6:33 pm Post subject: Close My Computer with CLSID? |
|
|
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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Sat Aug 18, 2007 6:52 pm Post subject: |
|
|
you cannot close with the clsid. just WinClose, My Computer _________________
(Common Answers) |
|
| Back to top |
|
 |
m0h4n
Joined: 22 Jul 2007 Posts: 86
|
Posted: Sat Aug 18, 2007 6:55 pm Post subject: |
|
|
| What if we rename the "My Computer" to "Computer" or something else??? |
|
| Back to top |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Sat Aug 18, 2007 7:28 pm Post subject: |
|
|
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 |
|
 |
m0h4n
Joined: 22 Jul 2007 Posts: 86
|
Posted: Sat Aug 18, 2007 7:43 pm Post subject: |
|
|
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 |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Sat Aug 18, 2007 7:53 pm Post subject: |
|
|
| engunneer wrote: | | you cannot close with the clsid. |
_________________ Religion is false. >_> |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Sun Aug 19, 2007 1:08 am Post subject: |
|
|
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 |
|
 |
m0h4n
Joined: 22 Jul 2007 Posts: 86
|
Posted: Sun Aug 19, 2007 5:20 pm Post subject: |
|
|
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.....  |
|
| Back to top |
|
 |
userabuser
Joined: 15 Jul 2006 Posts: 31
|
Posted: Tue Sep 18, 2007 4:17 am Post subject: |
|
|
| 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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Tue Sep 18, 2007 4:29 am Post subject: |
|
|
are you in Vista or XP? _________________
(Common Answers) |
|
| Back to top |
|
 |
userabuser
Joined: 15 Jul 2006 Posts: 31
|
Posted: Tue Sep 18, 2007 4:37 am Post subject: |
|
|
| engunneer wrote: | | are you in Vista or XP? |
WinXP, running under virtualbox, inside linux of course.  |
|
| Back to top |
|
 |
aCkRiTe
Joined: 21 Jul 2006 Posts: 555
|
Posted: Tue Sep 18, 2007 4:46 am Post subject: |
|
|
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 |
|
 |
|