Title: Message
At works like a variable. The script will assign the value it sees in your message (At = "Device Not in Use"). So depending upon what it's set to after your first section - the script will use that value for any other sections using At.
 
When I'm watching for an alert message from Meditech I use always use
If View(Row:=1, col:=1, length:=7) = "Warning" Then
  xxx
Else
  xxx
End If
 
Then I don't have to clear the At. The only thing I find with this is that I must put a Stable 2 before each view message statement or the script runs by the message too quickly and doesn't see it.
 
(this is with Meditech Client server - I don't think it would be much different from Magic though)
 
Michelle

617-665-3432 office
617-546-7770 pgr
Clinical Application Analyst
Information Technology Dept.
[EMAIL PROTECTED]
-----Original Message-----
From: White, Scott A [mailto:[EMAIL PROTECTED]
Sent: Friday, October 22, 2004 8:35 AM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Variable not updating

Hello and thank you to everyone who responded (including the phone call that I missed last night).
 
This solution was tested 5 times and worked like a charm every time.
I don't understand why I'd have to use the At"" after assigning a value to unique variables encountered
in each If statement; but it works.
 
Thanks again and I hope you all have a great weekend.
Scott
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Barker-Lacerda , Michelle
Sent: Friday, October 22, 2004 8:01 AM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Variable not updating

Hi Scott,
Try clearing your At between each section.
 
Pause "Device"
Enter "MODEM.1"
    Wait 2
    If At("Device is not in use") Then
    M1Result = "Modem.1 Not In use at this time"
    Else: M1Result = "Modem.1 is in use on " & mydate
    End If
    Key "{F11}"
    Wait 1
    At""

        Enter "MODEM.2"
            Wait 2
            If At("Device is not in use") Then
            M2Result = "Modem.2 Not In use at this time"
            Else: M2Result = "Modem.2 is in use on " & mydate
            End If
            Key "{F11}"
            Wait 1
             At""
            
            Enter "MODEM.3"
                Wait 2
                    If At("Device is not in use") Then
                    M3Result = "Modem.3 Not In use at this time"
                    Else: M3Result = "Modem.3 is in use on " & mydate
                    End If
                    Key "{F11}"
                    Wait 1
                    At""
 
Michelle
 
617-665-3432 office
617-546-7770 pgr
Clinical Application Analyst
Information Technology Dept.
[EMAIL PROTECTED]
-----Original Message-----
From: White, Scott A [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 4:28 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Variable not updating

Oddly enough,
I used this logic, which did make the : go away.
Now the script produces random RESULTS..... even when a device is not in use
I still get the Else statement to evaluate and populate the message.
 
Thank you for helping me to get rid of the : though.
 
Still need the system to actually evaluate the If, Then, Else statement correctly.
 
Very strange?!?!?!?!???
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Larry Briggs
Sent: Thursday, October 21, 2004 4:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Variable not updating

can you change
...
    Else: M1Result = "Modem.1 is in use on " & mydate
    End If
 
to
    ...
    Else
     M1Result = "Modem.1 is in use on " & mydate
    End If
 
?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of White, Scott A
Sent: Thursday, October 21, 2004 4:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [Talk] Variable not updating

Yes; but each time I tried to take the : out after the Else, VB would put it back in again.
 
I'm stumped!!!!
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Adams,Ernest
Sent: Thursday, October 21, 2004 4:02 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Talk] Variable not updating

Scott:
 
The problem is the colon following the Else.  VB thinks "Else:" is a label rather than an else clause of the If.
 
Pax,
Ernest 21 Oct 04
-----Original Message-----
From: White, Scott A [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 3:55 PM
To: [EMAIL PROTECTED]
Subject: [Talk] Variable not updating

Hello,
I've got a small script that runs well except for the result of M2Result and M3Result
seen below.  The script will run and send the results to me in MOX; but it ALWAYS
sends me the  Modem.2 is in use on " & mydate and Modem.3 is in use on " & mydate
 
Oddly enough, Modem.1 sends the correct info.  Can you tell by looking at this, why it
wouldn't evaluate the If statements?  None of the devices have been in use all day; but
my script ignores that for Modem.2 and Modem.3 .  I've even initialized all three at the
beginning of the procedure.
 
 
 
Pause "Device"
Enter "MODEM.1"
    Wait 2
    If At("Device is not in use") Then
    M1Result = "Modem.1 Not In use at this time"
    Else: M1Result = "Modem.1 is in use on " & mydate
    End If
    Key "{F11}"
    Wait 1
   
   
   
        Enter "MODEM.2"
            Wait 2
            If At("Device is not in use") Then
            M2Result = "Modem.2 Not In use at this time"
            Else: M2Result = "Modem.2 is in use on " & mydate
            End If
            Key "{F11}"
            Wait 1
           
           
           
                Enter "MODEM.3"
                Wait 2
                    If At("Device is not in use") Then
                    M3Result = "Modem.3 Not In use at this time"
                    Else: M3Result = "Modem.3 is in use on " & mydate
                    End If
                    Key "{F11}"
                    Wait 1
                     
 
 
Thank you,
Scott 

 


CONFIDENTIALITY NOTICE: This e-mail communication and any attachments
may contain confidential and privileged information for the use of the
designated recipients named above.  If you are not the intended
recipient, you are hereby notified that you have received this communication in
error and that any review, disclosure, dissemination, distribution or copying
of it or its contents is prohibited. If you have received this
communication in error, please notify Saratoga Hospital immediately by e-mail at
[EMAIL PROTECTED] and destroy all copies of this communication
and any attachments.

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited. ZirMed, Inc. has strict policies regarding the content of e-mail communications, specifically Protected Health Information, any communications containing such material will be returned to the originating party with such advisement noted. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

<<image001.jpg>>

Reply via email to