iTunes-- Controlling over a network

Hi,
This is my first post here!!!
Ok,
I wrote a program to control iTunes on another computer on my network.
It works great. Here is my problem.
I want to be able to see what song is playing on the other computer.
Here is my code.

	else if theObject is button "name" of window "Window" then
		tell application "iTunes" of machine "eppc:// other computer address"
			set nameOfSong to (get name of current track)
			set content of text field "songname" of window "Window" to nameOfSong
		end tell

I get this error when I compile:

On this error

is highlighted.

Any help would be great.
Thanks

—Max

In the code you provided, you’re telling itunes to set the text field content, rather than your own app. Try re-arranging like this…

   else if theObject is button "name" of window "Window" then
      tell application "iTunes" of machine "eppc:// other computer address"
         set nameOfSong to (get name of current track)
      end tell
      set content of text field "songname" of window "Window" to nameOfSong

Hope that does it…
j

It works!!!
Thank you so much.

—Max