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

  • SEARCH
  • Home
  • 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 8449117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:36:58+00:00 2026-06-10T10:36:58+00:00

I am new to apple scripting and I have a simple apple script which

  • 0

I am new to apple scripting and I have a simple apple script which does below-

display dialog "Enter Your User Name:" default answer ""
set theUser to the text returned of the result

Now if the user enters nothing and clicks OK I do a check something like

if theUser = "" then
    display dialog "User name is mandatory" buttons {"OK"} with title "Missing parameter" with icon "stop"
    set theError to button returned of the result
    if theError is "OK" then quit
end if

But it gives me a Resource wasn't found. error popup when the if condition is checked. I have tries theUser is in {"",value missing}, theUser is missing value etc. but these don’t work either. Whats wrong here?

  • 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-10T10:37:00+00:00Added an answer on June 10, 2026 at 10:37 am

    Stop should not be in quotes. I assume that you want the script to stop executing when you send a “quit” command. You can accomplish this by adding a cancel button parameter.

    display dialog "Enter Your User Name:" default answer ""
    set theUser to the text returned of the result
    
    if theUser = "" then
        display dialog "User name is mandatory" buttons {"OK"} default button {"OK"} cancel button {"OK"} with title "Missing parameter" with icon stop
    end if
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

function Apple(){ this.name=apple; } function Orange(){ this.name=orange; this.apple = new Apple(); this.apple.onCalled=function(){ alert(this.name); }
I want to know that does apple's Push Notification Server generate new device token
If you have text coming from a database such as: New Apple TV Offers
Am new to Apple Push Notification services in iPhone app. I have learned these
Does Apple accept Python applications for distribution on the new Mac App Store? If
We have got the new Apple editor Xcode 4, I found some features from
I have a script that: creates a new folder scans an InDesign document for
I have a simple class Apple extends from another simple class Fruit. At run-time,
I am very new to Apple scripting so please bear with me. I need
Due to the new Apple guidelines we are forced to remove UDID. I've found

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.