Steal iChat Buddy Image

This is an old script I’ve had lying around in my Code folder for a while now. It’s still pretty useful, even in Leopard. It basically takes a buddy’s image of your choice and uses it as your own. Furthermore, it attempts to save a copy of the buddy image on your desktop. It can be quite entertaining if not functional on occasions.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
try
	tell application "iChat"
 
		set everyAccount to name of every account
		set theAccount to (choose from list everyAccount with prompt ¬
			"Please select the account with the image you want:") as string
		set accountImage to image of account theAccount
		set oldImage to image
		set image to accountImage
 
	end tell
 
	set newImagePath to ((path to desktop as Unicode text) & ¬
		theAccount & ".tiff")
	set newImage to open for access file newImagePath with write permission
	set eof of newImage to 0
	write accountImage to newImage
	close access newImage
 
	tell application "Finder" to set file type of alias newImagePath to "tiff"
 
on error error_message
 
	try
		close access newImage
	end try
 
	if error_message is not "NSReceiverEvaluationScriptError: 4" then
		display dialog error_message buttons "Oops!" default button 1
	end if
 
end try

Leave a Reply