Greetings,
The code as written will generate a Type Mismatch error (a Visual Basic
syntax error), since you're using Object Format scripting, this general
VB syntax error is firing your error handler, making it appear to you as
if this is a negative hit on the cursor location.
Change your code to reflect the following and you should be all set -
the Do - Loop is required to have At work consistently (your script
could move past the At condition) - so always use a loop.
Do
If M.At("@9,6") Then
M.Pause "@9,6"
M.Key Chr(8) ' Back Space
M.Pause "@9,6"
M.Key Chr(11) ' shift tab
M.Pause "@9,1"
M.Key Chr(8) ' back space
M.Key "{Tab}"
End If
If M.At("@9,1") Then
M.Key Chr(8) ' back space
M.Pause "@9,1"
M.Key Chr(9) ' tab
End If
Wait 1
Loop Until M.At ("Screen condition, or cursor location when I know that
I am finished looking for the above")
Regards,
Thom
Thom C. Blackwell
Boston Software Systems
978 499-8722
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, December 05, 2003 9:17 AM
To: [EMAIL PROTECTED]
Subject: [Talk] Simple If statements @
Is there something wrong with checking to see if your curser is in
position
"A" or "B" ?
I have the following code, and when it gets a negative, it drops out of
the
sub routine as an error
If "@9,6" Then
M.Pause "@9,6"
M.Key Chr(8) ' Back Space
M.Pause "@9,6"
M.Key Chr(11) ' shift tab
M.Pause "@9,1"
M.Key Chr(8) ' back space
M.Key "{Tab}"
End If
If "@9,1" Then
M.Key Chr(8) ' back space
M.Pause "@9,1"
M.Key Chr(9) ' tab
End If
I am a bit confused and help would be great, I hate calling Rich for
every question.
Bruce