Select Mail.app sender for iCal invitations and replies
One thing that irks me about the iCal.app / Mail.app integration on OS X is that iCal chooses (based on some unknown criteria and without user input) the sending address (and hence account) from which to email invitations and responses to invitations. Since I have multiple calendars and multiple email accounts, it is often that I want to choose the specific account when sending an invitation or replying to an invitation. This 40KB tar file contains the iCal AppleScript changes necessary to create an account selection box prior to sending these emails. Once a sending address is selected and OK is clicked, Mail.app will proceed with sending the iCal invitation, or replying from the account corresponding to the chosen email address. Here's how to install the modified code. First, quit iCal and create a backup. You can do that however you wish; her...
published on Friday, the 31. October 2008, macosxhints
Sync with .Mac (MobileMe) from the command line
I noticed a new post on a very old thread on the Mac OS X Hints forums site, which was about being able to start a sync to .Mac (MobileMe) from the command line. The new post showed how to use an AppleScript to control the MobileMe preferences pane and then click the Sync Now button. While this may work, I suspected that there must be a better way, and so I had a dig around. I found dotmacsyncclient, located in /System » Library » PrivateFrameworks » DotMacSyncManager.framework » Versions » A » Resources. Further investigation showed that, indeed, you can start a sync from the command line -- and much more. Note that the following examples assume you have cd'ed into the above directory first...
published on Tuesday, the 2. September 2008, macosxhints
10.5: Quick note creation in Mail via AppleScript
I'm always searching for something to write on when I want to take a quick note. I know that Mail in 10.5 includes a note function, but it's usually been too much trouble to launch Mail and then navigate the menus to select a new note. So I finally put together this little AppleScript that I use with Quicksilver's hotkeys to launch a new note with just one keystroke: tell application "Mail" activate end tell tell application "System Events" tell process "Mail" click the menu item "New Note" of the menu "File" of menu bar 1 end tell end tell I save the script as an application, and assign it to the F7 key in Quicksilver. Now when I need to take a quick note, it's just one key press away. As an alternative to using Quicksilver's hotkey, this script can be saved as an application and placed in the Dock, making a new note just one click away.
published on Wednesday, the 9. July 2008, macosxhints
fn 1.1
[fn 1.1] - Designed and Developed by circa86 in 2008. Mac OS X 10.5 & up. (Possibly works under 10.4) The purpose of 'fn' is simple. All Apple keyboards have an excellent set of hardware Fn keys to control things like brightness, volume, etc. But sometimes, those keys that are usually so helpful, can get in your way. There are many different high end Applications out there that use the F1-F12 (and beyond) keys as very important shortcuts. Apps like Maya, After Effects, and so on. Well 'fn' just makes jumping back and forth between your normal everyday workflow (where the hardware fn keys are very useful), and your higher end App workflow. 'fn' is just an App that merely changes a System Preference in one click, put the item in your Dock, launch it, and it will run quickly and turn ON/OFF the hardware shortcut keys. (If they are off you merely use the (fn) key + the normal hardware shortcut key as you normally would if this setting was checked). This Application was created using Applescript, and can be examined by simply right clicking on the App and clicking 'Show Package Contents' where you will be able to find the AppleScript, among other things. Feel free to utilize the embedded script in your own Apps, I would love to hear how it may be used, as I am always wanting to learn more. [for any issues or concerns, feel free to email me at]: circa86@gmail.com Enjoy!
published on Sunday, the 22. June 2008, scriptbuilders
iTunes Manager 2.8.1
iTunes Manager is a mini-window to iTunes that performs a number of functions beyond mere music playback. The functions include music alarm, playlist-track switching and selection, volume control, key information about the active track, playlist and track editing, and keyboard shortcuts for playback and other controls. iTunes Manager now wraps in AppleScript Studio interface the utilities to manage filetracks, track data and playlists, gaining the following advantages: it is now simpler and easier to run; the utilities are just a mouse-click away; response time to activate the utilities is quick; and, the overall interface is certainly more appealing than the pure AppleScript version. Refer to the ReadMe file for a summary of latest features. For help on the bundled tools and other features, consult the pull-down Help menu.
published on Saturday, the 24. May 2008, scriptbuilders
10.5: Eject stubborn disk images via AppleScript
Leopard sometimes can be a little reluctant to eject disks and disk images in the Finder. It doesn't matter if you click the Eject button in the Finder's sidebar, drag the disk to the Trash, or right-click and choose Eject, the Finder just silently ignores you. You can open Disk Utilty though and eject it fine that way (unless there are files open on the image, of course). This AppleScript will eject those troublesome disks: (* Eject Disks © RickoKid 2008 Version 0.1 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free...
published on Wednesday, the 21. May 2008, macosxhints
One way to quit ARD on a remote Mac via a local ARD
In some LAN configurations, there may be more than one Mac used to manage the others using Apple Remote Desktop. These may be physically separated by some distance. In such a situation, you may need to take control of one of the managing Macs from the other. But Remote Desktop won't let you control or view another Mac that is already running Remote Desktop.If you can ssh to that Mac, you can manually quit the program from the command line. If that Mac's settings allow other VNC clients to connect to it, you can also do that. But if those options aren't available, here's a simple trick to quit the remote Remote Desktop. Create an AppleScript with the following code:tell application "Remote Desktop" quitend tellSave it as an application, and test it locally. Then select the remote Mac from ARD's clients list and then Manage » Open Application. After ARD has grabbed the list of remote applications to pick from, click the + icon below the list ...
published on Monday, the 19. May 2008, macosxhints
10.5: Automatically set iChat status when in A/V chats
Here is a way to automatically change your status when sending or receiving audio/video invitations. You'll need to create four simple AppleScripts, and save them into your user's Library » Scripts » iChat folder (create the folder if necessary). Open Script Editor (in Applications » AppleScript), then copy and paste these scripts, one at a time, into the Script Editor window. Click the Compile button, then select File » Save As and point to the previously-noted iChat folder. Name them as shown with each scripts code, on the second page of the hint... Script name: iChat invited video.scpt using terms from application "iChat" on received video invitation theText from theBuddy for theChat set status to away set status message to "In conference" end received video invitation end using terms from Script name: iChat invited audio.s...
published on Wednesday, the 14. May 2008, macosxhints
Move and click the mouse via code
Most OS X apps can have their interface elements accessed by AppleScript, and so anything can be scripted. Unfortunately, not all apps use an Aqua interface, especially games with game-engine-rendered interface elements. This means AppleScript can't find buttons, etc., to click on, and you're out of luck trying to automate actions. Recently, I was given the unpleasant task of automating actions in such unfriendly apps. I just about went crazy trying to find a way to write a simple script with coordinates for mouse click events.There's nothing available within AppleScript for pushing the mouse around, and I couldn't find any command-line utilities either. Out of necessity, I wrote my own. This is my first time writing anything that even resembles Cocoa, and my first time writing code that compiles in nearly 10 years. I'm a scripting guy, and I just wanted to be able to write a script. What I wrote is a little command-...
published on Wednesday, the 14. May 2008, macosxhints
Burn multiple CDs at once in iTunes
This might fall in the semi-obvious category, but I'd never thought to try it ... if you've got a machine with multiple CD burners that iTunes recognizes, you can burn multiple CDs at a time. Set up the playlists you'd like to burn on each drive, insert blank CDs into the drives, and start the first burn. Then go to iTunes Preferences » Advanced » Burning, and select your second (or third, etc.) burner from the CD Burner pop-up menu, click OK, and start your next playlist burning. I burned two CDs at once on my Mac Pro, and both worked fine, so it seems iTunes can handle at least two at once. I don't have any other burners to attach, though, so I can't test more than that. Theoretically, you might be able to AppleScript this using GUI scripting, but that's beyond my skill set.
published on Friday, the 2. May 2008, macosxhints