AppleScript and Apple Remote Desktop



Similar documents
CHARTER BUSINESS custom hosting faqs 2010 INTERNET. Q. How do I access my ? Q. How do I change or reset a password for an account?

How to Setup your Account -Apple Mail for Mac OS X 1- Open Mail

Version Control with Subversion and Xcode

Hosting Users Guide 2011

How to configure your Desktop Computer and Mobile Devices post migrating to Microsoft Office 365

CEFNS Web Hosting a Guide for CS212

IMAP and SMTP Setup in Clients

Automating client deployment

Getting the most out of your new Aalto workstation An Aalto IT guide for personnel migrating to the new Aalto workstation environment

Team Foundation Server 2013 Installation Guide

Set up Outlook for your new student e mail with IMAP/POP3 settings

MAC OS 10.6 SNOW LEOPARD AND EXCHANGE SERVICES (MAIL, CALENDAR & ADDRESS BOOK)

NetIQ. How to guides: AppManager v7.04 Initial Setup for a trial. Haf Saba Attachmate NetIQ. Prepared by. Haf Saba. Senior Technical Consultant

GREEN HOUSE DATA. Services Guide. Built right. Just for you. greenhousedata.com. Green House Data 340 Progress Circle Cheyenne, WY 82007

Packaging for Distribution

EVault Software. Course 361 Protecting Linux and UNIX with EVault

Apple Mac VPN Service Setting up Remote Desktop

NovaBACKUP xsp Version 15.0 Upgrade Guide

Cloud Server powered by Mac OS X. Getting Started Guide. Cloud Server. powered by Mac OS X. AKJZNAzsqknsxxkjnsjx Getting Started Guide Page 1

Here are the steps to configure Outlook Express for use with Salmar's Zimbra server. Select "Tools" and then "Accounts from the pull down menu.

Installing Java 5.0 and Eclipse on Mac OS X

DESKTOP CLIENT CONFIGURATION GUIDE BUSINESS

F-Secure Messaging Security Gateway. Deployment Guide

IceWarp to IceWarp Server Migration

Outlook 2010 Setup Guide (POP3)

AutoCrypt 2.1 User Guide!

NovaBACKUP Storage Server User Manual NovaStor / April 2013

Ad Hoc Transfer Plug-in for Outlook Installation Guide

Network Shutdown Module V3 Extension of the User Manual for IBM BladeCenter architecture

1. Open Thunderbird. If the Import Wizard window opens, select Don t import anything and click Next and go to step 3.

with the ArchiveSync Add-On Evaluator s Guide 2015 Software Pursuits, Inc.

Migration User Guides: The Console Application Setup Guide

setup information for most domains hosted with InfoRailway.

Managing Software and Configurations

Pro Bundle Evaluator s Guide Software Pursuits, Inc.

Client Configuration Guide

Getting Started with Dynamic Web Sites

Volume SYNAMETRICS TECHNOLOGIES. A Division of IndusSoft Technologies, Inc. DeltaCopy User s Guide

Setting up a local working copy with SVN, MAMP and rsync. Agentic

IceWarp Server. Log Analyzer. Version 10

Getting started with IMAP for Aggi What is IMAP?

Cloud Backup Express

CrushFTP User Manager

FileMaker. Installation and New Features Guide. for FileMaker Pro 15 and FileMaker Pro 15 Advanced

Ipswitch Client Installation Guide

Remote ESL On A Mac With OS-X Using SSH Tunneling & Port Forwarding

Client configuration and migration Guide Setting up Thunderbird 3.1

User Guide. Version 3.2. Copyright Snow Software AB. All rights reserved.

E M A I L S E T - U P G U I D E

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

Net Protector Admin Console

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

Parallels. for your Linux or Windows Server. Small Business Panel. Getting Started Guide. Parallels Small Business Panel // Linux & Windows Server

Log Analyzer Reference

FTP Service Reference

FTP Service Reference

Setup Guide. network support pc repairs web design graphic design Internet services spam filtering hosting sales programming

NovaBACKUP. Storage Server. NovaStor / May 2011

User Manual Version User Manual A20 / A50 / A100 / A250 / A500 / A1000 / A2000 / A4000

NeoMail Guide. Neotel (Pty) Ltd

How to Move an SAP BusinessObjects BI Platform System Database and Audit Database

NovaBACKUP Central Management Console

NODE4 SERVICE DESK SYSTEM

MailEnable Installation Guide

