Re: Get Value From User?
Re: Get Value From User?
- Subject: Re: Get Value From User?
- From: "Bryan S. Lee" <email@hidden>
- Date: Mon, 20 Apr 2009 10:08:52 -0400
- Thread-topic: Get Value From User?
Title: Re: Get Value From User?
A less, high-brow method would be to throw in an Applescript prompt to ask for the info (nothing I would put out for the general public to use, but would do what is needed in a pinch).
myInput=`osascript -e "tell application \"Finder\"" -e "activate" -e "set myInfoBox to display dialog \"Enter your info here\" default answer \"\"" -e "set myInfo to the text returned of myInfoBox" -e "return myInfo" -e "end tell"`
echo myInput
If you did this method, it might be worth actually doing the applescript part as an applescript and just run it from the command-line, then you could add additional checks to the input to make sure you’re getting valid info. Or possibly display a list of choices rather than have the user type it in. You never know what they’ll type. ;)
--
Bryan S. Lee
Information Resource Consultant II
Computer Support Services
Clemson Computing and Information Technology
Clemson University
864-656-3716
email@hidden
ACHDS 10.4, MCP NTS/NTW
From: Paul Cook <email@hidden>
Date: Sat, 18 Apr 2009 00:41:10 -0400
To: Installer-Dev mailing-list <email@hidden>
Subject: Get Value From User?
Is there anyway from any kind of any Installer script (preflight,
postflight, etc.) to ask the user for a value and to get that value
from within a script? (Bash, Perl, AppleScript, etc.)
In this case, we'd like to ask the user for a name of something. And
then use that name within a script.
My fear based on the answer to the recent progress question is that
the answer is probably No. But this is just different enough that I
thought it might be worth hoping otherwise.
Thanks for any help,
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden