RSVP - Please Reply

Armin's Spot on the Web


Home

Impressum

My Code


What is a Weblog?

Pictures (.Mac)


NetNewsWire: More news, less junk. Faster

Discussion

Recent Discussion

Create New Topic


Safari Script - Send URL with iChat

More from the iChat scripting. Though you will start this script from Safari, which is why I classified it as a Safari script.

What it does: imagine you are browsing the web and found this great site you want to talk about with somebody else. You could send the URL by email, but that is so nineties. So you send it by chat. You copy the URL, open iChat, open a chat window, paste the URL press return... or you use this script. It will give you a list of currently available buddies and you can send the URL to one or more of them, hopefully starting a lively discussion.

Copy and paste this code into Script Editor or open in Script Editor

tell application "Safari"
	if exists document 1 then
		set message to name of window 1 & ": " & URL of document 1
	else
		return
	end if
end tell
tell application "iChat"
	set theList to id of every account where status is available
	set idList to choose from list theList
	repeat with x in idList
		-- strange workaround because iChat AV Beta returns strange things
		repeat with a in (every account where id is x)
			send message to a
		end repeat
	end repeat
end tell

Code is pretty clear, except for the workaround, where iChat AV Beta still shows some weird behaviour and you need an extra repeat loop to make it work. I hope that will be fixed in the full release.

Have fun!

More Scripts on RSVP

Discuss

Google
WWW RSVP.atsites.de

This page was last updated: Tuesday, November 18, 2003 at 12:45:18 PM
Copyright 2010 RSVP - Please Reply
Mail me @ arminbatmacdotcom
Create your own Manila site in minutes. Everyone's doing it!