MarkPMCcartney Posted November 4, 2011 Share Posted November 4, 2011 Hi All, I have a timer that checks if i have internet connetion every 5 secs. AdlibRegister("Myfunc", 5000) If there is no connection I want to restart my script, the problem I am having is that in my script i use the Sleep function and can be up to 10mins long. So should i not use sleep but perhaps another timer. Or can I force the script to close (easy enought) but then how best to re run my script please. thanks for greate tool and forum Mark Link to comment Share on other sites More sharing options...
kaotkbliss Posted November 4, 2011 Share Posted November 4, 2011 I found that using a timer for extended idle times works best, for those cases where the idle may need to be interrupted. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
MarkPMCcartney Posted November 4, 2011 Author Share Posted November 4, 2011 I found that using a timer for extended idle times works best, for those cases where the idle may need to be interrupted. Many thanks kaotkbliss, i think that will be the best approach to. Just on the whole re-running of a script do you know what is the best way to do it. I am using the Run function just before exit at the moment to run the script again, it seems to be working but wasnt sure if this was the best way as im new to AutoIT thanksMark Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 4, 2011 Moderators Share Posted November 4, 2011 MarkPMCcartney, Try Yashied's Restart UDF - works a treat. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MarkPMCcartney Posted November 4, 2011 Author Share Posted November 4, 2011 perfect ty so much for help. 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