Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Change state of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 1586 of 1643
Post > Topic >>

Change state of NSbutton (checkbox) in applescript

by Florian <fidel@[EMAIL PROTECTED] > Mar 18, 2008 at 02:49 PM

Hello

my first post in this list...so hello to everyone and thanks for
taking a look into this post.

i am working on a small AppleScript application. I am using XCode and
the Droplet template.
At the moment i am working on the preference dialog of my application.
The Preference window is a usual window named "myWindow" in
applescript.
My nsbutton checkbox on that window is "checkBoxStatistics" in
applescript

while launching my application i am reading the values of my .plist
file to set the UI-elements of the preference window according to the
stored values.

basicaly i can read those values from the plist, but i cant set the
state of my NSbutton checkbox.

I have tested this code:
-----------
on launched
-- some code
--
-- Here i want to change the status of a checkbox -> NSbutton
-- where:
-- myWindow is the As name of the window (not displayed at this
moment)
-- checkBoxStatistics is the AS name of my NSbutton checkbox
-- i have tried:
if myVAR is false then
-- idea 1:
set integer value of button "checkBoxStatistics" to 0
-- idea 2:
set string value of button "checkBoxStatistics" to "0"
-- idea 3:
tell window "myWindow" to set state of button "checkBoxStatistics" to
0
end if
end launched
-----------

ok i have tested many other combinations but without luck.

Is it possible in general to change the state of a NSbutton (i call it
checkbox) within applescript ?
If yes is it limited in i.e. that the window itself has to be
displayed while running the change-code ?
Is there something like re-init command, to get the ui restarted/
reloaded ?

Wondering what i am doing wrong right now.

Any ideas / suggestions ?
Best regards
florian
 




 6 Posts in Topic:
Change state of NSbutton (checkbox) in applescript
Florian <fidel@[EMAIL   2008-03-18 14:49:47 
Re: Change state of NSbutton (checkbox) in applescript
iterate5@[EMAIL PROTECTED  2008-03-18 23:15:35 
Re: Change state of NSbutton (checkbox) in applescript
Florian <fidel@[EMAIL   2008-03-18 15:40:54 
Re: Change state of NSbutton (checkbox) in applescript
iterate5@[EMAIL PROTECTED  2008-03-19 01:19:11 
Re: Change state of NSbutton (checkbox) in applescript
Florian <fidel@[EMAIL   2008-03-19 03:15:30 
Re: Change state of NSbutton (checkbox) in applescript
Florian <fidel@[EMAIL   2008-03-19 12:23:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 13:47:30 CDT 2008.