Scripting Proteus to show iTunes

We are going to modify a existing script to tell Proteus to send a message with the current song, don’t worry it is not that intrusive it will only send one message per song and it will send it as an auto response to every one trying to contact you…

I’ve sent a modify script to Doug’s website but it has a lot of bugs so I’ve decided not to send another script but fix the bugs in the first one and tell you how to modify it…

First of all you will need Doug’s “Now Playing in iChat” script so download it before continue

In Proteus.app, create a new busy status named Music and leave the message in blank

Rename the script to"Now Paying in Proteus" then open the script in Script Editor.app

Now we need to find some strings and change them…

#This is a good move if you have a lot of Wintel users as contacts
#If you want the music emoticon for MSN service change this if not, go to next step
#Find

property message_prefix : «data utxt266B0020» – WAS "mx: " –
#Change to
property message_prefix : "(8) "

#Add this line after property message_prefix : "(8) "
property Escucho : "I’m listening "

#Find
on run
– some other lines here –
end
#Change to
on run
set e to my running_apps()
if e contains “iTunes” and e contains “Proteus” then
tell me to poll_itunes()
else
display dialog “iTunes and/or Proteus is not running at the moment.” buttons {“Quit”, “OK - Stay Running”} ¬
default button 2 with icon 2
if button returned of result is “Quit” then quit
end if
return 10
end run

#Find
on idle
– some other lines here –
end idle
#Watch the next change it is important. You need to set the correct number of your status by it’s position in the status combo
#Change to

on idle
set e to my running_apps()
if e contains “iTunes” and e contains “Proteus” then
tell application “Proteus” to set current status to statusset 11 – Change this ¬
number to the number by position of the new status
tell application “Proteus” to set cur_message to message of current status
tell me to poll_itunes()
else if e does not contain “iTunes” and e contains “Proteus” then
tell application “Proteus” to set message of current status to ¬
not_listening_message
end if
return 10
end idle

#Find
to poll_itunes
– some other lines here
tell me to do_ichat()
– some other lines here
tell application “iChat” to set message of current status to
– some other lines here
end poll_itunes
#Change to
to poll_itunes
– some other lines here
tell me to do_proteus()
– some other lines here
tell application “Proteus” to set message of current status to
– some other lines here
end poll_itunes

#Find
to do_ichat()
– some other lines here
end do_ichat
#Change to
to do_proteus()
tell application “Proteus”
try
if message of current status does not end with (nom & art) then
set message of current status to message_prefix & (Escucho & nom & art)
end if
on error errMs
display dialog errMs
end try
end tell
end do_proteus

#Save, close and follow the original script installation steps

I’m sure it works since I’m using it but maybe the method I’m posting to make the changes is not the best… feel free to ask if something go wrong

Now, if everything goes fine with this method I’ll post how to make changes to the same script to make it change your nick name instead

Have fun… :smiley:

can anybody update this to work with doug’s new version of “now playing in ichat” v1.8.1

or at least a link to where i can d/l the old version that this modification was written for??

I’m sorry i can’t help but i can’t even get Proteus to work any more so i have not tested it with the new script :frowning:

For me, it’s not working. All things with iTunes work… but Proteus behaves strange… when i set the message with

tell application "Proteus" to set message of current status to "foo"

Proteus will not use it (But if i check the message with “get message of current status” it will display the message i’ve set before)
anyone can help??