image ResEx Logo
ResExcellence www : Powered by Google
Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets


Files are in Stuffit 5 or greater format.
Free download.

Tell us about a bad link.

Thank You!


Running 18 days
without a restart.

System Scripts

Scripts for appearance, monitor resolution, and more.

Contents:
Position Orbit Clock
Use Balloon Help as Tooltips
Paste Text to clipboard
Proportional Scrollbars
Set Scroll Arrow style
Change Appearance settings
Control Monitor settings w/ Jon's Commands
Hide/Show All Apps


Evan Francois loved the Orbit Clock from BlueSkyHeart Graphics, but accurately positioning it was a little cumbersome, so he wrote a little Applescript to automate the process for any monitor size! (Be sure to change the paths to the picture and clock!)

-- I put my "DC Orbit 800&Mac176;" folder in my Application Support folder.
-- Wherever you put yours, the next two paths need to reflect that:

property the_picture : ((path to startup disk as string) & ¬
"System Folder:Application Support:DC Orbit:DC Orbit.jpeg") ¬
as alias

property the_DA : ((path to startup disk as string) & ¬
"System Folder:Application Support:DC Orbit:Orbit Clock") ¬
as alias

try
tell application "Appearance"
launch -- without visible
set picture file of monitor 1 to the_picture
set picture positioning of monitor 1 to automatic
quit
end tell
tell application "Finder"
open the_DA
activate
end tell -- that's it!
on error e_mess number e_numb
if e_numb is -128 then -- user canceled
quit me
else
beep
tell me
activate
display dialog ¬
"Script was unable to complete the task." & ¬
return & return & e_mess buttons ¬
{"Cancel"} default button 1 with icon stop
end tell
end if
end try


As an exercise, Ben Lukens pulled out his Script Editor and whipped up this script:

This script will activate balloon help as if they were tooltips. If you pause your mouse over an item for a second, balloon help will turn on until you move your mouse again. It's actually pretty cool, and it's a heck of alot more convenient than turning balloons on from the menu.

A couple of prerequisites though:
You need Jon's Commands , which is included with MacOS 8.5, the IdleTime init, which is included with Instant Messanger and Netscape, and the Balloon Help osax, that's part of ACME Script Widgets.

Once you have all that, just save the following as a stay-open application, and run it.

property ison : false

on idle
set theidle to machine environment "idle"
if ison then
if theidle < 10 then
set ison to false
pop balloons
end if
else
if theidle > 60 then
set ison to true
inflate balloons
end if
end if
return 1
end idle

Now, it is just an applescript, with isn't really suited for something like this. As such, the balloons don't turn on and off and smooth as one would like. Something more low level, like an extension, would probably do a much better job. Maybe this will inspire somebody. :)


The character after the word clip is a "soft return" generated with Option-Return
Our own Michael Coyle came up with a way to place commonly used text in the clipboard.

The example on the right uses the clip command from Akua Sweets scripting addition. Once you download the file, drag it onto the System Folder and it will be deposited in the Scripting Additions folder.

A folder called "Copy to Clipboard" can be placed in the Apple Menu containing any text you wish to have at your finger tips.


Macintosh computer consultant, Christian Boyce shows how to assign proportional scroll bars with AppleScript:

tell application "Appearance"
set scroll box style to "prop"
end tell

I modified John Gunnison's previous scipt to add dialogs and confirmations:

on run

set letsloop to true -- set loop on by default
set theDialogText to "Type of scroll bar?"

tell application "Appearance"
repeat while letsloop is true
display dialog theDialogText buttons {"Fixed", "Proportional"}

if the button returned of result is "fixed" then
set scroll box style to fixed
display dialog "Scroll bars are 'Fixed'"
set letsloop to false -- stops loop
else
if the
button returned of result is "Proportional" then
set scroll box style to proportional
display dialog "Scroll bars are 'Proportional'"
set letsloop to false

end if
end if
end repeat
-- end loop
quit application "Appearance"
end tell
en
d run

Download the compiled script.


John Gunnison takes our recent scroll bar AppleScript, and adds several new features. This version presents a dialog box to select the style of arrows, then follows up with confirming dialog.

