Propmpting user to enter Variables
Propmpting user to enter Variables
- Subject: Propmpting user to enter Variables
- From: "francois.houle" <email@hidden>
- Date: Fri, 13 May 2005 11:36:05 -0400
Hi,
I have four variables that the user gets prmpted for when a script begins...
However I have added a section aftet hat to check if any of the fields are
left empty, and if so it would offer then to either cancel the script or try
to enter the variables again...
For now it looks like this:
Set variable_1 to the text returned of (display dialog "enter this info
here" default answer "" with title "This info")
Set variable_2 to the text returned of (display dialog "enter that info
here" default answer "" with title "That info")
Set variable_3 to the text returned of (display dialog "enter this info 2
here" default answer "" with title "This info 2")
Set variable_4 to the text returned of (display dialog "enter that info 2
here" default answer "" with title "That info 2")
set variable_list to {variable_1, variable_2, variable_3 variable_4}
if items of variable_list contains "" then
display dialog "Error: One or more of the fields was left blank. The
script cannot be executed" buttons {"Cancel", "Retry"} default button 2
if button returned of result is "Cancel" then
quit script
else if button returned of result is "Retry" then
... <- Missing part !
end if
end if
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...
------------------------------
Have a bonus question too ask too !
I want to have an equivalent to
"set scripts_folder to (path to scripts folder from user domain with folder
creation) as string"
But for the StartupItems folder in the user's Library folder. I just can't
figure out how to do it since its not one of the AppleScript "mapped"
folders.
Thanks for all the help ! Its greatly appreciated !
_______________________________________________
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