| View previous topic :: View next topic |
| Author |
Message |
jeff Guest
|
Posted: Mon Feb 20, 2006 10:34 am Post subject: Help WinKill |
|
|
Hi to all.
I would like
to make this:
if excel.exe it is started
close it.
I have tried with:
IfWinExist, Excel.exe
WinKill
but it does not work
thanks |
|
| Back to top |
|
 |
neyon
Joined: 29 May 2005 Posts: 34 Location: The Netherlands
|
Posted: Mon Feb 20, 2006 10:39 am Post subject: |
|
|
Try this:
| Code: |
IfWinExist, Microsoft Excel
WinKill
|
this should work.
The title bar is the trigger... _________________ Greetz,
Neyon |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Mon Feb 20, 2006 10:40 am Post subject: |
|
|
You must use the WinTitle (the content, or part of it, in the title bar of Excel), no the process name.
See also SetTitleMatchMode.
PS.: Althought WinKill first try a softer method, you should try to use WinClose instead, unless the process is very stubborn... _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
neyon
Joined: 29 May 2005 Posts: 34 Location: The Netherlands
|
Posted: Mon Feb 20, 2006 10:43 am Post subject: |
|
|
PhiLho  _________________ Greetz,
Neyon |
|
| Back to top |
|
 |
|