Killing a Start Menu Folder
#1
Posted 19 April 2005 - 02:39 PM
Reason I ask is because Macromedia Studio, which I've decided to use an AutoIt script for (because of the Flash plugin) opens both a webpage from Macromedia as well as the program group folder in the start menu. I can kill the website, but what about the folder?
#2
Posted 19 April 2005 - 06:53 PM
Easy way to test... while your runonce is running, hit Ctrl Alt Del.. thatll bring up task mgr and you can see for yourself.
Post up your results
#3
Posted 19 April 2005 - 08:32 PM
TheJerk, on Apr 20 2005, 06:39 AM, said:
In Autoit, this will close the window, but if still exists, it will try for up to 5 secs. Just that sometimes, a second close message is required, in RunOnceEx.
$title = "TheTitleHere" WinWait($title) For $i = 1 To 20 WinClose($title) If Not WinExists($title) Then ExitLoop Sleep(250) Next
#4
Posted 19 April 2005 - 10:38 PM
See the MS Technet Script Center for example of how to use SendKeys.
Then just call the .vbs file from your RunOnceEx.cmd.
#5
Posted 20 April 2005 - 10:11 AM
Here's an interesting question, though. Let's say I don't know exactly what the title of the window is that I'm trying to close. For instance, it could be just the name of the folder, or in my preconfigured case could be the entire path including the drive letter. Considering this is a variable and not a constant (given different computer setups), what would be the best method. Does AutoIt use regular expressions (I haven't had a chance to research this just yet)? Would it be best to search the title for a given set of characters and then issue that a close command?
Incidentally, thanks for the input.
#7
Posted 20 April 2005 - 08:33 PM
#8
Posted 20 April 2005 - 09:00 PM
TheJerk, on Apr 21 2005, 02:11 AM, said:
Here's an interesting question, though. Let's say I don't know exactly what the title of the window is that I'm trying to close. For instance, it could be just the name of the folder, or in my preconfigured case could be the entire path including the drive letter. Considering this is a variable and not a constant (given different computer setups), what would be the best method. Does AutoIt use regular expressions (I haven't had a chance to research this just yet)? Would it be best to search the title for a given set of characters and then issue that a close command?
Incidentally, thanks for the input.
Regular expressions are still in beta. You can close the active window, by just using "" instead of giving a title. Also, WinGetHandle() is an option as well, instead of the title. You could change the Opt() setting for window text to 2. Then you can pick a substring, witch can be part of the name of the folder only.
I would not close the explorer process, while running Autoit scripts. This is a brutal method for a simple problem. This could affect the outcome of your script, unless you insert some code to handle this process. Asking a window to close, is better then killing a main system process.
#9
Posted 21 April 2005 - 07:18 AM
#10
Posted 21 April 2005 - 05:40 PM
Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.
C:\>w:
W:\>pskill /?
PsKill v1.03 - local and remote process killer
Copyright © 2000 Mark Russinovich
http://www.sysinternals.com
PsKill terminates processes on a local or remote NT system.
Usage: pskill [\\RemoteComputer [-u Username]] <process Id or name>
-u Specifies optional user name for login to
remote computer.
W:\>
#11
Posted 21 April 2005 - 05:49 PM
#12
Posted 21 April 2005 - 09:27 PM
#13
Posted 22 April 2005 - 01:20 PM
#14
Posted 24 March 2007 - 12:28 PM
;Cleanup Open Start Menu Folder
Sleep(1000)
$handle = WinGetHandle("WinRAR - explorer", "")
WinClose($handle)



Help
Back to top









