Re: controlling remote application question
Re: controlling remote application question
- Subject: Re: controlling remote application question
- From: Nigel Smith <email@hidden>
- Date: Wed, 12 May 2004 10:38:08 +0100
On 12/5/04 5:33, "Joshua See" <email@hidden> wrote:
>
It should also be possible, but painful, to do this on the command line
>
using DeRez, defaults, and something that implements regex.
Well, I've never been any good at regular expressions, so here's something
that uses DeRez and vanilla AS. Watch for the linebreaks -- the shell script
should be all one line:
set theApp to quoted form of POSIX path of (choose file)
set theVar to do shell script "/Developer/Tools/Derez -only plst "<break>
& theApp & " | cut -c59-74"
set theVar to every paragraph of theVar as text
set theVar to text ((offset of "CFBundleName" in theVar) + 28) <break>
thru -1 of theVar
set theVar to text 1 thru ((offset of "</string" in theVar) - 1) of theVar
return theVar
Relies on the column format of the DeRez output -- AFAIK this is the same
for every resource file.
Later,
Nigel
_______________________________________________
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.
- Follow-Ups:
- TextEdit
- From: Michel Raj <email@hidden>