Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Switch .Mac/AIM account between Adium and iChat Internet
I am mainly using Adium for instant messaging. However, due to limits in the file transfer capabilities of Adium, I sometimes need to switch to iChat, which involves taking my .Mac account in Adium offline, launching iChat, and going online there (I've set iChat not to go online at startup).

Here's a little AppleScript to automate this process. It basically toggles your .Mac/AIM account between Adium and iChat, so if your account in Adium is offline, it will take iChat offline and Adium online, and vice verca.

Note: If your account is an AIM account instead of .Mac, change Mac in the second line to AIM.
tell application "Adium"
  set adiumAccount to ID of first account whose serviceID is "Mac"
  set adiumOnline to online of account id adiumAccount
end tell

if adiumOnline then
  tell application "Adium" to disconnect (account id adiumAccount)
  tell application "iChat" to log in service "AIM"
else
  tell application "Adium" to connect (account id adiumAccount)
  tell application "iChat" to log out service "AIM"
end if
Save it into your user's ~/Library/Scripts folder, and invoke it via your preferred launcher to make this switching nearly instant.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[17,518 views]  

Switch .Mac/AIM account between Adium and iChat | 11 comments | Create New Account
Click here to return to the 'Switch .Mac/AIM account between Adium and iChat' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Switch .Mac/AIM account between Adium and iChat
Authored by: jump420 on Mar 09, '06 08:43:19AM

I don't think this is working properly on my setup. I setup the script but it doesnt' do anything. The only thing it does do is if I have Adium and iChat not running it will launch Adium.

Any suggestions?



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: syko on Mar 09, '06 08:44:26AM

just do what i do--
get a separate AIM account that u use ichat with to send files!



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: peragrin on Mar 09, '06 01:08:12PM

While useful It's just as easy to start ichat with go online at startup.

It will force kick adium offline for all accounts that start up under ichat. Other people will see you go offline and then come back after a few seconds and you can continue chatting with them there.



---
I thought once I was found but it was only a dream



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: cwatts on Mar 10, '06 05:47:12AM

Why not just log in on Adium, and you'll be logged out of AIM automagically. Then, when you're done with Adium, you'll be logged out of Adium just as easily.

Or am I missing something?

---
sttaw sirhc



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: phountinhed on Mar 09, '06 03:24:22PM

I just check "Allow multiple logins from this account" under the Accounts tab in iChat Preferences to avoid this problem.

With that setting enabled, I can be logged in with both clients simultaneously.

Regards,

K



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: THEM on Mar 09, '06 05:54:19PM

And when you're logged into both set Adium to away and all messages will default to the client that isn't away.

---
--
The preceding message does not represent the views of the sender.



[ Reply to This | # ]
Misunderstanding?
Authored by: bedouin on Mar 09, '06 03:24:43PM

I thought you could remain on-line at two locations with AIM?



[ Reply to This | # ]
Works for me
Authored by: jweaks on Mar 09, '06 10:47:07PM

This is very helpful. I jump from Adium to iChat to start up a video chat. Now one-click does it all.



[ Reply to This | # ]
Misunderstanding?
Authored by: leamanc on Jan 22, '08 10:49:17AM

No, you can't be online from two different computers (or IM apps on the same computer) with AIM. AIM will send you a message saying that only one can be connected and to type "1" to disconnect other sessions.



[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: geppo1982 on Mar 10, '06 01:43:04AM
Great script, thanks!

I added some lines of code to also quit the app you are leaving:

tell application "Adium"
	set adiumAccount to ID of first account whose serviceID is "AIM"
	set adiumOnline to online of account id adiumAccount
end tell

if adiumOnline then
	tell application "Adium"
		if (count (accounts)) = 1 then
			quit
		else
			disconnect (account id adiumAccount)
		end if
	end tell
	delay 1
	tell application "iChat" to log in service "AIM"
else
	tell application "iChat"
		log out service "AIM"
		quit
	end tell
	delay 1
	tell application "Adium" to connect (account id adiumAccount)
end if

Sorry for my bad English.

[ Reply to This | # ]
Switch .Mac/AIM account between Adium and iChat
Authored by: rossr on Jan 21, '08 04:27:23AM
Applescript support for Adium 1.2 has been completely re-written, so the code above will not work anymore. After digging around, I have re-written the Applescript to work with Adium 1.2x. This script should probably be optimized a bit more (if you have multiple AIM accounts registered in Adium, for example), but it should be a good starting point! :)
(*
	Toggle between Adium and iChat
	(for Adium 1.2)

*)

-- what apps are currently running?
tell application "System Events"
	set aApps to name of every application process
end tell

tell application "Adium"
	try
		-- what's adium's AIM status?
		set adiumAIMStatus to the status type of account of service "AIM" as string		
		if adiumAIMStatus is not "offline" then
			-- if the status is not "offline" set adiumAIMOnline to "yes"
			set adiumAIMOnline to true
		else
			-- if the status is "offline" set adiumAIMOnline to "no"
			set adiumAIMOnline to false
		end if
	end try
end tell

if adiumAIMOnline then
	-- if adiumAIMOnline is "yes" then:
	-- adium: logout of AIM
	tell application "Adium" to go offline of every account of service "AIM"
	delay 5
	-- ichat: login to AIM
	tell application "iChat" to activate
else

	-- if adiumAIMOnline is "no" then:
	-- ichat: if you're running, quit

	if "iChat" is in aApps then
		tell application "iChat" to quit
	end if
	delay 5

	-- adium: login to AIM

	tell application "Adium" to go online of every account of service "AIM"
end if




[ Reply to This | # ]