Business mail 1 MS OUTLOOK CONFIGURATION... 2

A D M I N I S T R A T O R V 1. 0

Chapter 28: Expanding Web Studio

User guide. Business

Avalanche Remote Control User Guide. Version 4.1.3

Team Foundation Server 2012 Installation Guide

USING OUTLOOK WITH ENTERGROUP. Microsoft Outlook

MailEnable Connector for Microsoft Outlook

NSi Mobile Installation Guide. Version 6.2

Bitrix Site Manager ASP.NET. Installation Guide

Clearswift Information Governance

BUILDER 3.0 Installation Guide with Microsoft SQL Server 2005 Express Edition January 2008

1. Open the Account Settings window by clicking on Account Settings from the Entourage menu.

How to set up your Secure in Outlook 2010*

1. Navigate to Control Panel and click on User Accounts and Family Safety. 2. Click on User Accounts

Mail 8.2 for Apple OSX: Configure IMAP/POP/SMTP

RoboMail Mass Mail Software

Neoteris IVE Integration Guide

1 Getting Started. Before you can connect to a network

How to Create and Send a Froogle Data Feed

AutoDownload: SQL Server and Network Trouble Shooting

CONSOLEWORKS WINDOWS EVENT FORWARDER START-UP GUIDE

Installation Guide For Choic Enterprise Edition

Exchange Outlook Profile/POP/IMAP/SMTP Setup Guide

Training module 2 Installing VMware View

Web Testing, Java Testing, Server Monitoring. AppPerfect Installation Guide

Client Configuration Secure Socket Layer. Information Technology Services 2010

Install and Configure Oracle Outlook Connector

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault


Secure Outgoing Mail (SMTP) Setup Guide

1. Installation Overview

FTP Over SSL (FTPS) Core FTP LE. Installing Core FTP LE"

POP3 Connector for Exchange - Configuration

Using TLS Encryption with Microsoft Outlook 2007

Install MS SQL Server 2012 Express Edition

Transcription:

applescript and ARD 6/1/07 12:55 PM Page 2 AppleScript and Apple Remote Desktop Automating an automation tool Welcome By John C. Welch Ah, back again; into the breach, and this time, we look at two of my favorite tools, AppleScript and Apple Remote Desktop. I am not exaggerating in the least when I say that the day I found out that Apple Remote Desktop is scriptable, was the day that Apple Remote Desktop finally became, in my eyes, a real sysadmin tool. Why? Well, the best sysadmins are lazy. We don t like doing monkeywork, especially repetitive monkeywork; hence our love for scripting. We also realize that the more manual a process is, the more prone to error it becomes. Even if the script is buggy, a script is going to do a task the same way every time. The more we can script repetitive tasks, the more time we have for work that requires a human, and the fewer errors said tasks will have. The Basics To look at AppleScript in Apple Remote Desktop, we first have to see what we can and cannot do with Apple Remote Desktop's scripting implementation. Once that s done, we can we can get to work. As it turns out, it s simpler to just categorize what you can t script, and then you know you can script everything else. You can t directly set Apple Remote Desktop preferences, you can t authenticate new machines into Apple Remote Desktop, you can t script reports, and most computer properties are read only directly via AppleScript. Note that you can set quite a few properties via the systemsetup command and other command line applications, and you can use AppleScript to do this, but Apple Remote Desktop's dictionary doesn t yet offer you a way to say, change the IP address of a computer. So, what can you do then? Well, in three words: Tasks, Tasks, and Tasks. You can also modify computer lists, i.e. create them, add computers to them, etc. But the big thing is tasks. There are something like 23 separate tasks that you can run within Apple Remote Desktop, so even with the limitations, it s not useless at all. I have to give kudos to the Apple Remote Desktop team for giving us a more than usable dictionary in the first implementation of AppleScript in Apple Remote Desktop. It is much better than some of the other first implementations I ve seen, like Keynote or Pages. It s not everything, but it s a great first step. The Dictionary and Usage issues So, with the limitations in mind, how is the dictionary when you re working with it? Not bad at all. There are some issues, such as some really stilted class names. Every task class name ends with task ; so when you re doing a lot of work, you get things like set thetask to make new set network startup disk task It s not a huge issue, but it s tedious after a while, and you start thinking about old Department of Redundancies Department jokes. The other annoyance here is that you have to make the task then execute the task in a separate command. It would be much nicer to be able to just build and execute the task in one line. (Yes, I know, it should be theoretically possible, but the truth is, I ve never had it work right in one statement.) If you are doing a copy items task or copy to me task, (I think that splitting this into two statements was kind of silly, but to not give them more similar names, i.e. copy items to me task is even sillier. Consistency is important, even to sysadmins.), and you want to display a list of the standard destinations, such as /Applications, et al., you get instead a list of the 4-character AppleScript codes for them. There are a number of reasons for this, but in any event, it means quite a bit more work if you want to put it in front of someone who is a newbie in the sysadmin or Apple arenas. Speaking from a stricter POV, there are a lot of things in the Apple Remote Desktop dictionary that could have been 2

