Title: Message
To Corinna, I am trying to shutdown the Meditech session and return control to the BWS console.  The code I show does shutdown Meditech, but all too often - uncannily usually after I have made changes that I haven't got around to saving, it leaves BWS "keying ESC" and nothing I do to VBA or BWS can regain control. 
 
Timeout is set so I would expect it to give up after 30 seconds - it doesn't seem to - Yesterday I let it sit over an hour hoping I could eventually save a particularly clever routine I had just written - but alas it never let go.   I had to kill the BWS process. 
 
I am attempting to have a routine that backs me out from any level without needing to know where I am.  Is there a code example somewhere that shows Rich's method?
 
Meditech's version is handy - would be a nice addition - because it just whacks the session - don't have to try to figure out you are trying to type string into a date field, so Meditech is stuck on a warning box.
 
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corinna
Sent: Friday, July 16, 2004 9:00 AM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Client Server shutdown

Are you trying to shutdown Boston Workstation or are you trying to detect if Meditech is shutdown?
 
Thanks,
Corinna Robertson
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rich McNeil
Sent: Friday, July 16, 2004 9:09 AM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Client Server shutdown

I’d suggest adding explicit Pause or PauseLoop commands to exit the session, kind of a reverse of a login script.  I attempt the kind of “shortcut” your script shows whenever I can, but I almost always end up regretting it.

 

Rich McNeil

Boston Software Systems

866 653 5105

www.bostonworkstation.com


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Turner, Peter
Sent: Friday, July 16, 2004 8:57 AM
To: [EMAIL PROTECTED]
Subject: [Talk] Client Server shutdown

 

Meditech's scripting dll has a shutdown function:

 

Function MCSShutdown Lib "MCScript.dll" 

 

Is there something analogous in BWS?

 

I have been trying this:

 

    Do  
      If InStr(UCase(wso.View), UCase("Closed")) > 0 Then
        Exit Do
      End If
      wso.Key "{esc}"
      wso.Wait 2
      DoEvents
    Loop
 

But it seems to sometimes leave me in status of Keying ESC, yet the MT session is closed, so it ends up waiting for Godot.  BSW console does not seem to respond to stops, reset script doesn't get it either.  When it does this - not all the time either, by the way, I have to end task.   

 

Is there a better, more graceful way to bail out?

Reply via email to