Re: Accessing a 'Scripting Addition's Features
Re: Accessing a 'Scripting Addition's Features
- Subject: Re: Accessing a 'Scripting Addition's Features
- From: John Stewart <email@hidden>
- Date: Sun, 2 Feb 2003 15:21:54 -0500
On Sunday, February 2, 2003, at 12:49 PM, email@hidden wrote:
I have just downloaded "Jon's Commands.osax", a 'scripting addition'
File.
Please tell me where to install it - I am running 'MacOS X [10.2.3]';
and, what I must enter into 'Script Editor' so as to gain access to
"Jon's Commands" Events and Properties.
I am interested in using "Jon's Commands" to change the Monitors
Screen Size [resolution], refresh rate [Frequency], and Color Depth -
as per '<http://www.resexcellence.com/hack_html_99/12-11a-98.shtml>'.
Thank you.
--
SJWL
______
That depends on how you want to make them available.
path to scripting additions from local domain -- for all users
path to scripting additions from user domain -- for a single user
Pasting either of the above two lines into your Script Editor and
running it will return the path to the indicated folder assuming it
exists.
The following script will create the folder you choose if it doesn't
exist then open it.
(* start script *)
set fname to "ScriptingAdditions"
set lPath to ((path to startup disk as string) & "Library:")
set uPath to ((path to current user folder as string) & "Library:")
display dialog "Open Scripting Additions folder for single user or all
users?" buttons {"All", "Single"} default button 2
if button returned of result is "All" then
try -- local
tell application "Finder" to open alias (lPath & fname)
on error
tell application "Finder" to make new folder at lPath with properties
{name:fname}
open result
end try
else
try -- single user
tell application "Finder" to open alias (uPath & fname)
on error
tell application "Finder" to make new folder at uPath with properties
{name:fname}
open result
end try
end if
(* end script *)
John
_______________________________________________
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.