Re: Find script files
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
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