applescript and ARD 6/1/07 12:55 PM Page 3 done better, and hopefully, as items are added to it, those will be improved. But for now, what you have is not a sharp stick in the eye. Scripting Apple Remote Desktop So with all that in mind, let s look at what scripting Apple Remote Desktop is like. First, remember that other than list settings, everything you do is going to be a build task/execute task pair a tedious process, but not evilly so. One of the first things I ve done, due to my admittedly abnormal workflow which involves far more system rebuilding than I d like, is to simplify the setup of various computer lists that I know I ll use all the time. First, I create the lists: set thecomputerlist to {"President s Office", "Communications", "Print Shop", "Home", "Consulting", "Admin Macs", "Virex Updates"} --source list for computer lists repeat with x in thecomputerlist make new computer list with properties {name:x} -- iterate through the list Six lines, but it sets up my standard lists rather nicely. Since a few of my Apple Remote Desktop scripts are designed to run against hardcoded lists, making sure these lists always have the same name is critical. (Yes, I know, hardcoding bad. However, there s a bug in the Apple Remote Desktop AppleScript implementation where you can t just get the selected list. You can get the selected computers IN the list, but not the selected list itself). Once that s done, we add computers to the list(s): set thelistoflists to {} --I like to make sure of things set thelistoflists to name of every computer list --get all existing lists set thedestinationlists to choose from list thelistoflists with title "Computer Lists" with prompt "Pick the computer list(s) you want the selected computers to be members of" with multiple selections allowed --I have quite a few computers in multiple lists, so this lets me do that if I wish try --workaround for no choice if (length of thedestinationlists) 0 then --if there's no choice in choose list, this actually errors out silently if (length of thedestinationlists) = 1 then --if there's only one destination set thecomputers to the selection --get the list of selections if (length of thecomputers) > 0 then --no empty selections (REMEMBER ABOUT ARD AND THE CONSTANT SELECTION) set thedestination to item 1 of thedestinationlists --get the destination list name repeat with x in thecomputers add x to computer list thedestination --add a computer to the list. We have to use the keyword because of how choose list works else --multiple destination lists set thecomputers to the selection --get the list of selections if (length of thecomputers) > 0 then --no empty selections (REMEMBER ABOUT ARD AND THE CONSTANT SELECTION) repeat with x in thedestinationlists -- outer loop repeat with y in thecomputers --inner loop add y to computer list x --add the computer to the list This one is a bit more complicated, but only due to the logic in checking for 0, 1 or more than one computer or destination list selected. The reason I have REMEMBER ABOUT ARD AND THE CONSTANT SELECTION in many of the comments is that in Apple Remote Desktop, it s impossible to have no computers selected in any list. There is always at least one selected computer. I consider this a bug, you may not, but rather than assume Apple Remote Desktop will have this behavior until the end of time, I m proactive about handling zeros just in case ARD gets fixed. Now we have our lists set up. What s next? Well, we make sure that they re up to date. Now there re two ways to do this. The brute force way is to just select the computers and run all the updates. In ARD, since it doesn t yet support running Software Update in the GUI, you d either have to run this via a Unix command, or via AppleScript: set thescript to "softwareupdate -ia" --build the command for the Unix task set thetask to make new send unix command task with properties {showing output:true, user:"root", script:thescript} --build the task set theclients to the selection if (length of theclients) = 0 then --no sense in whining, and with the way Apple Remote Desktop works, I'm not sure this condition is possible, so an empty selection fails silently else if (length of theclients) = 1 then try display dialog "By default, ARD always selects the topmost computer in a list. If this is the computer you want to upgrade, click the \"Okay\" button" --This is a warning I put in, because ARD *always* selects the first client in a computer list, so while that avoids --a problem with an empty selection, it can create a problem if you don't notice that the wrong computer is selected --I only ask this if a single computer is selected set thetaskresult to execute thetask on theclients --run the task, save the results else if (length of theclients) > 1 then set thetaskresult to execute thetask on theclients --run the task, save the results --I use an else if, because I don't want any default that would run the task outside of the specific desired situation This is functionally quite simple. Build the Unix command, softwareupdate ia to install all available updates, APPLESCRIPT AND APPLE REMOTE DESKTOP 3

