I just left you a message.  I was hoping to get a better understanding of what you are attempting to do.
I find that Pause commands greatly improve the performance of the scripts.  It's those pesky "wait"  commands and over using the "Stable" command that slow it down.
 
If a pause times out, just saying to "Do Next" can be a bad thing.  You should really have the program evaluate where it's at and then have it attempt to recover from there.  
 
For the type of script you are writing, you probably have only a few possible locations that the cursor would be at after a failed pause command. If you use a command like...
        if at("@12,1") then do some corrective action.
   
You can also use the row(), and col() command to figure out where your cursor is as well.
 
 
Paul 
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thompson, Mary
Sent: Thursday, July 15, 2004 6:08 AM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Meditech Magic - Batches and General Errors

Paul

Will this handle those “I am stuck in a spot and not moving” what should I do? So no error message, or would I need to put in then If Pause = more then 10sec, error “time out” do next? I know that I can put more pauses or stables in to prevent this, but that seems to really slow down the script, any thoughts?

Thank you

Mary

 

Mary Thompson

Special Project Manager

Children's Mercy Hospital

(816) 234-3940

 

 

Electronic mail from Mary Thompson, The Children's Mercy Hospital. This communication is intended only for the use of the addressee.  It may contain information which is privileged or confidential under applicable law.  If you are not the intended recipient or the agent of the recipient, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited.  If you have received this communication in error, please immediately notify The Children's Mercy Hospital at 816-234-3940 or via return Internet electronic mail at [EMAIL PROTECTED] and expunge this communication without making any copies.  Thank you for your cooperation.

 

-----Original Message-----
From: Paul Donoughe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 6:01 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Meditech Magic - Batches and General Errors

 

In Meditech Magic, the error messages always start in row 1, so you could do a check to see if you are in row 1, and take corrective action based on that.  The messages are usually cleared by hitting enter.

 

You can approach this from two directions that I am aware of.

 

1.  Set a time out value for your pause commands, and have the error logic do what I reference in the CheckError Routine below

2.  Call the CheckError routine below every time you key in something like an account number or try to file something that might cause an error.

 

You could even use a pauseloop on the off chance that more then one error is encounter.

 

I would recommend something like a......

 

 

Function CheckForError.

dim FoundError as Boolean

FoundError = False

if at("@1")   then

     errmsg = view(1,1,30)  ' row 1, col1  for a maximium of 30 characters

     MySpecialErrorhandlingRoutine(ermsg) 

     FoundError = True

end if

return FoundError

 

Sub MySpecialErrorhandlingRoutine(rmsg) 

 

select case msg

         case "Invalid Account"

                 'Process for handling this error

        case "bla bla bla"

                ' Special Bla, Bla, Bla error handing

        else

               'default error handling' most likely just and enter

end select

end sub

 

I just typed this code off the top of my head.  I'm sure the logic is good ( relatively ), but I probably made about 20-30 syntax errors.

 

Paul


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thompson, Mary
Sent: Wednesday, July 14, 2004 3:08 PM
To: [EMAIL PROTECTED]
Subject: [Talk] Meditech Magic - Batches and General Errors

I run remits through the Meditech batch routine, as well as charges using a script.  On occasion a new and exciting error will pop up, I am wondering if anyone has a general If “any” error or stop for more then 5 seconds, comment error field “Unknown error” and go to next.  I am completely in the dark on how to do this so if you have a line or two of code that would bring me in from the dark I would appreciate it so much!

Thank you in advance!

Mary

 

Mary Thompson

Special Project Manager

Children's Mercy Hospital

(816) 234-3940

 

 

Electronic mail from Mary Thompson, The Children's Mercy Hospital. This communication is intended only for the use of the addressee.  It may contain information which is privileged or confidential under applicable law.  If you are not the intended recipient or the agent of the recipient, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited.  If you have received this communication in error, please immediately notify The Children's Mercy Hospital at 816-234-3940 or via return Internet electronic mail at [EMAIL PROTECTED] and expunge this communication without making any copies.  Thank you for your cooperation.

 

Reply via email to