Source language: Translate to:

a quick question

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

a quick question

Postby stevec » Fri Mar 06, 2015 5:04 pm

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;
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: a quick question

Postby Gaev » Fri Mar 06, 2015 5:48 pm

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).
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: a quick question

Postby mishem » Fri Mar 06, 2015 5:53 pm

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


...
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: a quick question

Postby stevec » Fri Mar 06, 2015 6:21 pm

AWESOME!!!!!

thanks;
Steve
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron