(Example: +interarchy +wands) Advanced Search & Tips
GUI Goodies
Clocks iTunes Skins
Desktop Pictures Makeovers & Skins
GUI Software Explorer Skins
Icons Propaganda Tiles
Interarchy Interfaces Themes
Throbbers
Home Page
Splash Screens
ATM Replacements
Application Splashes
Explorer Splashes
MacOS Startups (MOSS)
Netscape Splashes
MacOS X
MacOS X Mods
Login Panels
Boot Panels
Dock Poofs
Darwin
ResEdit
Classic ResEdit Mods
Getting Started
Download ResEdit
Resource/Template Archive
Helpful Sections
User Forum
About Us!
Icon Help
Site Map
Submission Policy
Suggestions/Email us
In Addition...
REALbasic
Snapshots
Advertising
Linux Icebox
Applescript/Scripting
Links Page
Download Stats
Snap it Up! 600MHz iMac plus 2.3MP Digital Camera Only $1099! at Smalldog.com!
Snap it Up! 600MHz iMac plus 2.3MP Digital Camera Only $1099! at Smalldog.com!



Don't forget to look under AppleScripts on the Previous Edits page.

In no particular order:


Vic Wertz sent this little Applescript ditty...

I massively modified the script by Rams, originally posted on 1/26, so that it moves items from Temporary Items directly into the Trash. If you save this as an app and place it in the Startup or Shutdown Items folder, you need not ever worry about the Temporary Items folder again.

    set x to "Macintosh HD:Temporary Items:"
    -- Change "Macintosh HD" to match the name of your startup disk.
    tell application "Finder"
    if (count of (list folder x)) < 1 then return
    repeat with i in list folder x
    move alias (x & i) to trash
    end repeat
    end tell


I don't happen to use it, but Mark Evans wrote this AppleScript that should be of use to you if you use ircle:

    What it does is launch a URL right from ircle in one of two ways. You can type "/URL TheURLHere" or just type "/URL" and a dialog box prompts you for the URL. Created to work with IE but the browser can easily be changed. Note : You must save the script as "URL" and place it in the ircle scripts folder for it to work.

    on run
    tell application "ircle3.0.4 US"
    set MyURL to argstring
    if MyURL = "" then
    set Blah to display dialog "URL To Get?" default answer ""
    set URLtoo to (text returned of Blah)
    end if
    tell application "Internet Explorer 4.5"
    Activate
    GetURL "" & URLtoo & ""
    end tell
    if not MyURL = "" then
    tell application "Internet Explorer 4.5"
    Activate
    GetURL "" & MyURL & ""
    end tell
    end if
    end tell
    end run


Here's a nifty Applescript for those of you who distibute your Applets from John Grow:

I am submitting to you this wicked simple (but really useful) AppleScript that I made. This script is like a lot of the others I've seen in the AppleScript listing, EXCEPT...in those others, you have to change the creator code in the script every time.

Not in this one. This one opens a dialog box when you drop a file on it. The dialog box contains the file name and file type, but puts the creator code in a default answer box, allowing you to edit it right there. No more editing the script every time. This has come in really handy for me because I deal with cross-platform all the time, and I'm too lazy to edit the script every time I need this thing, which is several times a day.

on open (theList)
tell application "Finder"
repeat with theItem in theList
if class of theItem is file then
set locked of theItem to false
end if
set fileName to name of theItem
set fileType to file type of theItem
set creatorType to creator type of theItem
set dialogResult to display dialog "File name: " & fileName & return & ¬
"File Type: " & fileType & return & "Creator Code: " buttons "OK" ¬
default button 1 default answer creatorType
set creatorType to text returned of dialogResult
set creator type of theItem to creatorType
end repeat
end tell
end
open


This handly Applescript by John Crossley will open the folder containing the frontmost application.

    tell application "Finder"
    set currentApps to every process whose frontmost is true
    -- This list will be empty if Finder is frontmost
    if (count of currentApps) > 0 then
    reveal file of item 1 of currentApps
    activate -- Finder
    end if
    end tell

I wrote this because I was testing a beta version of a favorite program. I wasn't sure, however, if the copy in memory was launched from the beta or the previous release. So this script tells the finder to reveal the application file of the frontmost application.


Erick Tejkowski sent this great Applescript for users of the new ViaVoice:

I just received my copy of ViaVoice and enjoy it a lot.One thing missing for me, however, was the fact that ViaVoice will only let you transfer text directly to Word, AOL, Netscape, IE, and AppleWorks.

I program a lot, so transfering to BBEdit was something I really wanted. My solution (however inelegant) is to use ViaVoice for dictation. Then, turn off the microphone in ViaVoice (by voice cmd or key shortcut) and turn on Apple Speakable Items, where I have a script that will transfer the text for me. I have my SpeakableItems set to turn on with the 'esc' key in the Speech control panel.

Here's the simple script I used. It's not much, but it might give some of your readers a few ideas. One last thing, I named the script "Transfer to B B Edit" to keep in line with the scheme used by default in ViaVoice. Separating the "B" and "E" characters by a space also seems to improve my Mac's recognition of my utterance. Enjoy!

      tell application "IBM SpeakPad"
      activate
      set x to get text
      end tell

      tell application "BBEdit 5.0"
      activate
      make new document
      insert text x
      end tell


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


David Emmons sent one of the oddest Applescripts I have ever seen. In effect, it makes Microsoft's Internet Explorer a slave of Netscape Communicator.

Now if we could only write a script to make Microsoft a slave of Apple....

Here is a script I wrote to have Communicator tell Explorer where to go to. I use Communicator by habit, but IE has a cool Web archive feature I like. The solution is this Applescript that will send IE to the site Communicator is looking at so that you can archive. With a little more work, you could even add the capabiltiy for IE to save the page by itself.

tell application "Netscape Communicator™"
set theHit to URL of window -1
end tell

tell application "Internet Explorer 4.5"
GetURL of theHit
end tell


Has Jeremy LaCivita stumbled upon a bug in AppleScript under MacOS 9?

I have an applescript that runs at startup. It sets the position of all my HD icons to line up across the top in stead of along the side.

It worked fine until I installed MacOS 9, and now I this error.

It's easy to reproduce. This simple script, recorded in the Script Editor, triggers the error.

tell application "Finder"
activate
select startup disk
set position of selection to {853, 82}
end tell

Any ideas readers?

Update: Emmanuel Halligon sent this solution:

Since MacOS 9, you cannot move icons via AppleScript when the view options for the window/desktop are set to "Always snap to grid". I do not know whether this is a bug or a feature (I don't have OS9) but the workaround is (obviously) to turn grid snapping off through the View -> View Options... menu item.

And Joseph Williams adds:

I saw a brief mention of this problem in Bill Briggs' AppleScript Primer column on MacCentral. The solution is to change the icon arrangement to "none" within the Finder's View Options. You can do that from within the script itself if you prefer, using the following:

--put this at the top of the script
set viewVar to (spatial view arrangement of desktop)
set spatial view arrangement of desktop to not arranged

--put this near the bottom of the script
set spatial view arrangement of desktop to viewVar


Here's a great script written by WTF and submitted by Blake. Drag a folder onto it, and the folder, and all sub-folders, will be changed to "List by Name". You can easily modify it to View by Icon.

on open theList
my SetView(theList)
end open

on SetView(theViewList)
tell application "Finder"
repeat with theItem in theViewList
if the kind of theItem is "folder" then
open theItem
set view of theItem to name
close theItem
set theFolderContents to the contents of theItem
my SetView(theFolderContents)
end if
end repeat
end tell
end SetView


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. :)


Devin Teske describes how to enhancing your AppleScripts using ResEdit to add icons to dialog boxes :

  1. Using ResEdit, open the AppleScript program you made.
  2. Create a new 'cicn' resource.
  3. Draw or paste a new color or B&W icon, and a mask for it.
  4. Now choose the new icon resource and press Command-I.
  5. Type a four or five digit number in the 'ID' box.

Remeber the number. Whenever you want to use that icon, use that number. The icon will not be visible in the Script Editor. Only in the Finder after you save it to disk and run it from there.

A better way to reference the icon is to set up a property within your script (property iconName : iconNumber) with a name of choice and the number you gave it. For Example :

    property myLogo : 29531

Then you can reference the icon with that name (in this case, myLogo). Then you can reference the icon like this :

    display dialog "My own icon" buttons "OK" default button 1 with icon myLogo

The icon won't be displayed when run in the Script Editor. You have to save it and run it as an application from the Finder.

Evan Francois adds this comment:

One must be sure it's **their** script displaying the dialog. For example, if the display dialog statement falls within a tell application "Finder", end tell block, it won't work. In cases like that, be sure to nest the display dialog statement within a tell me, end tell pair.


The character after the word clip is a "soft return" generated with Option-Return
A
t the urging of my lovely wife, who is always looking for a way to save a few keystrokes, I 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.


Brian DePalo sent this AppleScript you can download that changes the creator codes of files dragged on to it to Apple's Help Viewer. This could come in handy for 'Read Me' files and simple documentation.

By changing the creator code in the first line, the script can modify the creator codes for any application!

property ct : "hbwr" -- Help Viewer creator code.

on open (theList)
tell application "Finder"
activate
repeat with theItem in theList
set the creator type of theItem to ct
end repeat
end tell
end
open


Ryan Colley submitted these AppleScripts that allow you to use Outlook Express with GroupWise:

I work at a corporation that uses GroupWise 5 for our email and appointments package. Being that the Mac Client sucks, I wanted a way to use another mail program. I wrote the following two Apple Scripts to use in conjunction with Outlook Express.

The first will take forwarded mail from GroupWise, clean it up and strip out the Garbage.

The second will take a forwarded appointment from GroupWise, and strip out the appropriate information, and make an appointment in Palm Desktop 2.x. You may need to tweak them a little, but they work flawlessly for me. I would also be glad to help.


If this next AppleScript wasn't so much fun to watch, it would almost be categorized as a virus! xyz created this script that randomly moves your desktop icons around the screen. After pasting it into the Script Editor, save it as an application with the startup screen off, and "always stay open" on.

    on idle
    try
    tell application "Finder" to set AllItems to every item of desktop
    repeat with AnItem in AllItems
    set RX to random number from 60 to 750 --change these as desired
    set Ry to random number from 60 to 750 --change these as desired
    tell application "Finder" to set position of AnItem to {RX, Ry}
    end repeat
    on error
    return
    1 * 5
    end try
    return
    1 * 5 --change these as desired
    end idle

    --Xtra : Save as stay open/application.
    --Use Resedit to change file type to "appe".
    --Open the Size resource scroll to only background,
    --and switch this setting from 0 to 1
    --Give it a fun icon and drop on your closed system folder.
    --(to move to the Extensions folder)
    --Restart. Have fun chasing your icons around. My 2 children love it.


Some of you probably use a RAMdisk as your browser cache. Sung-Jin Kim wrote this AppleScript to rename the RAM Disk, give it a new icon, and create some folders for both Netscape and Explorer.

In order to script the changing of the icon, you need to download the Scripting Addition: Akua Sweets.

tell application "Finder"
if the "RAM Disk" is in (list disks) then
set name of disk "RAM Disk" to "Cache Zone"

-- The next line to assign an icon requires Akua Sweets
set the icon of disk "Cache Zone" to the icon for startup disk
make new folder in disk "Cache Zone"
make new folder in disk "Cache Zone"
make new folder in disk "Cache Zone"
set name of folder "untitled folder" of disk "Cache Zone" to "Netscape Cache 1"
set name of folder "untitled folder 1" of disk "Cache Zone" to "Netscape Cache 2"
set name of folder "untitled folder 2" of disk "Cache Zone" to "MS Internet Cache"
end if
end tell


n8 Alf created this really nifty folder action AppleScript. Attach it to a folder, and everytime someone opens moves the folder, it becomes a popup window. It has been working great on a couple of popups I like to always keep on the bottom of my screen.

on opening folder ThisFolder
my SetPopUp(ThisFolder)
end opening folder

on moving folder window for ThisFolder
my SetPopUp(ThisFolder)
end moving folder window for

on SetPopUp(ThisFolder)
tell application "Finder"
if popup of window of folder ThisFolder is false then
activate

-- in the following line you can determnine the window view
-- choices are: icon, small icon, name

