RE: How to prompt for multiple values (and verify them) from Inst aller?
RE: How to prompt for multiple values (and verify them) from Inst aller?
- Subject: RE: How to prompt for multiple values (and verify them) from Inst aller?
- From: Ed Walter <email@hidden>
- Date: Fri, 7 Feb 2003 08:32:45 -0600
Something like this should work:
set usrNumber to 0
set usrMsg to "enter a number"
repeat while usrNumber < 100 or usrNumber > 10000
set usrText to (text returned of (display dialog usrMsg default
answer "8080"))
try
set usrNumber to usrText as number
end try
set usrMsg to "Value must be between 100 and 10,000"
end repeat
-ed-
-----Original Message-----
From: Joseph Silverman [
mailto:email@hidden]
Sent: Thursday, February 06, 2003 10:40 AM
To: email@hidden
Subject: How to prompt for multiple values (and verify them) from
Installer?
I would like to create a Package that, when Installed, would be able to
prompt for a few numeric values in a specific range (TCP/IP port
numbers, actually) during the postflight stage of the install. These
would then be used to modify the installed files as necessary. I can
do ONE value with:
value=`osascript -e 'tell application "Installer"
display dialog "enter a number" default answer "8080"
returned text of the result
end tell' i 2>/dev/null || echo DEFAULT-ANSWER`
This doesn't verify the result is numeric or in range, which I could
readily add in shell but am not sure how to do it in AppleScript.
So, my question is, How do I do this?
Thanks - Yossie
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.