AutoHotkey Community

It is currently May 27th, 2012, 2:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: February 6th, 2010, 2:53 pm 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
HI Everyone,
I'm wrestling with this for a few days now, here it is :

I want to wait for a process to close.
As the process (a game) regularily crash, or worse blue screen the PC, I want to save the game files, let say, every 10 mns.
And finally, when the process close (or crash) I want to save the game files (a last time) before the ahk file exit.

I tried a solution with
process waitclose,
TimeSet
and also
While or If
But ... Bouhouhou, :shock: : I can't mix them all properly to get the right result.

Here is what I wrote (at least the last variation of all my trials):
Code:
While "Process, WaitClose, Run.exe" ;If I don't put the double quote I get the following error message : "Error at line 19.

;The following variable name contains an illegal character:"Run.exe"
;The script was not reloaded; the old version will remain in effect."
;Unfortunately, from all the test and variations I made from now, I guess that when I put the double quotes, process don't work anymore ...
{
while Timer > 0 jump
SetTimer, save_profiles2, 600000 ; create a label where to go to save game files
save_profiles2:
;Save Game Files every 10 mns to avoid total loss due to game crashing the whole system
FileCopyDir, %Profile_Installation_Path%%Profile_Saved_folder%, %Profile_Saved_path%%Profile_Saved_folder%\, 1
jump: ;want to make a jump here if the timer is above zero
return ; want to make it go to "line 1 While "Process, WaitClose, Run.exe"", to check again if the process is closed or not
}

I'm stuck on it for more than 3 days . . .
For next Christmas I'll ask for :idea: "whole knowledge of the Universe" package, DeLuxe version . . . :idea:
:lol: Mmmm, ... with Add Ons and Plugs ins included, .... :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 6th, 2010, 4:02 pm 
while, expression
and not
!! while, command !!


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, LazyMan, poserpro, rbrtryn, Yahoo [Bot] and 16 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