set view of window of folder ThisFolder to name
set spatial view arrangement of window of folder ThisFolder to arranged by name
set zoomed of window of folder ThisFolder to true
set popup of window of folder ThisFolder to true
set pulled open of window of folder ThisFolder to false
end if
end tell
end
SetPopUp


Kevin Patfield submitted this AppleScript:

Stickies are excellent for leaving "to-do" notes for things to do next time you use your Mac. Unfortunately, if you just put an alias of the Stickies application in your Startup folder (or check "Launch at System Startup" in its preferences), you are greeted by a blank sticky if you start with no stickies present. The following script avoids this by first checking whether the stickies file is empty or not.

on run
tell application "Finder"
activate
set theSize to size of file "Stickies File" of preferences folder
if theSize > 6 then
tell application "Stickies"
activate
end tell
end if
end tell
end run


John Dwight uses this simple AppleScript Folder Action to protect any documents he places in the folder. The script contains a simple error catching routine:

on adding folder items to parent_folder after receiving added_items
try
tell application "Finder"
set locked of files of parent_folder to true
end tell

on error x
tell application "Finder"
display dialog x
end tell

end try
end adding folder items to

-- Due to current Folder Actions implementation
-- the script runs only when Dragging-and-Dropping files into the open scripted folder.
-- I haven't yet found a way to lock newly added files to a parent folder from the Save diaolg.
-- Use at your own risk and enjoy. John Dwight dwight@ic.si.edu


Here's an AppleScript by Michael Askew that demonstates a lot of simple coding techniques. This script will quit all applications, except hidden processes, the Finder, and any programs in the "Excluded" list:

property excludedApps : {"VersaTile Pro"}

--The Finder and background processes are
--not affected because their file

type is not APPL

tell application "Finder"
set theProcs to every process whose (file type is "APPL" and name is not in excludedApps)
end tell

repeat with x in theProcs
set appName to name of x
tell application appName to quit
end repeat


Victor Nystad submitted a few more simple AppleScript examples to demonstate control of the Application Switcher.

on run
tell application "Application Switcher"
set visible of palette to true
set orientation of palette to vertical
set button ordering of palette to alphabetical
set frame visible of palette to true
set names visible of palette to true
set position of palette to upper right
set icon size of palette to small
end tell
end run

on run
tell application "Application Switcher"
set visible of palette to true
set orientation of palette to horizontal
set button ordering of palette to reverse launch order
set frame visible of palette to false
set names visible of palette to false
set position of palette to lower right
set icon size of palette to small
end tell
end run

You can find all the applicable commands by using the Script Editor to open the dictionary of the Application Switcher' extension.

I have customized this script and stuck a copy in my Apple Menu and Startup Folder to keep that panel how I want it! Often after playing a game that switches the monitor resoulution, the Application pallete is in a wacky part of the screen in a funky configuration.


Macintosh computer consultant, Christian Boyce shows how to assign proportional scrool 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.


Tom Mulligan tweaked his AppleScript that allows you to select a window's scroll arrow style:

on run
tell application "Appearance"
start log
set ArrowStyle to (get scroll bar arrow style)
log ArrowStyle
if ArrowStyle = single then
set scroll bar arrow style to "next"
else if ArrowStyle = both at one end then
set scroll bar arrow style to "dubl"
else if ArrowStyle = «constant ****dubl» then
set scroll bar arrow style to "sngl"
end if
stop log
quit
end tell
end
run

Paste the above into the Script Editor and save it as an application. Everytime you run it, it will change the scroll arrows to one of three options. Keep launching it until you get the look you want!


Isn't it annoying when you download a bunch of files (pictures, text, etc...) and they don't have any creator codes or worst, they have codes for applications you don't want to use.

For example, you have a bunch of Simpletext files, but you would rather have them opened in Tex-Edit.

Here are a couple of Applescripts to handle the job. Just drag a group of files on them to change the type/creator codes.

This script by Grierson will change both parameters

property fileType : "TEXT" -- change to whatever you want
property creatorType : "ttxt" -- change to whatever you want
--
on open (theList)
tell application "Finder"
repeat with theItem in theList
set file type of theItem to fileType
set creator type of theItem to creatorType
end repeat
end tell
end
open

