Re: Help required with Shell Script please.
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