oemript Posted October 29, 2018 Share Posted October 29, 2018 (edited) I would like to know on if error occur on "Local Do Loop", based on Continueloop function, would Local Do Loop continue without stop the Global Do Loop? Does anyone have any suggestions? Thanks in advance for any suggestions Do _Test() If @error Then ContinueLoop ConsoleWrite ( "Global Do Loop" ) until i = 1 Func _Test() Do ... coding to return value of i ... ; if error occur, would Local Do Loop continue without stop the Global Do Loop? If @error Then ContinueLoop ConsoleWrite ( "Local Do Loop" ) until i = 1 EndFunc Edited October 29, 2018 by oemript Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 29, 2018 Moderators Share Posted October 29, 2018 oemript, That code makes no sense at all as all the 2 ContineLoop commands will do is to miss the relevant ConsoleWrite lines - and in fact the "outer" If @error condition will never fire as you never set @error on the return from the "inner" function using SetError. So how about explaining what you want to do in words - then we might be able to help. 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...
Moderators JLogan3o13 Posted October 29, 2018 Moderators Share Posted October 29, 2018 It also looks very much like your question about error handling in a loop in the other thread that you have been blowing up. Please stop multi-posting and give people a chance to actually respond and help you. "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...
caramen Posted October 30, 2018 Share Posted October 30, 2018 (edited) Is this being mederated ? Edited October 30, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 30, 2018 Moderators Share Posted October 30, 2018 @caramen neither Melba nor myself have indicated it is under moderation, so you are free to assist. "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...
oemript Posted October 30, 2018 Author Share Posted October 30, 2018 Once error occurs, I would like to know on whether Local loop (inner) would stop the Global loop (outer) or not. Would any error occur within Local loop (inner) be independent from Global loop (outer)? Does anyone have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 30, 2018 Moderators Share Posted October 30, 2018 oemript, There should be no interaction between the 2 loops unless you code it to happen - errors within the "inner" function will not be transmitted to the "outer" code unless you use Return SetError as I mentioned above. I am afraid I cannot be more specific without more details. M23 oemript 1 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...
oemript Posted October 30, 2018 Author Share Posted October 30, 2018 Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
oemript Posted November 1, 2018 Author Share Posted November 1, 2018 (edited) Referring to following coding, I would like to set a condition if Do loop last more than 3 minutes, then break Do Loop and ContinueLoop for next For loop, if not, Do Loop would run forever. For example 1) Processing $x = 3 2) Running Do Loop more than 3 minutes 3) Exit Do Loop 4) Processing $x = 4 for $x = 1 to 5 ... Do Sleep(250) Until $jsEval("RawSummary.totalVol") <> 0 ... Next Does anyone have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Edited November 1, 2018 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted November 1, 2018 Share Posted November 1, 2018 Use a timer. See TimerInit and TimerDiff in the help file. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 2, 2018 Moderators Share Posted November 2, 2018 16 hours ago, oemript said: Referring to following coding, I would like to set a condition if Do loop last more than 3 minutes, then break Do Loop and ContinueLoop for next For loop, if not, Do Loop would run forever. In all of your threads, you keep saying this "I would like to..." by which you apparently mean "I want someone to do for me...", and have been warned by Jos multiple times now. Where is the effort? What have you tried on your own to accomplish this Loop? ***BTW in case you missed it, this is a Mod stepping into a thread*** "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...
Developers Jos Posted November 2, 2018 Developers Share Posted November 2, 2018 Seems you are getting a heck of a lot attention lately... Just so you know: the same applies here as in the other thread: Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
oemript Posted November 3, 2018 Author Share Posted November 3, 2018 (edited) On 11/2/2018 at 6:28 AM, Danp2 said: Use a timer. See TimerInit and TimerDiff in the help file. Sleep(250) $jsEval = Execute('$oIE.Document.head.eval') if @error then MsgBox(64 + 262144, 'Title', 'Error') EndIf Instead of using timer within do Loop, I would like to know on why Msgbox does not show up during error on Execute coding. Do you have any suggestions on what wrong it is? Thanks, to everyone very much for any suggestions (^v^) Edited November 3, 2018 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted November 3, 2018 Share Posted November 3, 2018 The only logical explanation is that @error equals zero, and therefore that section of code isn't executed. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted November 3, 2018 Author Share Posted November 3, 2018 In case following code not responding, how can I detect this situation to show Msgbox? $jsEval = Execute('$oIE.Document.head.eval') Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Danp2 Posted November 3, 2018 Share Posted November 3, 2018 It seems that you are the only one experiencing this issue. So I suggestion that you try to figure out why that is. Have you tried any of the following? Run your code on a different workstation. Can you duplicate the problem there? Update your operation system Upgrade / reinstall the browser Etc Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted November 3, 2018 Author Share Posted November 3, 2018 (edited) In order to figure out why that is, first of all, I need some tools to detect the error at the first place, such as following code not responding, how can I detect this situation to show Msgbox? On the other words, I need tools to figure out why that is. $jsEval = Execute('$oIE.Document.head.eval') Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Edited November 3, 2018 by oemript Link to comment Share on other sites More sharing options...
BrewManNH Posted November 3, 2018 Share Posted November 3, 2018 Why are you using Execute to try and evaluate an object reference? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
oemript Posted November 3, 2018 Author Share Posted November 3, 2018 (edited) 9 minutes ago, BrewManNH said: Why are you using Execute to try and evaluate an object reference? Using Execute is not key point, that is just an example, the key point is how to detect not responding situation, and I need tools to do that to show Msgbox at the first place. Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^) Edited November 3, 2018 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted November 3, 2018 Share Posted November 3, 2018 @BrewManNH That code comes from here -- https://www.autoitscript.com/forum/topic/196255-possible-to-retrieve-html-into-text-file/?do=findComment&comment=1407797 It is a subset of the code from @Chimp's _jQuerify routine. Latest Webdriver UDF Release Webdriver Wiki FAQs 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