Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:25:46+00:00 2026-06-15T10:25:46+00:00

I have app created (Cocoa-AppleScript Application) that executed a shell command using the value

  • 0

I have app created (Cocoa-AppleScript Application) that executed a shell command using the value of a user-supplied text field and an “install” button. I would like to grow the application to incorporate radio buttons (list) that allow a user to select one or more radio buttons and upon clicking the install button, the correlating command to each radio button will execute. I havent been able to find much info online related to radio buttons and if statements.

I did find this article but it doesnt appear to work with xcode 4:
http://macscripter.net/viewtopic.php?id=24755

  on InstallButton_(sender)
    set hostName to ""
    set hostName to textField's stringValue as string
    do shell script ("/usr/sbin/scutil --set HostName " & hostName) with administrator privileges
    do shell script ("/usr/sbin/scutil --set ComputerName " & hostName) with administrator privileges
   #IF RADIO BUTTON 1 IS SELECTED
         RUN COMMAND1
   #IF RADIO BUTTON 2 IS SELECTED
         RUN COMMAND2
end InstallButton_
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:25:46+00:00Added an answer on June 15, 2026 at 10:25 am

    I wasnt able to find a solution using a radio button (list) but I was able to find out how to get the exact result using checkboxes. property checkBox :

    missing value set checkBoxValue to "" 
    set checkBoxValue to checkBox's integerValue as string 
    #display dialog checkBoxValue 
    if checkBoxValue = 1 
    #run policy 
    end 
    

    if the checkbox is checked the checkBoxValue parameter = 1 if it is not checked the value is 0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a cocoa-touch app, using the core data framework. I've created a xcdatamodel
I have created a Cocoa document based picture drawing application. I want that the
I have created an app in C# .Net 2.0 that uses the AxShockwaveFlash object
I have created an app to standardize user creation for our AD domain. Now
I have created an app that uses NSTimer, which gets triggered each second. My
I have created Cocoa app which is type of launch agent. To distribute this
I have some processing in my Cocoa app that sometimes ends up calling through
Environment: xcode 3.2.1, document-based core-data application. I have a document-based cocoa app which uses
I am using Xcode to create an Objective-C, cocoa, mac app. I have a
Let's say I just created a Cocoa application. I have three files: AppDelegate.h, AppDelegate.m,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.