• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get Value From User?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Value From User?


  • Subject: Re: Get Value From User?
  • From: "Bryan S. Lee" <email@hidden>
  • Date: Mon, 20 Apr 2009 12:19:41 -0400
  • Thread-topic: Get Value From User?

If you take the lines of code I sent you and copy/paste it into terminal,
you'll see the results. I have it setting a terminal variable to what is
returned by the script. If you needed multiple values returned, then you
might want to go the file route or have each run as a separate script that
is equal to the equivalent variable in the shell script (handy if you don't
want the possibility of someone reading the info in a hidden file or file
name (like a password).

If this is for something you plan on publishing publicly or selling, you
probably would want to go the plugin route. I have the luxury of doing it
with a simple Applescript since my stuff is for internal use only, and
hitting a smaller audience (few thousand users). Also, never attempted to
make a plugin before.

--
Bryan S. Lee



> From: Paul Cook <email@hidden>
> Date: Mon, 20 Apr 2009 10:28:02 -0500
> To: Installer-Dev mailing-list <email@hidden>
> Subject: Re: Get Value From User?
>
> Thanks, for both the custom plugin suggestion and the AppleScript
> suggestion.
>
> In terms of the AppleScript route, how does the answer get passed to a
> script? (If for example, I want to use the answer in a PostFlight
> Script?) I suppose one could have AppleScript write it in a file
> somewhere and then you could read it from your script. But is there an
> easier way?
>
> I was able to find some information about custom Installer plugins at:
> http://developer.apple.com/samplecode/InstallerPluginSample/listing1.html
>
> I haven't looked at the sample code yet, so I don't know if the same
> question applies to the custom installer plugin approach or not. But
> unless it is real close to what I want, I may go the AppleScript route.
>
> Best Wishes,
>
> Paul
>
>
> On Apr 17, 2009, at 11:41 PM, Paul Cook wrote:
>
>> 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


 _______________________________________________
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

References: 
 >Re: Get Value From User? (From: Paul Cook <email@hidden>)

  • Prev by Date: Re: Get Value From User?
  • Next by Date: Re: Get Value From User?
  • Previous by thread: Re: Get Value From User?
  • Next by thread: Re: Get Value From User?
  • Index(es):
    • Date
    • Thread