Title: Meditech C/S drop down menu lost focus with Timeout

I have a script that I run daily at a locked XP workstation. It runs okay, but once in awhile it times out at the target screen (Print Queued Reports) because the drop down menu to get into it, loses its focus before the script can get there. Maybe twice or three times a month.

I wanted to set up a timeout error to reset the script when this happens. The problem I'm having now is that the On Error GoTo & Timeout statements cause it to timeout ALL the time now (at least it's consistent now). I've tried to Activate the window before selecting the drop down menu, and that works if the workstation isn't locked, but not while it's locked.

Any suggestions? The workstation isn't in a secured area, so it can't really run unlocked.

 On Error GoTo TimeoutErr 

 ... more steps ...
       
    Pause "MEDITECH Imaging & Therapeutic Services [EMAIL PROTECTED],1"
    Key "{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}"
    Wait
    Activate "MEDITECH" '*** Bring Meditech window to focus
    Enter ""  '*** Enter on drop down menu
    Key "{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}"
    Enter ""
    Timeout = 10
    Pause "Print Queued [EMAIL PROTECTED],1"
    Pause "@3,8" '*** Report Type prompt

 ... more steps ...

 TimeoutErr:
 ... more steps ...


Thanks
Michelle

617-665-3432
617-546-7770 pgr.
Clinical Application Analyst
CHA Information Technology
[EMAIL PROTECTED]


Reply via email to