Re: Identifying BBEdit version + testing for presence of OSAXen
Re: Identifying BBEdit version + testing for presence of OSAXen
- Subject: Re: Identifying BBEdit version + testing for presence of OSAXen
- From: Kai Edwards <email@hidden>
- Date: Sun, 17 Nov 2002 15:40:15 +0000
on Fri, 15 Nov 2002 20:39:46 +0000, Alex Robinson
<email@hidden> wrote:
>
On another note, how does one go about testing for the presence/absence of
>
osaxen? And is it the same for OSX and Classic?
I use a (pre-OS X) script which you might try adapting, Alex. It assumes the
presence of OSAXen by checking the scripting additions folder for non-Apple
additions. (Since the script also moves user-selected additions between the
SA folder and a 'Disabled Scripting Additions' folder - and then forces a
restart, this assumption is normally correct.)
Here's the bit that relates to your question:
--------------------------------------------------
set SAfolder to path to scripting additions folder
try
tell application "Finder" to set OSAXList to (SAfolder's files [NO BREAK]
whose version does not contain "Apple Computer")'s name as list
on error
set OSAXList to {}
end try
--------------------------------------------------
The try block averts an error if the Finder attempts to get filenames from
an empty list. The otherwise redundant coercion to a list deals with the
possibility of a single name being returned.
HTH.
Kai
--
email@hidden
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.