• 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: Help required with Shell Script please.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help required with Shell Script please.


  • Subject: Re: Help required with Shell Script please.
  • From: John Baltutis <email@hidden>
  • Date: Fri, 30 Mar 2007 11:28:15 -0700

On 03/30/07, Nick Hearn <email@hidden> wrote:
>
> Please can someone help me. I'm trying to get a list of the names of
> custom print presets from this plist file
> 'com.apple.print.custompresets.plist'.
>
> If I run this script:-
>
>            do shell script "defaults read com.apple.print.customPresets"
>
> part of what I get back is this :-
>
> \"com.apple.print.customPresetNames\" = (\"a4 duplex\", test1, test2);
>
> I've been trying a number of different ways to access just the preset
> names i.e. a4 duplex, test1, test2.
> I'd like to be able to get these into a list so I can present them to
> the user and they can select which preset they require.
>
> I've trawled through a number of articles and pages of info however,
> as yet I've still not come up with a solution.
> I feel I'm very close but I'm not sure how to achieve this task.
>
> Any help would be much appreciated.

Try:

do shell script "defaults read com.apple.print.customPresets
com.apple.print.customPresetNames"

On my machine (10.4.9), with only one presetName, returns:

("Standard 1")
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: renaming JPEG FILES
  • Next by Date: Re: How does one save a vcard?
  • Previous by thread: Re: renaming JPEG FILES
  • Next by thread: alias list error
  • Index(es):
    • Date
    • Thread