Hi , there
I 'm trying to make an AppleScript, to open a connetion with iChat,but i don’t know how create a “new chat with person”.
can anybody help me?
Thanks
M!
Hi , there
I 'm trying to make an AppleScript, to open a connetion with iChat,but i don’t know how create a “new chat with person”.
can anybody help me?
Thanks
M!
tell application "iChat"
send "hola" to account "martin"
end tell
after I received this more complex
property watchedUser : ""
property message : ""
property idleTime : 15
on run
set watchedUser to first item of chooseChatUser()
tell me to activate -- bring to front
display dialog "Ambush '" & watchedUser & "' with message:" default answer "Hi there!"
set message to text returned of result
tell application "iChat" to activate -- bring to front
return idleTime
end run
on idle
if watchedUser is not "" and message is not "" then
tell application "iChat"
set theList to id of every account where status is available
end tell
if theList contains watchedUser then
sendChatMessageToUser(watchedUser)
quit
end if
end if
return idleTime
end idle
on quit
set watchedUser to ""
set message to ""
continue quit
end quit
on chooseChatUser()
tell application "iChat"
set theList to id of every account where status is not available
return choose from list theList without multiple selections allowed
end tell
end chooseChatUser
on sendChatMessageToUser(userID)
tell application "iChat"
-- strange workaround because iChat AV Beta returns strange things
repeat with a in (every account where id is userID)
send message to a
end repeat
end tell
end sendChatMessageToUser