Is it possible to sense whether an application exists on any mounted volumes by giving its creator code?
Using Akua:
try
display dialog (path to creator "MSWD" as string)
on error
display dialog "Can't find it"
end try
[color=#FF00FF]Andreas[color]
: Using Akua:
: try
: display dialog ( path to creator
: “MSWD” as string )
: on error
: display dialog “Can’t find it”
: end try
: Andreas
Excellent! Thanks!
: Excellent! Thanks!
also Satimage OSAX’s ‘path to application’ (Satimage OSAX included with Smile)
Thanks Marc, pleased to see vanilla solution. I first thought that the “Finder” takes this info from the desktop database, and again I thought that if I delete an application, it still would be reported if I don’t rebuild the desktop files. I tested and, no, it worked properly. What a sceptic man I am -
Uing the Find document addition :
find application of creator “MSWD” if answer is {} then display dialog “Not found”
Jean-Baptiste LE STANG
: Is it possible to sense whether an application exists on any
: mounted volumes by giving its creator code?
The Finder can find an application’s file by its creator code:
set theRslt to (display dialog "Please enter the creator code:" default answer "")
set theCreator to text returned of theRslt
tell application "Finder"
try
set theName to name of application file id theCreator
display dialog "The application is " & theName buttons {"OK"} default button 1
on error
display dialog "There is no application for creator code "" & ¬
theCreator & """ buttons {"OK"} default button 1
end try
end tell
Marc K. Myers
Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[02/25/2002 1:11:31 AM]