iTunes Plugin

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Thu Sep 10, 2009 12:57 pm

Hi James!
I have tried your Plugin for iTunes and I really like it! I'm using iTunes all the time so I where really happy, that there is a plugin :)

but i am new, and do not really now the programm eventghost, and i just do not know how to programm things :D so i've just a few questions concerning your plugin

i do not understand some of the functions you placed in your plugin
a) set volume level
b) toggle fullscreen
c) the information things, like get title and so on

i would really love it when you could explain them to me and how i have to use them!
i'm looking foreward to your answer :wink:

greetings David

(sry if there are some faults, i am not from england.. just learning english at school :D)

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Thu Sep 10, 2009 1:56 pm

I am glad someone is using it. I will try to add some more functions in the future if people are actually using it!
knaegge wrote:
i do not understand some of the functions you placed in your plugin
a) set volume level
Your english seems quite good so I assume you know what volume means. I think this one is pretty simple. If you set volume to 0 sound will be off. If you set set volume level to 100 it will be very loud. It is the same as adjusting the volume slider in itunes.
knaegge wrote: b) toggle fullscreen
this only works if you are using visualization. (Ctrl-T in itunes). It will switch the visualization back and forth between window mode and fullscreen.
I realize now that I need to add a command to turn on visualization!

knaegge wrote: c) the information things, like get title and so on
This is a bit more complicated, but still easy once you know how to use it. Each of these commands asks itunes for information about the song that is playing. the anwer is stored in a variable called 'eg.result'. A lot of plugins use this method to retrieve information.

To see the result you can for example, use the 'show OSD' action. click 'add action' then look in the tree under eventghost. 'show osd' is the last item. When you add the action a window will pop up with settings. There is a box called 'text to display'. here you can type any text you want to display. Type the following in the box: {eg.result}