This version by Athel changes only the application creator code.

on open (docList)
tell application "Finder"
repeat with sourceFile in docList
set the creator type of sourceFile to "TBB6" -- Change to whatever you want
end repeat
end tell
end
open


Are you interested in syncing your Palm Pilot with a FileMaker Pro database? While it requires some customizing, Ryan Colley submitted this AppleScript to automate the task for you.


Pete Mellows created this Applescript to launch Eudora and check for mail every 30 minutes.

I use it because at work we have a timed account. I'm often away from my machine, so email doesn't get checked as regularly as it should. When I'm surfing the internet I like to have Eudora Pro check my mail every 5 minutes. Eudora Pro cannot be set up to check every 5 minutes AND every 30 minutes when I'm offline.

To set it up, open to the "Settings" panel. Click on "OT/PPP MacSlip" and check both boxes. You don't want Eudora Pro to connect automatically (there is a reason for this) and you do want Eudora Pro to disconnect after checking the mail. In "Remote Access" Options, you can have connect automatically when starting TCP/IP Applications if you like, but it is not necessary. Eudora Pro bypasses this.

property checking : true
property CheckTime : 30 -- minutes til next check. Change according to taste.

on run
-- No setup required
end run

on idle
try
tell application "Eudora Pro" -- if "Eudora Pro" name exists, then launches
connect [|checking|] -- and checks mail
end tell
on error
tell application "Finder"
activate
tell application "Finder" to set app_name to application file id "CSOm" as string
select file app_name -- finds Eudora on computer, no matter what it's named
set name of selection to "Eudora Pro" -- changes name of Eudora to "Eudora Pro"
end tell
tell application "Eudora Pro" -- launches "Eudora Pro"
connect [|checking|] -- and checks mail
end tell
end try
delay CheckTime * 60 -- minutes*60 seconds
end idle

You can download the source and saved application which allows you to customize it for other email programs.


If you're familiar with KeyQuencer, you know that you can address an application by using its creator code rather than by name. I had wondered if AppleScript could do this, and thanks to Myonghon Lee, I have the answer.

In this example to quit Netscape:

tell application "Finder"
get name of application file id "MOSS"
end tell
tell application result
quit
end tell

The Finder gets the path and exact name of the file with the creator code: MOSS (Netscape), and then quits that application. This small addition stops two annoying problems. You will no longer be prompted to find an application the first time you run a script. You scripts won't break when you update an application and the name changes slightly. The Eudora betas are an example of this.

Chris Green uses this Applescript to get a file path using the creator code:

tell application "Finder" to set app_name to application file id "MOSS" as string
quit application app_name

This works great because it's more concise, and uses a full path string, which is a better form to get in the habit of using so that you won't be asked where the application is if it's not running.


This next script was submitted by Gary Jastrzab:

Here's a simple AppleScript that will automatically clear the America Online 4.0 Browser Cache, which often takes up more than 5M of hard drive space. Placed in the "Shutdown Items" folder (in the System folder), it will "trash the cache" at the end of ever Mac session:

tell application "Finder"
set PrefsPath to the path to preferences folder as text
set AOLCachePath to
(PrefsPath & "America Online:Browser Cache:cache.waf") as text
try
delete alias AOLCachePath
empty folder "Trash"
on error
end try
end tell


Jim Henderson was looking for options to automatically log off the internet when he quits Netscape Communicator. Here are two ideas:

KeyQuencer:

quit 'MOSS' -- creator code for Netscape
PPPSwitch off

Save this as an application and stick it in the Apple Menu, or assign it to a key combination.

AppleScript:

tell application "Netscape Communicator™"
activate
quit
end tell

RA disconnect

Type this into the Script Editor and save it as an Application.

If you are using the PPP control panel instead of the newer Remote Access control panel, you can end your session with the command: PPP disconnect.

Are you using FreePPP? Download the FreePPP Scripting Addition by Sebastian Kloska, and use the command: close FreePPP.


If you were interested in additional scripting additions for controlling resources, Eric Grant recommends these freebies:


Jonathan Signor submitted this AppleScript to change the creator codes of any file dropped onto the applet:

on open theSelectedItems
with timeout of 9000 seconds
tell application "Finder"
activate

