GetRectCheckSum cannot use variables?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
davek1024

GetRectCheckSum cannot use variables?

Post by davek1024 » Thu Nov 27, 2003 9:01 pm

The following seems to indicate that variables don't work with GetRectCheckSum???
----
let>x1=20
let>y1=40
let>y1=30
let>y2=50
GetRectCheckSum>20,40,30,50,cs1
GetRectCheckSum>x1,y1,x2,y2,cs2
GetRectCheckSum>%x1%,%y1%,%x2%,%y2%,cs3
messageModal>%cs1% %cs2% %cs3%

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Nov 28, 2003 1:04 am

Hi davek1024,

Before pointing a finger to the variables, I would like to present my discovery. Referring to the following script:
Let>VAREXPLICIT=1
Let>cs1=0
Let>cs2=0
Let>cs3=0
let>x1=20
let>y1=40
let>x2=30
let>y2=50
GetRectCheckSum>20,40,30,50,cs1
GetRectCheckSum>x1,y1,x2,y2,cs2
GetRectCheckSum>%x1%,%y1%,%x2%,%y2%,cs3
message>%cs1% %cs2% %cs3%

The 3 results show up as normally you would expect. So, who are the culprits? Well, they are the invisible spaces trailing after variables x1, y1, x2, and y2. There's a simple way to annihilate all naughty trailing spaces. Presuming you're using Macro Script's built-in editor, press ALT+E, R. Now you're home free.

Happy scripting.

davek1024

Post by davek1024 » Fri Nov 28, 2003 1:18 am

Thanks, that seems to have solved the problem. So I gather that even if you can use the 'arrow' keys to try to detect trailing spaces, they are there even if you can't detect them?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Nov 28, 2003 1:41 am

Perhaps also create x2?
The following seems to indicate that variables don't work with
GetRectCheckSum???
----
let>x1=20
let>y1=40
let>y1=30........................Make me into x2
let>y2=50
GetRectCheckSum>20,40,30,50,cs1
GetRectCheckSum>x1,y1,x2,y2,cs2
GetRectCheckSum>%x1%,%y1%,%x2%,%y2%,cs3
messageModal>%cs1% %cs2% %cs3%
Re:
So I gather that even if you can use the 'arrow' keys to try to detect trailing spaces, they are there even if you can't detect them?
In the Editor, two tools to help with this:
1. Click on Edit, Show All Chars to see trailing spaces.
2. Clickk on Edit, Remove Trailing Spaces to remove them.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts