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

Reply via email to