Most excellent! Thanks, Thom, for the explanation and the solution!! It
works! I was stumped for the last several days!
 
Gary Hall
Clinical Applications Specialist
Estes Park Medical Center
Information Systems Department
970-577-4443
 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: Monday, July 16, 2007 9:22 AM
To: [email protected]
Subject: RE: [Talk] Dialog box not recognized second time??



Greetings,

Hard to see what's happening without the script by my guess is that BWS
is seeing this as a duplicate condition. If you are using an At command
- At will not fire for the same condition twice in a row - this is by
design. Basically the At "knows" what it saw last:

So for example let's say there is a dialog box with the text.

Warning

 

If you were to run this snippet of script which simply looks for the
dialog box, it does not close it:

do

If at("[EMAIL PROTECTED],1") then

Msgbox "Seeing Warning!"

End if

Loop

The messagebox would only pop up once, not repeatedly. You may say -
that's not good!  Actually it is, because VB can move MUCH faster than a
screen ever could. So in theory if I had:

do

If at("[EMAIL PROTECTED],1") then

                enter

End if

If at("Good condtion") then

                Exit do

End if

                

Loop

If could send the enter key, loop around, still see the Warning and send
the enter key again it because the screen hasn't moved yet, even though
the key was sent. This would of course cause you to move more than one
field down in Meditech.

 

I wanted to explain all of this fully before I gave you the answer to
fix what you are seeing which is to clear the At by using:

At ""

 

>From the scenario above if I added at""

If at("[EMAIL PROTECTED],1") then

At ""

Msgbox "Seeing Warning!"

End if

Loop

 

The message box would appear repeatedly. 

 

Why did I want to explain this fully first - short answer - DO NOT USE
AT "" except when it is needed - your scenario is about the only time I
can think of when you'd want it in a script.  I have seen people who
have used At "" a lot in their script thinking that was a desirable
thing - it is not - the default behavior is what is desirable.  We
provided the at "" for these situations where the default behavior is
not appropriate.

 

If you are doing this in Rules - the same thing applies, and there is a
Rule clear - Rule ""

Regards,

 

Thom

 

 

 

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary Hall
Sent: Monday, July 16, 2007 11:13 AM
To: [email protected]
Subject: [Talk] Dialog box not recognized second time??

 

Hello, BWS users. I'm using BWS 8.0, with Meditech Magic 5.5 SR2.
Normally works fine, lovely. I'm having an issue with a script in
Meditech's pharmacy module. The first drug I run comes up with a "No
drugs in range. Ok" dialog box. I answer it and move on. The second drug
comes up with the same message -- and Boston does not seem to "see" that
foreground pop-up screen, and blows on through. My logic is identical
for the first occurrence as with the second. Why is it recognizing the
popup the first time, and not the second? Is there something I have to
do to "reset" so that it will work? Thanks!

 

Gary Hall

Clinical Applications Specialist

Estes Park Medical Center

Information Systems Department

970-577-4443

 

  

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 the sender of this communication
immediately.

Reply via email to