• 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: Thu, 10 Jul 2008 06:47:47 -0700

On 08-07-09, at 16:58, Thomas Maffucci wrote:

I ran your script and got a text list of my scripts in the results window of the script editor. Now what?
"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". I'm  sorry I don't understand this??

set search_string to "on doit"

set falias to (path to desktop)
tell application "System Events"
set flist to (POSIX path of every file of falias whose file type is "osas")
end tell
set res to {}
set script_alias to missing value
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
repeat with pair in res
set script_alias to item 1 of pair
set script_text to item 2 of pair
if (script_text contains search_string) then
exit repeat
end if
end repeat
return script_alias


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

  • Follow-Ups:
    • Re: Find script files
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Login Scripts -- Can Apple Scripts be used?
  • Next by Date: Re: Find script files
  • Previous by thread: Re: Find script files
  • Next by thread: Re: Find script files
  • Index(es):
    • Date
    • Thread