Using results of dialogs?
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
|
_______________________________________________
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