User:Macowell/iChat Autoconnect
From 2007.igem.org
Download here: SynBERC iChat Auto-connect applescript
Program Overview
This is an applescript intended to automatically establish a full-screen iChatAV connection between two computers. This is the basic program flow:
- Set a hidden system preference that tells iChat to automatically accept incoming chat invitations (com.apple.ichat AutoAcceptVCInvitations 1)
- Log iChat in (Starting it if is not running)
- Set the status message to "autoconnect"
- Loop indefinitely, trying every 30 seconds to:
- log in (in case the connection gets messed up)
- check if the status message is "autoconnect, and if so, invite the specified user to a video chat (for us, either 'SynBERC MIT' or 'SynBERC Berkeley'). This allows users to control the script by changing the status message, instead of stopping it / restarting it.
- enter fullscreen mode (should be the video chat window, but this code isn't specific and might make any chat fullscreen, not sure)
Installation & Usage
- download it and store it someplace appropriate like your user's home directory.
- open it using the pre-installed script editor (just use spotlight to find it by typing apple-space + 'script editor'
- change the specified user if necessary (defaults to connect to 'SynBERC MIT')
- set the script to run every time the default user logs in: open system preferences -> accounts -> login items and add the script to the list.
Remember, the script will start iChat and set the status to 'autoconnect' every time it runs, and will try to initiate a videochat every ~36 seconds unless the status is changed from 'autoconnect'.
Macowell 18:24, 7 August 2007 (EDT)