I try to make a little tool, but i need 3 Checkboxes to select the options. I cant C or C+ or something else, only a bit in applescript. My Tools i did make it before in applescript and want to use it here too. cause they are to complex.
what i did.
a new project in xcode, a cocoa-applescript application.
did build in MainMenu with 3 checkboxes to select each option.
two buttons to cancel or to start.
my plan is, that the user can select one, two or all three option.
and with the start button the applescripts are start and a message on the screen.
here the code of one check button
property theLabel1 : missing value – connect to the label text field
property del1 : missing value – connect to the label text field
theLabel2’s setStringValue_(“Your Option”)
what i need is to get into a variable if its on or off. so that i can select for the script and for the message.
maybe i am to stupid, but try it now over two weeks to find a little script or help. but all is only for the cocoa app and not AppDelegate.applescript.
i hope you may help me here my last hope !
Model: MacBook Pro
Browser: Safari 536.28.10
Operating System: Mac OS X (10.8)
In Interface Builder select the first check box
Press âŒ¥âŒ˜7 to show the Bindings Inspector
Click on the disclosure triangle next to Value
In the pop up menu next to Bind to select the App Delegate entry
Click the check box next to Bind to to enable it.
Leave Controller Key empty
type checkbox1 into the Model Key Path field and press return (in the parentheses to the right of Value must appear .checkbox1 at the end)
Do the same thing for the other check boxes (connect to checkbox2 and checkbox3)
then you can simply write
if checkbox1 is true then theLabel2's setStringValue_("Your Option")
In a AppleScriptObjC environment the syntax state of button “Checkbox1” of window “Main” is invalid
the name doSomething will appear in Interface Builder in the Connections Inspector (âŒ¥âŒ˜6) as a Received Action
after selecting the App Delegate blue cube. Connect the selector of the checkbox to the action
The handler gets called when the check box is clicked.
The parameter sender is a reference to the check box
Where did you get 4.6.3 from? The actual version is 4.6.2
either select the check box and control-drag the selector (the Sent action) to the App Delegate blue cube,
or select the blue cube and drag from the circle of the handler name (the Received Action) to the check box
property parent : class "NSObject"
property theLabel1 : missing value -- connect to the label text field
property theLabel2 : missing value -- connect to the label text field
property Checkbox1 : false
-- property Checkbox2 : false
-- property Checkbox3 : false
property Main : false
theLabel1's setStringValue_("Your Option")
if Checkbox1 is true then theLabel2's setStringValue_("Your Option")
if Checkbox1 is false then theLabel2's setStringValue_(" ")
Thank you very much !! I could solve it all and it works as i wish. A Great tool for me and the Support.
Oe question ist left. sorry.
When i build the App it work well. But when i look inside the app, i can find the sourcecode of “AppDelegate.scpt” as clear text. can i decode it, so that nobody else may copy my source code ?