Re: Find All (Scriptable) Applications
Re: Find All (Scriptable) Applications
- Subject: Re: Find All (Scriptable) Applications
- From: David Lloyd <email@hidden>
- Date: Thu, 05 Jul 2001 15:48:59 +1000
This little ditty found all the Scriptable Apps on my machine in 60
seconds...
-----
requires:
number of resources in - from gtq scripting library
tanaka's osax
--begin-----
on run
copy (choose folder) as string to theFolder
findApps(theFolder)
end run
--
on open (theFolder)
copy item 1 of theFolder to theFolder
findApps(theFolder)
end open
--
on findApps(theFolder)
copy (MT List Files theFolder of type {"APPL"} return as string with sub
folders) to theApps
copy {} to scriptableApps
repeat with i from 1 to count of items in theApps
copy item i of theApps to theApp
copy (number of resources in alias theApp of type "aete") to x
if x 0 then copy theApp to end of scriptableApps
end repeat
set AppleScript's text item delimiters to return
copy (scriptableApps as string) & return to scriptableApps
set AppleScript's text item delimiters to ""
copy (path to desktop as string) & "Scriptable Applications" to theFile
open for access file theFile with write permission
copy (get eof file theFile) to theEof
write scriptableApps to file theFile starting at (theEof + 1)
close access file theFile
end findApps
--end-----
David Lloyd
---------------------------------
email: email@hidden
web:
http://www.kanzu.com
---------------------------------