Greetings, Btw. this is where the Rules format really shines since it's really a loop - and you can use the Timeout Rule in the Step.
While this is bad form I suppose for <real programmers> it works for your purposes: Put a "goto label" in: ResetToHere: The way you need to do this is to have a counter in your loop and when it's reached the increment use a Goto to the label i=i+1 if i > some value Goto ResetToHere end if Regards, Thom Thom C. Blackwell Product Manager Boston Software Systems (866) 653-5105 ex 807 www.bossoft.com LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately, then delete this message and empty from your trash. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodgers Chase Sent: Wednesday, May 02, 2007 1:36 PM To: [email protected] Subject: RE: [Talk] Enter Loop? I've got my "Loop" working, but I would like to drop in a "Timeout". In the below code, sometimes it skips over the "ITEM NO:" field and goes straight to the "PAT CHARGE:" Loop function and then just loops until it's blue in the face (which doesn't hurt our on-screen data, but is annoying since I have to pause the script, take the script back to the "Pause "ITEM NO:" command and then hit play to get it going again). I there a way to put a "Timeout" function on a "Loop" if it's going nowhere, and if so, make it start back up to the first line of the below code ("ITEM NO:")? Pause "ITEM NO: " Do Until At("UOM: ") Pause "ITEM NO:" Key strITEM Enter Stable 0.5 Loop Pause "UOM: " Enter Stable 0.2 If At("NOT A VALID UNIT OF MEASURE PRESS F4 KEY") Then Pause "NOT A VALID UNIT OF MEASURE PRESS F4 KEY" Key "@4" Pause "UOM:" Key "EA" Enter End If Do Until At("PAT CHARGE: ") Enter Stable 0.2 Loop Pause "PAT CHARGE: " Many, many thanks for any feedback you might have. Chase Rodgers Financial Reporting Manager Medical Center of Plano (214-473-7490 /[EMAIL PROTECTED] _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich McNeil Sent: Monday, April 23, 2007 01:22 PM To: [email protected] Subject: RE: [Talk] Enter Loop? A possible issue with this script is that the If At("@@ ERROR") will be tested immediately after the Key "@7", probably skip it no matter what. I'd suggest something more like Key "@7" Do If At("** ERROR") Then .stuff End If If At("other errors" Then .stuff End If Wait 'keeps the loop from spinning up and using all resources. Loop Until At("the usual condition with no errors") This hangs around in the Loop until all errors are handled. Our Rules based scripting handles this kind of situation in a much more straightforward manner. Rich McNeil Boston Software Systems 866 653 5105 x 813 www.bostonworkstation.com <http://www.bostonworkstation.com/> See us at MUSE booth 318
