Would this work to replace my earlier code that uses At?
Public Sub PositionIt(PauseCondition As String)
'This subroutine will take a given pause condition and send
'the {Enter} key until that pause condition is met
Do Until Rule(PauseCondition)
Stable 0.2
Enter ""
DoEvents
Loop
End Sub
Old Code:
Public Sub PositionIt(PauseCondition As String)
'This subroutine will take a given pause condition and send
'the {Enter} key until that pause condition is met
At ""
Do Until At(PauseCondition)
Enter ""
Wait 0.5
At ""
Loop
End Sub
Thank you,
Mitch Lawrence
Lead Applications Analyst
Technical Support - NPR/Automation
CHRISTUS Information Management
(tm): [EMAIL PROTECTED]
Send a "thank you" to someone!
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: Friday, March 21, 2008 4:30 PM
To: [email protected]
Subject: RE: [Talk] Using AT() with Select Case
Greetings,
Sure you can just have a cursor location in a Rule. We just default in
the
Title. You can toggle it off prior to building or edit the condition
afterwards. You can also have more than the two conditions - this and
this
on the screen etc.
Just be sure that it doesn't overlap with another field on a different
screen! The duplicate conditions check would not flag:
Rule "@20,20"
Rule "[EMAIL PROTECTED],20"
As duplicates... even though they sort of are.
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com
Sign up for my weekly webinar!
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.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lawrence,
Mitchell
Sent: Friday, March 21, 2008 5:25 PM
To: [email protected]
Subject: RE: [Talk] Using AT() with Select Case
Sound logic. Of course now I need to modify my PositionIt sub:
Public Sub PositionIt(PauseCondition As String)
'This subroutine will take a given pause condition and send the
{Enter}
'key until that pause condition is met
At ""
Do Until At(PauseCondition)
Enter ""
Wait 0.5
At ""
Loop
End Sub
Although it would be a bit more difficult as I only pass something like
"@21,53" or "@18,32", etc. to the sub.
Will rules process without a window title? Such as Rule("@21,53")?
If so, I think I can make this one just like the other one, using Case
Is.
Thank you,
Mitch Lawrence
Lead Applications Analyst
Technical Support - NPR/Automation
CHRISTUS Information Management
(tm): [EMAIL PROTECTED]
Send a "thank you" to someone!
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: Friday, March 21, 2008 4:19 PM
To: [email protected]
Subject: RE: [Talk] Using AT() with Select Case
Greetings,
Um... I read an "Is Case" as the same thing as an If? ...
Clearing the At - or Rule is a potentially dangerous thing to do and
should
not be done without a really, really, really good reason to do so -
here's
why.
The At / Rule command has built in logic to not allow you to see the
same
thing twice in a row. This is a VERY good thing and is not something to
override lightly. I've seen countless times where folks put in at"" in a
loop, and it caused them all sorts of grief tracking down why something
"odd" happened one day. This is an insidious problem to track down
because
in debug mode it will work perfectly.
Keep in mind that a screen may not move as quickly as a script can - so
you
very well could say:
Do
if at("Here") then Enter "Y"
At""
Loop until at("There")
And the loop spin so fast that the screen didn't "take" the Y yet and it
still be at here! Protecting against seeing the same thing twice
protects
you from this - clearing it takes this protection away.
All this stuff is why I like the Rules format especially for conditional
statements :`)
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com
Sign up for my weekly webinar!
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.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Palmer
Sent: Friday, March 21, 2008 4:50 PM
To: [email protected]
Subject: RE: [Talk] Using AT() with Select Case
If you decide to go with the Select Case statement be sure to put At("")
at
the end of each Case block. If you don't clear At() it continues to
look
for the same text.
--
Bill Palmer
Financial Coordinator, Information Systems
Mid-Columbia Medical Center
The Dalles, OR 97058
541-296-7417
>>> On 3/21/2008 at 10:33 AM, in message
<[EMAIL PROTECTED]>,
"Lawrence,
Mitchell" <[EMAIL PROTECTED]> wrote:
> Yeah I know, but I want to stick the whole portion of my scripts where
I
> log into Meditech within a subroutine that I can export to all my
> projects.
>
>
>
> We run both version 5.4 and version 5.5 Meditech C/S and some Meditech
> login screens include the background bitmap during login and some do
> not, which changes the placement of the input fields.
>
>
>
> I'm trying to build a "one subroutine to rule them all" type of deal
> here.
>
>
>
> In my rules script I'll just have
>
>
>
> Always LoginMT
>
>
>
> and then my LoginMT() sub will handle the reading of the screen and
> entering in the universe, hcis, username, and password and hand back
to
> the script to continue on from there.
>
>
>
>
>
> Thank you,
>
> Mitch Lawrence
>
> Lead Applications Analyst
>
> Technical Support - NPR/Automation
>
> CHRISTUS Information Management
>
> *: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
>
>
> Send a "thank you
> <http://intranet.christushealth.org/spiritBuck/Default.asp> " to
> someone!
>
> ________________________________
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Thom C.
Blackwell
> Sent: Friday, March 21, 2008 12:20 PM
> To: [email protected]
> Subject: RE: [Talk] Using AT() with Select Case
>
>
>
> Greetings,
>
>
>
> I'd go with If statements using the Rule command:
>
>
> if Rule("cond1&cond2")...
>
>
>
> This would also allow you to use:
>
> If Rule("Timeout") instead of using a loop counter.
>
>
>
> You can see the current row , column using the properties Row and Col
>
> And the View command will return data from the screen.
>
>
>
> But to me, doing that is basically reinventing the Rule command...
>
>
>
> Regards,
>
> Thom
>
>
>
> Thom C. Blackwell
>
> Product Manager
>
> Boston Software Systems
>
> (866) 653-5105 ex 807
>
> www.bossoft.com <http://www.bossoft.com/>
>
> Sign up for my weekly webinar!
> <http://www.bostonworkstation.com/customer_center/special_events.aspx>
>
>
>
> 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 Lawrence,
> Mitchell
> Sent: Friday, March 21, 2008 1:10 PM
> To: [email protected]
> Subject: [Talk] Using AT() with Select Case
>
>
>
> Has anyone used the AT command with a Select Case statement?
>
>
>
> I would like to do something along the lines of the following:
>
>
>
> Do Until At ("[EMAIL PROTECTED],1")
>
> Select Case At(ScreenCondition)
>
> Case "Select [EMAIL PROTECTED],1&@2,0"
>
> Enter MTUniverse
>
> Wait 0.5
>
> Case "[EMAIL PROTECTED],1&@20,0"
>
> Enter MTUsername
>
> Wait 0.5
>
> Case "[EMAIL PROTECTED],1&@21,0"
>
> Enter MTPassword
>
> Wait 0.5
>
> Case "[EMAIL PROTECTED],1&@22,0"
>
> Enter MTLiveHCIS
>
> Wait 0.5
>
> End Select
>
> Wait 0.5
>
> LoopCount = LoopCount + 1
>
> If LoopCount = 120 then
>
> Exit Do
>
> End If
>
> Loop
>
>
>
> I know the above isn't right. Likely I need to be doing something
else.
> Is there a function to read the current screen? Would it be better to
> just do a bunch of if statements?
>
>
>
>
>
> Thank you,
>
> Mitch Lawrence
>
> Lead Applications Analyst
>
> Technical Support - NPR/Automation
>
> CHRISTUS Information Management
>
> *: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
>
>
> Send a "thank you
> <http://intranet.christushealth.org/spiritBuck/Default.asp> " to
> someone!
>
>