Re: Propmpting user to enter Variables
Re: Propmpting user to enter Variables
- Subject: Re: Propmpting user to enter Variables
- From: Michelle Steiner <email@hidden>
- Date: Fri, 13 May 2005 09:03:42 -0700
On May 13, 2005, at 8:36 AM, francois.houle wrote:
Just can't find how to re-prompt the user to enter those
variables... And
obviously they would need to get the Error prompt on any attemp...
set variable_1 to get_variable("Enter this info here.", "This info")
set variable_2 to get_variable("Enter that info here.", "That info")
set variable_3 to get_variable("Enter this info 2 here.", "This info 2")
set variable_4 to get_variable("Enter that info 2 here.", "That info 2")
{variable_1, variable_2, variable_3, variable_4}
on get_variable(prompt, title)
set foo to false
repeat until foo is true
set bar to text returned of (display dialog prompt default
answer "" with title title)
if bar is not "" then
set foo to true
return bar
else
set prompt to "You must enter something; you can't leave
it blank. " & prompt
end if
end repeat
end get_variable
--
You can not change the world without perforce changing yourself.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden