Does the Key "@_KILLMEDITECH" command not work?

Russell Duckworth
Financial Systems Analyst
Arkansas Children's Hospital
1 Children's Way, MS 400
Little Rock, AR 72202
Phone: (501) 364-1040
Fax: (501) 364-6859

________________________________
From: [email protected] [mailto:[email protected]]
Sent: Friday, February 26, 2010 8:56 AM
To: [email protected]
Subject: [talkbws] Closing Meditech CS 5.6 winodws

There is no clean way to close all the windows in Meditech CS 5.6.  I'm using 
this code to close all the  windows but it is inconsistent.  Any thoughts?

Public Function KillMeditech(Optional User As String = "AUTOMATE") As String

    
'-----------------------------------------------------------------------------
    'Kill all the windows that contain a user's mnemonic
    
'-----------------------------------------------------------------------------
        Dim lw As New CListWindows
        Dim cgw As New CGetWindow
        Dim pvarWindow As Variant

        
'-----------------------------------------------------------------------------
        'loop through all the running applications
        'only kill meditech sessions.
        
'-----------------------------------------------------------------------------
            For Each pvarWindow In lw.HasCaption
                Debug.Print WindowText(pvarWindow)
                If InStr(UCase(WindowText(pvarWindow)), UCase(User)) > 0 _
                    And InStr(UCase(WindowText(pvarWindow)), "WORKSTATION") = 0 
Then
                    Activate WindowText(pvarWindow), True
                    Wait 2
                    SendKeys "%{F4}", True  'DIE
                    Wait 5
                End If
                If InStr(UCase(WindowText(pvarWindow)), "MEDITECH") > 0 _
                    And InStr(UCase(WindowText(pvarWindow)), "WORKSTATION") = 0 
Then
                    Activate WindowText(pvarWindow), True
                    Wait 2
                    SendKeys "%{F4}", True  'DIE
                    Wait 5
                End If
            Next
            Key "@_CLOSE"
Cleanup:
    CleanObject lw, cgw
End Function


At Your Service,

Mark A. Albertson
Bertfish Medical Center
Program Analyst II
[email protected]<mailto:[email protected]>
386.424.6499
Behind every challenge is a Goal


This e-mail or the documents accompanying this e-mail contain information that 
may be confidential and/or privileged. It may also be prohibited from 
disclosure under applicable law. The opinions expressed are those of the sender 
and do not necessarily represent the policy or positions of Bert Fish Medical 
Center. The information is intended to be for the use of the individual or 
entity named on this transmission. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is without authorization and is prohibited. If you have received 
this e-mail in error, please notify us immediately so that we can take action 
to correct the problem.


---
To post a message to this list, send mail to: [email protected]

You are currently subscribed as: [email protected]

Unsubscribe in the customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
This transmission is for the use of the individual or entity named on this 
e-mail.  Unauthorized disclosure or access may be prohibited by Public Law 
99-474 (The Computer Fraud and Abuse Act of 1986), Public Law 104-294 (National 
Information Infrastructure Protection Act of 1996), 18 U.S.C. 1030, or other 
applicable criminal laws, and can result in administrative, disciplinary or 
criminal proceedings.  This mail system, including this transmittal, may be 
internally monitored for all lawful purposes, including ensuring compliance 
with applicable privacy and security rules as specified by HIPAA and internal 
Bert Fish Medical Center policies.  Transmission of unencrypted Protected 
Health Information is prohibited.  Please reply to sender or contact Compliance 
at (386) 424-6470 if you have received this in error.

******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
The information contained in this message may be privileged and confidential
and protected from disclosure. If the reader of this message is not the 
intended recipient, or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify 
us immediately by replying to the message and deleting it from your computer.
Thank you.


---
To post a message to this list, send mail to: [email protected]

You are currently subscribed as: [email protected]

Unsubscribe in the customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx

Reply via email to