you should be able to copy and past this into the configuration tree in event ghost for an example...

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
    <Macro Name="Get Title" Expanded="True">
        <Action>
            iTunes.GetTitle()
        </Action>
        <Action>
            EventGhost.ShowOSD(u'{eg.result}', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
        </Action>
    </Macro>
</EventGhost>
knaegge wrote: i would really love it when you could explain them to me and how i have to use them!
i'm looking foreward to your answer :wink:

greetings David
Thanks for your interest. I hope it works for you.

J

knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Thu Sep 10, 2009 4:50 pm

hey!
yes i understood using the "set volume level" i think, so i can put there a volume (like 100) und then when i press the button the volume jumps to 100 right? is it posible to press volume up and the volume goes just 1 step up? or maybe then oder something, becuase i can't make a button on my remote control for every volume ;)

okay you're right, the fullscreen toggle is really good, i like the visualization in iTunes and if you maybe could add a command to turn on visualization it would be great!

okay maybe i'll try the information thing one time later, but i don't think i need it because i know the songs i want to hear, buts its a really good idea :P

now i've got another problem :mrgreen: i have now about 5 itunes in my pluginlist when i want to choose one and i don'T know wich itunes is which.. is there a posibillity to delete a few from the plugin list? (hm.. sounds like i silly question, i think the answer is really easy. but i can't imagine :D)

greetings David

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Thu Sep 10, 2009 9:02 pm

knaegge wrote:hey!
yes i understood using the "set volume level" i think, so i can put there a volume (like 100) und then when i press the button the volume jumps to 100 right? is it posible to press volume up and the volume goes just 1 step up? or maybe then oder something, becuase i can't make a button on my remote control for every volume ;)

okay you're right, the fullscreen toggle is really good, i like the visualization in iTunes and if you maybe could add a command to turn on visualization it would be great!
OK. I will work on volume up/down and toggle visualization.
knaegge wrote:now i've got another problem :mrgreen: i have now about 5 itunes in my pluginlist when i want to choose one and i don'T know wich itunes is which.. is there a posibillity to delete a few from the plugin list? (hm.. sounds like i silly question, i think the answer is really easy. but i can't imagine :D)

greetings David
sorry, I really don't know what you are talking about here. you could try asking for help in a more general eventghost forum, or maybe try posting a picture to show me what you mean.

J

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Thu Sep 10, 2009 10:19 pm

here's the next version
Attachments
__init__.py
added commands
-modify volume (+/- %)
-toggle visualization
(25.8 KiB) Downloaded 464 times

knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Fri Sep 11, 2009 3:35 pm

i've deleted now the itunes folders that were the wrong out of the pluins folder and aut of the bin and now there is only one ;-)

i'll try the next version soon and then i'll tell you what i think about it

another question, here in our house are two computers form aldi, so they are both from medion, with a tv card and a remote, they've got different remotes(both running with XP). when i'm using my remote now, the other computer is reaction on the signals to, is there a possibility to set up the remote controls in a way that they are only working with one computer?

knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Fri Sep 11, 2009 4:15 pm

okay now i know how to solve my problem
i don't know the names in english, so some names will be in german.. sorry :mrgreen:
it is possible to change the chanel/port of the remote control, just go to "systemsteuerung" (system control?) and there should be a icon for "fernbedienung" (remote control should it be in english) so i programmed channel 2 for my dads computer and now i want to programm mine.. problem: i want evenghost to work without problems so i have NOT installed the "treiber" (driver?). and without "treiber" (driver...^^) there is no icon for my remote control in the "systemsteuerung" (system control :mrgreen: )
what should i do now?


aaaah! oh no... -.-
i am always using the newest version of itunes because oft my ipod and because i really like itunes, since today there is a new itunes, is it possible that the itunes plugin now is not working with the new itunes because apple changed the settings? i really hope this is not the case...

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Fri Sep 11, 2009 5:03 pm

I would be very surprised :shock: if it did not work with the newer version of itunes.

It would probably not work with a very old version of itunes though.

I don't know what kind of remote you have but if you need help with it you should try to find a forum specific to that device.

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Fri Sep 11, 2009 5:06 pm

knaegge wrote:i have NOT installed the "treiber" (driver?). and without "treiber" (driver...^^) there is no icon for my remote control in the "systemsteuerung" (system control :mrgreen: )
what should i do now?
it's just a wild guess but maybe you should install the driver! :lol:

knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Sat Sep 12, 2009 1:48 pm

since the new version of itunes everytime i try to use evenghost and my remote there appears an error message: "iTunes is not running"
so whats the problem?

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Sat Sep 12, 2009 2:07 pm

what version of itunes do you have installed?

are you using the plugin to call the "run Itunes" command first?

knaegge
Posts: 9
Joined: Thu Sep 10, 2009 12:48 pm

Re: iTunes Plugin

Post by knaegge » Sat Sep 12, 2009 3:26 pm

i am using iTunes 9.0.0.70

i do not really understand your question... but all i know is iTunes was actually running and i tried some buttons on my remote control but all that happened was the error message

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Sat Sep 12, 2009 5:38 pm

ya you are right. Itunes 9 doesn't work. It looks like apple broke (or removed) the com interface. Sorry.

Your only option for now is to go back to iTunes 8 if you want to use eventghost. Of course, you can do some basic control of itunes 9 using eventGhost keyboard emulation if you want.

I don't actually use itunes... After version 9 has been around for a while I might take another look to see if this is fixable.

Looks like version 9 may have some other major problems anyway, so you might want to stay with version 8 for now unless there is some new feature in 9 that you must have.

J

stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: iTunes Plugin

Post by stottle » Sat Sep 12, 2009 11:31 pm

Just to throw in more confusion:

A google search didn't turn up anything about getting rid of the COM interface, so I tried installing v9 on a VM that was clean. There's no sound card emulation in the VM, so lot's of things didn't work, but I was able to attach to the COM interface and send a few commands. This was from the python shell, but I tried a few things from the plugin that worked as well.

Did nothing work for you, or were only certain commands not working? Maybe a problem with the upgrade vs. clean install?

Brett

User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: iTunes Plugin

Post by jitterjames » Sun Sep 13, 2009 11:49 am

nothing works. The command to start itunes generates the error "itunes not running".

Also, I have a c# project that won't compile because the references to the com interface don't work anymore.

After upgrading itunes, mediamonkey was generating errors on startup and I had to remove a file called something like "iphone.dll" from one of the mediamonkey folders. I don't own any ipod/phones so it didn't matter to me.

Like you say, there is nothing on google yet so I figured I would wait a while until someone else figures it out and posts an article or something, then if I find anything and need help with the connection thread, I'll send you whatever info I can find.

No rush for me since I don't use iTunes at all. Thanks for looking into it though.

Post Reply