This simple script demonstrats great flow control for the beginner to study:

on run

set letsloop to true -- set loop on by default
set theDialogText to "
Choose the style of Scroll Bar Arrows..."

tell application "
Appearance" -- opens control panel
repeat while letsloop is true -- opens loop
display dialog theDialogText buttons {"
Single", "Bottom-Right", "Double"}

if the button returned of result is "
Single" then -- single
set scroll bar arrow style to "
sngl" -- set arrow style
display dialog "Arrows set to Single" -- confirmation
set letsloop to false -- stops loop
else
if the button returned of result is "
Bottom-Right" then -- bottom-right
set scroll bar arrow style to "
next" -- set arrow style
display dialog "
Arrows set to Double on bottom right corners" -- confirmation
set letsloop to false -- stops loop
else
if the button returned of result is "
Double" then -- double
set scroll bar arrow style to «constant ****dubl» -- set arrow style
display dialog "
Arrows set to Double" -- confirmation
set letsloop to false -- stops loop
end if -- end double
end if -- end bottom-right
end if -- end single
end repeat -- end loop
quit application "
Appearance" -- closes control panel
end tell
end
run

Download the compiled script.


Jason Zimmer has submitted several Applescripts that demonstrate how to modify the Appearance Control Panel. For example:

tell application "Appearance"
activate
set appearance to "
Apple platinum"
set appearance variant to "
Sapphire"
set system font to "
Gadget"
set font smoothing to true
set sound track to "
SGI Sounds"
end tell

Modify and save this script as an application and double-click your way to a new look!


John Pugh has written an excellent collection of 33 scripting additions called Jon's Commands. This tidbit focuses on the commands that control the monitor size and depth.

Installation: After downloading the small file, installation is as simple as dragging Jon's Commands on top of the System Folder. It will automatically be routed to the Scripting Additions folder. There is no need to restart, the commands are readily available.

To see the commands in action, launch Apple's Script Editor and type the following simple command and run it:

screen list

Depending on your monitor type, the Result window may display a surprising amount of info! These are all the possible monitor depths, screen sizes, and refresh rates that your current setup supports. Additionally, there is information on the number of monitors connected to the computer, and whether the setting is considered a Safe Resolution (True/False).

Safe Resolutions correspond to the Recommended settings in the Monitor & Sounds control panel. Don't be intimidated by the listing; we only care about a few of the many settings.

Examples: Assuming these settings are supported on your monitor, type the following into the Script Editor and run it:


set screens to {color depth:8, in color:false }

Your screen should have switched to 256 shades of grey. To switch back, set in color to true!

Switching monitor depth is easy too:

set screens to {color depth:16} -- 16 bit, thousands of colors
set screens to {color depth:8} -- 8 bit, 256 colors


Ok. How about screen size! Lots of people have been asking for that.

set screens to {screen size:{800, 600}, refresh rate: 75} -- Make it big!
set screens to {screen size:{640,480}, refresh rate: 60} -- Make it small!


What could be simpler! Here are a list of the commands for set screens to:

name string -- The name of this type of screen.
screen id integer -- The unique id of the screen.
screen size point -- The height and width of the screen.
bounds bounding rectangle -- The boundary rectangle for the screen.
refresh rate integer -- The refresh frequency of this monitor.
color depth small integer -- The screen color depth setting.
in color boolean -- If the screen is in color (versus grayscale).
has menu bar boolean -- If this is the main screen which the menu bar is on.
supported resolutions a list of record -- The resolutions supported by this monitor .
resolution index integer -- The index into the supported resolutions list for this resolution.
safe resolution boolean -- Is this resolution safe or does it require user confirmation?

Once you have a little script to accomplish your screen switching goal, save it as an Application and you can double-click it at any time. If you're using OSA menu, save it as a compiled script and put it in the Universal Scripts folder.
Here are a couple of simple Applescripts to Hide All/Show All from Victor Yee. One way to trigger them is by assigning them to Function Keys in the Keyboard Control Panel, another is with OSA Menu.

APPL is the creator code for the Finder. You can easily modify the scripts to show/hide an application by changing the code.


Back to the Archive

Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets

Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement. [an error occurred while processing this directive]