applescript and ARD 6/1/07 12:55 PM Page 4 build the send unix command task that uses that command, then run it on the selected systems. Note, you could code this to run on every computer in a given list, etc. One thing to note here: Apple Remote Desktop lets you run remote Unix commands as root without additional authentication. If you can run Apple Remote Desktop, you can run commands on any client that copy of the Apple Remote Desktop administrator console has access too. This is convenient, but can be dangerous too, so be careful. Note that it s not limited to root. You can run this as any valid user. Because Apple Remote Desktop always selects one computer, I put in a warning when you run it against one computer, just in case the default selection is a computer you didn t want to run this on. Also note that you can save the results of the send unix command task. This comes in handy if you need to use those results in your script. But what if we don t want to install every update blindly? Well, then we d need to get a listing of the updates we want to install: set thescript to "softwareupdate -l" --build the command for the Unix task set thetask to make new send unix command task with properties {showing output:true, user:"root", script:thescript} --build the task set theclients to the selection if (length of theclients) = 0 then --no sense in whining, and with the way Apple Remote Desktop works, I'm not sure this condition is possible, so an empty selection fails silently else if (length of theclients) = 1 then try display dialog "By default, ARD always selects the topmost computer in a list. If this is the computer you want to upgrade, click the \"Okay\" button" --This is a warning I put in, because ARD *always* selects the first client in a computer list, so while that avoids --a problem with an empty selection, it can create a problem if you don't notice that the wrong computer is selected --I only ask this if a single computer is selected set thetaskresult to execute thetask on theclients --run the task, save the results else if (length of theclients) > 1 then set thetaskresult to execute thetask on theclients --run the task, save the results --I use an else if, because I don't want any default that would run the task outside of the specific desired situation The only real difference here is the Unix command used. Other than that, it s pretty much the same script. From there, I run the install commands manually, because they re rarely all the same for every computer in a list, however scripting that part would be fairly easy. But all of these require some manual intervention. What if you just want to do something without having to select anything? Like say, run a third party updater against a constant set of machines in a constant list? For that we combine the power of folder actions with Apple Remote Desktop scripting: on adding folder items to thefolder after receiving theaddeditems --tell application "Finder" to set thefoldername to name of thefolder repeat with x in theaddeditems set thefileinfo to info for x --get info for the downloading file(s) set thebasesize to size of thefileinfo --get initial size delay 3 --wait 3 seconds set thefileinfo to info for x --get info again set thecomparesize to size of thefileinfo --get a newer size repeat while thecomparesize thebasesize --if they don't equal, loop until they do set thebasesize to thecomparesize --new base size delay 3 --wait three seconds set thefileinfo to info for x --get info set thecomparesize to size of thefileinfo --get a newer size --once the sizes match, the download is done set thepackageinstall to make new install package task with properties {delegating to task server:false, encrypting:true, packages:theaddeditems, stopping on error:false} set thetaskresult to execute thepackageinstall on computer list "Virex Updates" display dialog (status of thetaskresult) giving up after 60 end adding folder items to The outer loop is a folder action that runs when a file or files are copied or added to a given folder. The repeat delay loop is to work around a quirk in this folder action where it will sometimes start before the file(s) have finished copying. Once that s done, we have the Apple Remote Desktop-specific code. First, we build the install package text. I don t use an external task server, so that s set to false. I (of course) enable encryption for this task. By a happy coincidence, the way you enumerate the package(s) to be installed via this task is as a list. This is convenient, because the way this folder action deals with the files you are adding is as a list. So there s no need to change anything about the list of files you use in the folder action. You just pass it along to Apple Remote Desktop. We also set the task to not halt execution on error. Just because some of the targets have issues is no reason to stop everything. Once that s done, we run the task and save the result. The result is a record, and we use the value of that record to pop a dialog that tells us what happened, so we don t have to watch Apple Remote Desktop. I mean, if we re going to stare at Apple Remote Desktop, why bother scripting it? I originally wrote this script for my Virex updates, hence the list name. Obviously, you can apply this to any list you choose. So, you attach this script to a folder, and the next time you have to run an installer on that list, you just drop that installer in the folder. Barring it not running on one or more targets, that s it. No selecting, no watching Apple Remote Desktop. Drag, drop, and go on about your business. That s what I like. Let the software do the monkey work, I ve better things to do. Seriously though, when you start combining things like folder actions with ARD, that s when you start seeing the real convenience of the application. If you re building your own installer, just have the final step be to save it to the proper 4

