Second newbie question

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
adunaway
Newbie
Posts: 11
Joined: Tue Sep 05, 2006 2:05 pm

Second newbie question

Post by adunaway » Wed Sep 06, 2006 3:39 pm

I am trying to use the GetCheckBox function. The function keeps returning a -1 code indicating an error.

I believe (but am not sure) this is because the object_caption contains the letters "Non" which is also a system word that turns the number lock on.

When I ran the script in debugger, the "Non" appeared in blue text, while the rest of it appeared black. Only commands appear in blue, this is why I think this is the problem. Is there a way to let the application know that "non" is a literal piece of text and not a function/command?

here is the script...

GetCheckBox>Order Processing,Non-Interrupted Mode,res
If>res=1,checked,unchecked
Label>checked
SetCheckBox>Order Processing,Non-Interrupted Mode,FALSE
Goto>end
Label>unchecked
SetCheckBox>Order Processing,Non-Interrupted Mode,TRUE
Label>end

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Sep 06, 2006 3:48 pm

In this context it makes no difference - ignore the colour. Non will be treated as part of the string here, so don't worry about that. That isn't the problem.

The fact is that GetCheckBox is not always able to work. A whole host of technical reasons means there can be no guarantee.

However, you may have missed the accelerator key. One of the characters in the caption may be underlined when you hit the ALT key? Which one is it. This one needs to be preceeded with the & character. E.g. if N is underlined when you press ALT you need to enter:

GetCheckBox>Order Processing,&Non-Interrupted Mode,res

If this doesn't help you could send us a screen shot. Also use Tools/View System Windows tool to see what the object classes and captions are.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

yodrako
Newbie
Posts: 6
Joined: Sun Sep 03, 2006 5:48 pm

Post by yodrako » Wed Sep 06, 2006 7:30 pm

ups

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