saving eppc username and passwords??

So I’m working in a home automation program called Indigo, which is pretty cool. One of the tasks is for the server to play iTunes on a remote mac on the LAN.

I’m about 99% of the way there, but whenever the command is run after a re-start, the server asks for authorization… so I have to manually enter the password, and selecting “add to keychain” doesn’t work across re-starts of the server.

The line of the apple script is

property remote_IP : "eppc://192.168.5.17"

Everything I’ve looked up says that what is below should work, but it doesn’t.

property remote_IP : "eppc://username:password@192.168.5.17"

I’m always asked for the password the first time after a restart that this event happens.

I’m not a script expert, but have managed to cobble together bits and pieces of code to get done what I need, but this last part remains a problem. Some sources say this is broken in 10.9, and if so, I can make do. But if there is a known workaround, I’d love to see about implementing into my current script.

Thanking you in advance.

Spoke too soon!!!

Found this online and it works just as it should!

set theRemoteMac to "eppc://username:password@server.local"

using terms from application "iTunes"
   tell application "iTunes" of machine theRemoteMac
       play
   end tell
end using terms from