• 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: Find script files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find script files


  • Subject: Re: Find script files
  • From: Philip Aker <email@hidden>
  • Date: Wed, 9 Jul 2008 10:06:57 -0700

On 08-07-07, at 15:38, Thomas Maffucci wrote:

How do I get a list of .scpt files containing a particular applescript
command in a script folder.  I don't want to convert to text.

You don't have to convert your scripts to text for the following but it reports its result as a list of the text of the scripts found. After that, it's an easy search thru the text to find a handler and it is paired with an alias of the file the text was obtained from.

set falias to (choose folder)
tell application "System Events"
set flist to (POSIX path of every file of falias whose file type is "osas")
end tell
set res to {}
repeat with f in flist
set qf to quoted form of f
set end of res to {(POSIX file f) as alias, (do shell script "/usr/bin/osadecompile " & qf)}
end repeat
res

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
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

References: 
 >Find script files (From: Thomas Maffucci <email@hidden>)

  • Prev by Date: Simple text - one more problem
  • Next by Date: Re: Simple text - one more problem
  • Previous by thread: Re: Find script files
  • Next by thread: Re: Find script files
  • Index(es):
    • Date
    • Thread