• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using results of dialogs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using results of dialogs?


  • Subject: Using results of dialogs?
  • From: Alex Hall <email@hidden>
  • Date: Fri, 16 May 2014 16:27:37 -0400

Hi all,
I'm writing a script for a friend. It first prompts for a string, then for a selection from a list, then another string. On each dialog I have a check to be sure the user didn't cancel, which i just added. Now that I have that, though, the line after the check, where I grab the result, gives me an error that "result" is undefined. Do the results of these prompts go away after one use?

Here's my code. I've placed a double percent sign on the line that throws the error.

set btn_ok to "OK"
set btn_next to "Next"
set btn_cancel to "Cancel"
set btnList_nextCancel to {btn_next, btn_cancel}

display dialog "Enter the name of the folder to be searched. Capitalization does matter: " default answer "Sent" with title "Folder to Search" buttons btnList_nextCancel default button 1 cancel button 2
if button returned of result = btn_cancel then
return false
end if
%% set targetMailbox to text returned of result as text


--
Have a great day,
Alex Hall
email@hidden




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using results of dialogs?
      • From: "koenig.yvan" <email@hidden>
  • Prev by Date: Re: My WWDC/birthday wish
  • Next by Date: Re: Using results of dialogs?
  • Previous by thread: Re: My WWDC/birthday wish
  • Next by thread: Re: Using results of dialogs?
  • Index(es):
    • Date
    • Thread