• 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 All (Scriptable) Applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find All (Scriptable) Applications


  • Subject: Re: Find All (Scriptable) Applications
  • From: Andy Wylie <email@hidden>
  • Date: Thu, 05 Jul 2001 21:00:05 +1200

on 5/7/01 6:21 pm, I wrote:

> set app_list to MT List Files of (path to "root") of type {"APPL", "appe"}
> with sub folders--Tanaka's
> --set app_list to the entries in (path to "root") whose types are in
> {"APPL", "appe"} to a depth of -1 with visibility--Akua
>
> set asApps to {}
> repeat with i in app_list
> try
> set x to MT Load Resource i type "aete"--Tanaka's
> --set x to the resource of type "aete" in i--Akua
> set AppleScript's text item delimiters to {":"}
> set appName to text item -1 of (i as string)
> set AppleScript's text item delimiters to ""
> set end of asApps to {appName, i}
> on error m number n
> end try
> end repeat
>
> ----------------------
> Seconds x10 runs
> MT List Files --69.84
> MT Load Resource--147.68
> -- 217.52
> the entries in --84.06
> the resource of type --114.01
the number of resources in --24.43
> -- 198.07
-- 108.49

I couldn't get Akua's 'the number of resources in' to work properly in a
loop earlier (it returned 2 for everything %) but found this form works...

if (the number of resources in i of type "aete") = 0 then error

_____________________________ Andy


References: 
 >Re: Find All (Scriptable) Applications (From: Andy Wylie <email@hidden>)

  • Prev by Date: Re: OSA menu issues
  • Next by Date: read write basics
  • Previous by thread: Re: Find All (Scriptable) Applications
  • Next by thread: Re: Find All (Scriptable) Applications
  • Index(es):
    • Date
    • Thread