Itunes sdk help

I'm not a com programmer by any stretch of the imagination. I'm looking to create (javascript, windows scripting, perl, python, whatever) a simple script that will set the rating of the currently playing track. For my purposes, I can hard code the rating into the script as I will execute it with AutoHotKey and just create a seperate script for each rating.
Can any of you scripting wizards out there give me a hint of how this would be done? I'm guessing it's only a couple of lines.

You're right. I just tried it in VBS and it works fine. I was working in python and it shows up as not object has no attribute. So it's definitely something funky I'm doing in Python.
Back to the drawing board
import win32com.client
iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application")
curr = iTunes.CurrentTrack
name = curr.Name
skipped = curr.SkippedCount
skipdate = curr.SkippedDate
print name
print skipped
print skipdate
Traceback (most recent call last):
File "C:\bin\skiptest.py", line 5, in <module>
skipped = curr.SkippedCount
File "C:\Python25\Lib\site-packages\win32com\client\_init_.py", line 454, in
_getattr_
raise AttributeError, "'%s' object has no attribute '%s'" % (repr(self), att
r)
AttributeError: '<win32com.gen_py.iTunes 1.9 Type Library.IITTrack instance at 0
x14463944>' object has no attribute 'SkippedCount'

Similar Messages

Maybe you are looking for

  • Problem BAPI_PROCORD_CHANGE field QUANTITY_UOM

    Hello, I am calling bapi BAPI_PROCORD_CHANGE with parameters: ls_order_data-quantity          = '1241'. ls_order_data-quantity_uom      = 'CS'. ls_order_data-prod_version      = '2000'. ls_order_datax-quantity            =  'X'. ls_order_datax-quanti

  • Rehosting JavaFX 1.3 runtimes

    My company has a JavaFX 1.3 application that is part of a suite of tools we sell to mostly government customers. At least some of our customers have closed networks, meaning no access to dl.javafx.com. Furthermore, our application is complex, and can

  • Can't use/alter some of the AME presets

    Hey, I have a problem with the Media Encoder. In there I can't use or alter some of the presets (broadcast: MPEG2, MXF OP1a, Camera: HDV, DVD & Blu-ray: DVD). They show up but I can't twirl down the arrow. In Premiere Pro I can choose those settings

  • Updated from Acrobat 5 to 7, seems to do far less. Need help.

    I just "updated" from Acrobat Standard 5 to 7, but I guess I wasted my money. It doesn't seem to do half of what 5 did! Some upgrade! Ok, now that I've vented, please tell me there's a way to select objects to delete them. I've tried the "Object Data

  • Interface between Labmax and Labview

    Hi all, I am trying to control a laser energy meter, Labmax-top, with labview using labview drivers provided by the meter's manufacturer (coherent). Once running the labview driver an error message appears saying that the sensor index cannot be found