applescript and ARD 6/1/07 12:55 PM Page 5 folder, and once the save is done, the install is happening automatically. Automation does not suck. (Speaking of automation a word on Automator. Pretty much anything you can do via AppleScript, you can build an Automator module for. I just don t happen to use Automator, but you could easily apply these scripts to Automator.) What if you need to push out a new version of an application that is installed via drag and drop in /Applications? Q.E.D: on adding folder items to thefolder after receiving theaddeditems --tell application "Finder" to set thefoldername to name of thefolder repeat with x in theaddeditems set thefileinfo to info for x --get info for the downloading file(s) set thebasesize to size of thefileinfo --get initial size delay 3 --wait 3 seconds set thefileinfo to info for x --get info again set thecomparesize to size of thefileinfo --get a newer size repeat while thecomparesize thebasesize --if they don't equal, loop until they do set thebasesize to thecomparesize --new base size delay 3 --wait three seconds set thefileinfo to info for x --get info set thecomparesize to size of thefileinfo --get a newer size --once the sizes match, the download is done set theapplicationcopy to make new copy items task with properties {conflict resolution:replace, copy items:theaddeditems, encrypting:true, location:applications folder, ownership:destination folder owner, stopping on error:false} set thetaskresult to execute theapplicationcopy on computer list "Software Updates" display dialog (status of thetaskresult) giving up after 60 end adding folder items to There s really not a lot of difference between the installer script and the copy script. Again, we let the folder action handle passing the file(s) to be copied to the copy items task. Since it s going into /Applications, we set the destination to applications folder. We set the permissions so that the application is owned by the owner of /Applications, and we don t want it to halt on error. Something a bit more complex Now this is all good stuff, and I use these. But what about something a bit, oh, cooler? For example, while Apple Remote Desktop allows a client computer to signal the administrator, that pretty much requires you to have the Apple Remote Desktop menu item running. However, there are a few reasons why you wouldn t want this running. So then what? If you re in the room, say in a lab, then they can get your attention with ease. But what if you re in a different building? Email s an option, but only if you read it. How about if they could send you an email that would then be processed by the email client s scripting facility, and then tell Apple Remote Desktop to open an observe window to that client? You d have a neat set of scripts like the ones I toyed with a while ago. This requires the XMail OSAX from Lestang.org at http://www.lestang.org/rubrique9.html. There are a few pieces to this setup. First, we have the client piece: property thesenderemailaddress : "" --fill in here with the appropriate origination email address. you could probably pull this from the system if you want property thesenderuserid : "" --email userid for the sender property thesenderpassword : "" --email password for the sender property therecipientemailaddress : "" --the account that gets the help request emails property thesmtpserver : "" --smtp server this application uses set thesysteminfo to system info --grab various bits of info. Feel free to modify for your needs set theuserlongname to long user name of thesysteminfo set theusershortname to short user name of thesysteminfo set theuserid to user ID of thesysteminfo as text set thecomputername to computer name of thesysteminfo set theuserhomedir to home directory of thesysteminfo as text set theipaddress to IPv4 address of thesysteminfo set thesystemversion to system version of thesysteminfo --have the user enter a short problem description set thehelprequest to text returned of (display dialog "Enter a *short* description of the problem and click \"OK\"" default answer "enter short description here") --build the email contents set Contents to "User: " & theuserlongname & " " & "User Short Name: " & theusershortname & " " & "UserID: " & theuserid & " " & "User Homedir Path: " & theuserhomedir & " " & "Computer Name: " & thecomputername & " " & "Mac OS X Version:" & thesystemversion & " " & "System IP Address: " & theipaddress & " Needs help with: " & thehelprequest --this uses the Xmail OSAX (in the bundle) to send a message. It's a pretty sweet bit of work, and quite flexible. send mail to therecipientemailaddress from thesenderemailaddress subject "Student Help Request!" body Contents username thesenderuserid password thesenderpassword authentication auto port 587 priority 1 SMTP server thesmtpserver without ssl Pretty simple. You manually set up a few properties and then copy this to all the clients. When they run it, it pulls in some basic information from system info, builds a message that is designed to be easily parsed, then sends it with the Xmail OSAX. From there, we move to the next script, which is kicked off by a Microsoft Entourage Rule that uses the subject line Student Help Request in a mail rule to run our second script. I did get this working with Mail, but Mail s AppleScript implementation in Mac OS X 10.4 has some extreme issues, and required a third folder action script to get it to work. If anyone wants it, email me at jwelch@bynkii.com and I ll send it to you. The script Entourage kicks off is: property Bodies : {} property thelongusername : "" property theshortusername : "" property theuserid : "" property thehomedirpath : "" property theosversion : "" property theipaddress : "" APPLESCRIPT AND APPLE REMOTE DESKTOP 5

