Ade1234 Posted May 28, 2018 Share Posted May 28, 2018 When I am running my tool. Some times it's give error because of any reason. So I want to run the tool again from where it's last run termination point. Thank you all in advance for suggestion Link to comment Share on other sites More sharing options...
Earthshine Posted May 28, 2018 Share Posted May 28, 2018 (edited) There's not enough information here to help you. What tool are you talking about? Is this like CNC milling? also if you can post your script using the code tags <> Then we might be able to help you even more. thank you Edited May 28, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted May 28, 2018 Share Posted May 28, 2018 (edited) Welcome to the forum by the way Edited May 28, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Ade1234 Posted May 28, 2018 Author Share Posted May 28, 2018 Thank you @Earthshine I want a logic for, if a auto it program working fine. But sometimes for any reason the program is terminated at any point of the program. So some work is already complete by this program. So I want if unexpected termination happens on my program, at the next time when I will run or it will run automatically, it should start from the last termination point. It will not going to start from initial. Link to comment Share on other sites More sharing options...
Ade1234 Posted May 28, 2018 Author Share Posted May 28, 2018 Just now, Ade1234 said: Thank you @Earthshine I want a logic for, if a auto it program working fine. But sometimes for any reason the program is terminated at any point of the program. So some work is already complete by this program. So I want if unexpected termination happens on my program, at the next time when I will run or it will run automatically, it should start from the last termination point. It will not going to start from initial. My code is working fine but I want to avoid rework of my program after a unexpected termination. Earthshine 1 Link to comment Share on other sites More sharing options...
jchd Posted May 28, 2018 Share Posted May 28, 2018 Rather than adding a dirty hack to bad code, fix your program ny testing for possible runtime errors and handle them gracefully. Earthshine 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Ade1234 Posted May 28, 2018 Author Share Posted May 28, 2018 10 minutes ago, jchd said: Rather than adding a dirty hack to bad code, fix your program ny testing for possible runtime errors and handle them gracefully. For a flow of keyboard manipulation any time user may distrub your code unintentionally, so I want to give to user a perfect code that whatever that interrupt, it will work smoothly. For your kind information I don't have any runtime errors on my code if it is there it is simple task to avoid. I will not come to forum for simple help to waste your precious time. Link to comment Share on other sites More sharing options...
Earthshine Posted May 28, 2018 Share Posted May 28, 2018 (edited) still no useful information here. I think you should search Google on error handling in autoit. There is no one error handler to rule them all and you can't possibly avoid every situation so you handle the ones that your program encounters Edited May 28, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted May 28, 2018 Share Posted May 28, 2018 (edited) And to say your program doesn't have any errors, well let me tell you everything has bugs and you darn well should be handling errors within your code. If it didn't have errors then why did you say it would crash for any unknown reason? asking folks to help and not showing your code won't get you far either. pro tip as far as picking up where left off only you can design so that is possible. If you haven't then your dreaded major rework would have to happen Edited May 28, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 28, 2018 Moderators Share Posted May 28, 2018 4 hours ago, Ade1234 said: so I want to give to user a perfect code that whatever that interrupt, it will work smoothly. You have seen the code and are not sure how to make it "perfect", and yet you're asking us to help you, but have ignored two requests to post your code. How are we supposed to assist when you have us guessing at what your code is doing? Please post what you have; help us help you. Edit: Also moved thread to the correct forum. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Zedna Posted May 29, 2018 Share Posted May 29, 2018 (edited) Agree with others to correctly handle possible errors. But if you still want your desired way then here is possible way: pseudocode Global $done $done = IniRead('your.ini','Stage','Done') If $done < 1 Then ; ... code part 1 WriteStage(1) EndIf If $done < 2 Then ; ... code part 2 WriteStage(2) EndIf ; ... ; finish WriteStage(0) Exit Func WriteStage($stage) $done = $stage IniWrite('your.ini','Stage','Done',$stage) EndFunc Edited May 29, 2018 by Zedna Earthshine 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now