• 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: controlling remote application question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>
References: 
 >Re: controlling remote application question (From: Joshua See <email@hidden>)

  • Prev by Date: Re: Scripting iCal
  • Next by Date: Re: Toggle Modem Autoconnect Preference? (digest, Vol 3 #2671)
  • Previous by thread: Re: controlling remote application question
  • Next by thread: TextEdit
  • Index(es):
    • Date
    • Thread