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 

Help WinKill

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jeff
Guest





PostPosted: Mon Feb 20, 2006 10:34 am    Post subject: Help WinKill Reply with quote

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

PostPosted: Mon Feb 20, 2006 10:39 am    Post subject: Reply with quote

Try this:

Code:

IfWinExist, Microsoft Excel
WinKill


this should work.

The title bar is the trigger...
_________________
Greetz,
Neyon
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Feb 20, 2006 10:40 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
neyon



Joined: 29 May 2005
Posts: 34
Location: The Netherlands

PostPosted: Mon Feb 20, 2006 10:43 am    Post subject: Reply with quote

PhiLho Laughing
_________________
Greetz,
Neyon
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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