I need to make a dialog box that will let you enter the name of an ichat account. When you enter it, it will see if it exists. How can I make it ask until iyou enter a name that actually exists as an account?
set nameBuddy to the text returned of (display dialog "Enter the Buddy Name" default answer "buddy name")
tell application "iChat"
exists account nameBuddy
end tell