I have an issue with MEDITECH connections not always 'Connect'ing on the
first attempt.

My script 'sticks' at (it never finds the following text);

Loop Until At("Medical Information Technology, [EMAIL PROTECTED],23")

Is there a way to set a 'timer' so IF my script is 'stuck' for say 30
seconds, Close the 'MEDITECH Workstation Connections' and try again ?

OR has anyone else run into and conquered this same issue in a different
way?



' -------- My login subroutine looks like the following -------

Sub MTLogin()
Connect "C:\Program Files\MEDITECH\Workstation3.x\T.exe", stMeditech
On Error Resume Next
Do
  Err = 0
  Activate "MEDITECH Workstation"
  DoEvents
Loop Until Err = 0
On Error GoTo 0
SendKeys "%O", True
    Do
      If At("<Return> to [EMAIL PROTECTED],1") Then  ' ------  Allows for
Downtime Message
        Enter
      End If
      If At("TLL_XXX.TLL:@4,1") Then           ' ----  Un-managed device
using FE.TRACY start program)
        Enter "ALL"
      End If
      If At("MIS [EMAIL PROTECTED],18") Then       ' ----  From MIS
Directories menu (managed device using %MIS.signon(0) start program)
        Enter "1"
      End If
      DoEvents

    Loop Until At("Medical Information Technology, [EMAIL PROTECTED],23")    

' -  !!!!!!!!!!!!!!! USER NAME AND PASSWORD (Yes, I remembered to change
it for this e-mail) !!!!!!!!!!!!!!!!

Pause "User [EMAIL PROTECTED],5"
Enter "MY-LOGIN"
Enter "MYPASSWORD"

' -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

' -------------------------------  Allows for **Last Sign On ... message
Do
  If At("**Last Sign [EMAIL PROTECTED],1") Then
    Enter
  End If
  DoEvents
Loop Until At("Nursing Main Menu")
End Sub ' = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Reply via email to