Page 1 of 1

a quick question

PostPosted: Fri Mar 06, 2015 5:04 pm
by stevec
I was wondering if it was possible to have a 'button' place a checkmark in a 'checkbox'?

I have tried

If "[Message]" "<>" "checked"
FocusObject "Message"
clickMouse
Else
EndIf

Thanks;

Re: a quick question

PostPosted: Fri Mar 06, 2015 5:48 pm
by Gaev
Steve:

From the Help documentation ...
You can select or unselect a Check Box at runtime like this:

SetVar "[CheckBox1]" "Checked"

SetVar "[CheckBox1]" ""

... so, assuming that the "Variable: (to store Button Status)" associated with the CheckBox is called [Message], try ...
Code: Select all
If "[Message]" "=" ""
   SetVar "[Message]" "Checked"
EndIf

... this will work as well ...
Code: Select all
SetVar "[Message]" "Checked"

... since you want it to be "checked" (whether it is currently "checked" or not).

Re: a quick question

PostPosted: Fri Mar 06, 2015 5:53 pm
by mishem
Code: Select all
If "[Message]" "<>" "checked"

    SetVar "[Message]" "checked"

    Else

    SetVar "[Message]" ""

Endif


or

Code: Select all
If "[Message]" "=" ""

    SetVar "[Message]" "checked"

    Else

    SetVar "[Message]" ""

Endif


or

Code: Select all
If "[Message]" "=" ""

    SetVar "[Message]" "1"

    Else

    SetVar "[Message]" ""

Endif


...

Re: a quick question

PostPosted: Fri Mar 06, 2015 6:21 pm
by stevec
AWESOME!!!!!

thanks;
Steve