AutoHotkey Community

It is currently May 27th, 2012, 4:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 25th, 2010, 2:39 pm 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
Hello
I have a problem with Process, WaitClose.
The process is not killed within 5 seconds, why?


Code:
Run,  "%comspec% /c test.txt , , min, NEWPID
msgbox %NEWPID%
Process, WaitClose, %NewPID%, 5


msgbox : cmd.exe but test.exe isn't kill


Code:
Run, test.exe, , , NEWPID
msgbox %NEWPID%
Process, WaitClose, %NewPID%, 5


test.exe isn't kill

Process syntax

Thank for you help.

Acris


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 2:57 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Example #2 suggest that WaitClose doesn't close and wait - you have to use WinClose (on a window) or Process,Close to make the actual kill and then Process,WaitClose to check whether it did close.

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 4:56 pm 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
Hello,

Process,Close doesn't work too

i'll try winclose

winclose suggests that I know the name of the window but this is not the case.
it can be anything

but I am still trying

MY Program.exe is a batch convert to exe (with bat2exe converter) (run cmd.exe)

It creates temporary files but remove them as soon as you close the window with the red cross


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Mickers, rbrtryn, Yahoo [Bot] and 66 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