PDA

View Full Version : Applescript Help




jaikob
Mar 24, 2009, 05:09 PM
I am creating an application, in interface builder I have a main window called "main". I then have a checkbox called "checkbox" and a button. I have created an button.applescript file, and linked it to "On Click" on the button on the main window.

What I want to do is this:

If the checkbox is checked when the button was clicked, I want it to:
display dialog "Checked!"
and if its not checked, I want it to:
display dialog "Not Checked!"

I cannot seem to get it, and this is the only hurdle I am trying to overcome.

Thanks to all that help me :)



neutrino23
Mar 26, 2009, 10:15 PM
Are you creating a text area in the window where you display this text or are you just invoking the Applescript display dialog command? I have done a few Applescript Studio projects in the past. If you write the string to some sort of display widget in the window it should work fine. Just for fun, instead of invoking the command try having your script run an Applescript that just does a display dialog with the appropriate string. Because of the way that Studio works I wonder if they didn't disable that command.?