Thursday, July 19, 2018

#1 2003-03-31 02:26:16 am

noodlez3k
Member
From:: LA, CA
Registered: 2003-03-09
Posts: 2
Website

value of check box

hello,

I'm having trouble getting the value of a check box.

Applescript:

set copysongs to value of check box "ccopy" of window "mainwin"

I get an error saying "expected end of line, ect. but found class name"

Thanks in advance,
Kevin

Offline

 

#2 2003-04-02 03:48:34 pm

rmhiggins
Site Admin
Registered: 2002-12-09
Posts: 25
Website

Re: value of check box

Kevin,

Check boxes are buttons. As a checkbox they have a checked and unchecked state. You can check the state of the button and if it returns 1 it is checked, 0 if unchecked. Therefore give this code a try:

Applescript:

set copysongs to state of button "ccopy" of window "mainwin"

HTH
~Ross

Offline

 

#3 2003-04-06 01:24:57 pm

JBadger
Member
From:: Calgary, Alberta
Registered: 2002-12-08
Posts: 12
Website

Re: value of check box

I think you can also refer to the contents of the button, like so:

Applescript:


set copysongs to contents of button "ccopy" of window "mainwin"

It should return true or false, depending on the state of the button. I'm unsure what would happen if you had a mixed state checkbox though.

Anyway, this way works for me. Good luck!

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)