set lastItem to the last item of theSelectedItems as text
repeat with thisItem in theSelectedItems

set file type of thisItem to "XXXX" ----- Use ResEdit to get
set creator type b thisItem to "XXXX" -- the 4 character codes

end repeat
end tell
end timeout
end
open


Folder Actions. Cool! Did you hear MacOS 8.5 has Folder Actions. Ummm... so, just what can you do with folder actions?

Folder Actions are AppleScripts that are triggered when a folder opens. Here's how you can create a simple one.

When I open my hard disk, I like the window to be in the upper left corner and resized to show the main 9 icons.

After hitting the Record button in the Script Editor, I opened the hard disk, moved the folder, and resized it. This is what the was the script looked like:

tell application "Finder"
activate
select startup disk
open selection
set position of container window of startup disk to {10, 45}
set size of container window of startup disk to {215, 195}
end tell

To turn it into a Folder Action, it needs a couple of more lines:

on opening folder startup disk

tell application "Finder"
activate
select startup disk
open selection
set position of container window of startup disk to {10, 45}
set size of container window of startup disk to {215, 195}
end tell

end opening folder

After saving the script with the Compiled option, I attached it to my hard disk using the Folder Action contextual menu. Now when I open the drive, the window snaps to the corner, and is just the right size, regardless of of where I last left it!


Jeremy asks this AppleScript question:

    I was wondering if you could provide a script to place in Start Up items that would open a folder, and position it so that it became a pop-up folder. I have recently set up an iMac for a friend and her entire family is totally new to computers. In order to help them I've made three folders containing aliases of their applications, games, and personal files. These fodlers are in another folder called •POP-UP FOLDERS which sits in the HD. Every so often I get a frantic phone call saying that they've lost the games, or something. I thought if I had a script to do all this at startup, it would solve many problems.

This script was primarily made by recording actions with the Script Editor:

    tell application "Finder"
    activate
    select folder "
    Games" of startup disk
    open selection
    set popup of container window of folder "
    Games" of startup disk to true
    close container window of folder "
    Games" of startup disk
    -- the above line was added to close the popup window
    end tell


Want the new Netscape Communicator 4.5 to use another email client? Run this AppleScript, changing the creator code to match your favorite email program. Larry Kearl offers the raw scripts:

tell application "Netscape Communicator™"
register protocol "CSOm" for protocol "mailto" --Eudora
end tell

OR

tell application "Netscape Communicator™"
register protocol "MSNM" for protocol "mailto" -- Outlook Express
end tell

OR

tell application "Netscape Communicator™"
register protocol "MMan" for protocol "mailto" -- Emailer
end tell

The script may ask you to find your copy of Communicator, then it will launch it, and finally register the new email client. The next time you click on a mailto: link, your favorite email program will handle it!

If you want to go back to using the built-in emailer this little script cleanly undoes the damage:

tell application "Netscape"
unregister protocol "CSOm" for protocol "mailto:"
activate
end tell


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!


 


Pocket 48GBs and 30 Bucks with LaCie's PocketDrive - visit Smalldog.com
Pocket 48GBs and 30 Bucks with LaCie's PocketDrive - visit Smalldog.com

GUI Goodies
Clocks iTunes Skins
Desktop Pictures Makeovers & Skins
GUI Software Explorer Skins
Icons Propaganda Tiles
Interarchy Interfaces Themes
Throbbers
Home Page
Splash Screens
ATM Replacements
Application Splashes
Explorer Splashes
MacOS Startups (MOSS)
Netscape Splashes
MacOS X
MacOS X Mods
Login Panels
Boot Panels
Dock Poofs
Darwin
ResEdit
Classic ResEdit Mods
Getting Started
Download ResEdit
Resource/Template Archive
Helpful Sections
User Forum
About Us!
Icon Help
Site Map
Submission Policy
Suggestions/Email us
In Addition...
REALbasic
Snapshots
Advertising
Linux Icebox
Applescript/Scripting
Links Page
Download Stats

Maintained by the Staff of ResExcellence. This entire site ©1997-2001 ResExcellence L.L.C.
Privacy Statement? Sure we gotta Privacy Statement.
35678