Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Add words to the spelling dictionary via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add words to the spelling dictionary via AppleScript
Authored by: DougAdams on May 03, '07 08:18:07AM
If I may suggest: actually you don't need the "until" or finished variable at all. The routine would work just as well as:
set additions to ""
repeat
	display dialog "Enter the next word to add to the user dictionary." & return & 
		"Press the Finished button when you're finished" with title 
		"Add words to spelling dictionary" default answer 
		"" buttons {"Cancel", "Finished", "Add word"} default button 3
	if button returned of the result is "Finished" then
		exit repeat
	else
		set additions to (additions & the text returned of the result as text) & (ASCII character 0)
	end if
end repeat
No matter what, the only two ways out of the loop are to click "Finished" or "Cancel", the latter aborting the script entirely.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/

[ Reply to This | # ]