1 global HandyAdiumScripts
4 tell application "Adium"
5 set c
to count chat
windows
7 tell account (HandyAdiumScripts's defaultAccount)
8 set newChat
to make new chat
with contacts {
contact (HandyAdiumScripts's defaultParticipant)}
with new chat
window
9 set newChatWindow
to (
get window of newChat)
10 if (
count chat
windows of application "Adium")
is not c +
1 then
11 close newChatWindow
--restore
14 if (
count chats
of application "Adium")
is not c2 +
1 then
15 close newChatWindow
--restore
18 if (
count chats
of newChatWindow)
is not 1 then
19 close newChatWindow
--restore
22 set newChat2
to make new chat
with contacts {
contact (HandyAdiumScripts's otherParticipant)}
at end of chats
of newChatWindow
23 if (
count chat
windows of application "Adium")
is not c +
1 then
27 if (
count chats
of application "Adium")
is not c2 +
2 then
31 if (
count chats
of newChatWindow)
is not 2 then