applescript and ARD 6/1/07 12:55 PM Page 6 property theproblem : "" property thecomputername : "" --this is the e'rage specific part, and is how we get the message(s) that set off the rule tell application "Microsoft Entourage" set Bodies to {} set List to current messages repeat with x in List --note that you're usually only going to have one message at a time. However, it's always a list so we get more flexibility for the same amount of code set the end of Bodies to the content of x set olddelims to AppleScript's text item delimiters --if you notice, I use a lot of tabs in the email body. This is why set AppleScript's text item delimiters to " " --use tabs as the delimiters repeat with x in Bodies set to every paragraph of x --list of paragraphs, one line per item set thelongusernameparagraph to the first item of --you can really do all these steps in one line per step set thelongusername to the last text item of thelongusernameparagraph --but I wanted to make it more clear for newbies set theshortusernameparagraph to the second item of --this is where we grab the individual data bits for the alert set theshortusername to the last text item of theshortusernameparagraph --you could easily format the email message so that it --already had the structure you want, and just dump all the contents into the alert in one step set theuseridparagraph to the third item of set theuserid to the last text item of theuseridparagraph set thehomedirpathparagraph to the fourth item of set thehomedirpath to the last text item of thehomedirpathparagraph set thecomputernameparagraph to the fifth item of set thecomputername to the last text item of thecomputernameparagraph set theosversionparagraph to the sixth item of set theosversion to last text item of theosversionparagraph set theipaddressparagraph to the seventh item of set theipaddress to the last text item of theipaddressparagraph set theproblemparagraph to the eighth item of set theproblem to the last text item of theproblemparagraph --display the alert message display alert thelongusername & " is having a problem" message "Computer: " & thecomputername & " IP Address:" & theipaddress & " OS Version:" & theosversion & " Homedir Path: " & thehomedirpath & " UID: " & theuserid & " Problem: " & theproblem giving up after 45 --tell Apple Remote Desktop to pop the observe window observe computer thecomputername set AppleScript's text item delimiters to olddelims --reset your delims, cleanup is good to activate --bring Apple Remote Desktop to the front. Really, you don't need this The email comes in and we tell Entourage to give us the content of the email. We then use the tabs in the email in conjunction with AppleScript s Text Item Delimiters, so we can pull the content we need out of the email with ease. From there, we fire off a dialog to the administrator telling them that a client has a problem, and then tell Apple Remote Desktop to open an observe session to that computer. Pretty spiffy. Conclusion I haven t even come close to the full potential of what you can do with Apple Remote Desktop's AppleScript implementation, but I hope I ve given you some neat ideas that point you in the right direction. Bibliography and References While there aren t any books or articles that I used for this, there are some resources that are indispensable: AppleScript and Apple Remote Desktop, are of course, from Apple Inc., and rather necessary to the process. Script Debugger from Late Night Software, the only tool that lets you easily debug folder action scripts when running as folder actions. I ll say it again, I d rather stop using AppleScript than stop using Script Debugger. XMail from Jen-Baptiste Le Stang. A great OSAX that makes emailing from AppleScripts a snap. The AppleScript-Users Mailing List. A phenomenal resource. MT About The Author John Welch <jwelch@bynkii.com> is Unix/Open Systems administrator for Kansas City Life Insurance (http://www.kclife.com/), a columnist for Datamation (http://itmanagement.earthweb.com/columns/appleent/), and a contributor for InformationWeek (http://informationweek.com/). He has almost twenty years of experience at making Macs work with other computer systems. John specializes in figuring out ways in which to make the Mac do what nobody thinks it can, showing that the Mac is a superior administrative platform, and teaching others how to use it in interesting, if sometimes frightening ways. He also does things that don t involve computertry on occasion, or at least that s the rumor. 6