473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

win32com.client.GetActiveObject()

Hi,

I have been successfully using iTunes' COM interface with Python
using either of the following lines successfully:

iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Ap plication")
iTunes = win32com.client.Dispatch("iTunes.Application")

The only problem is that it will launch iTunes if it is not running
by instantiating the object here. There are some reasons why I have
not attempted to use more COM to check if iTunes is an active
process, I tried either of the following lines to only form a
connection if iTunes is running.

iTunes = win32com.client.GetActiveObject("iTunes.Applicatio n")
iTunes = win32com.client.GetObject(Class = "iTunes.Application")

Both lines result in a pythoncom.com_error with 'Operation
unavailable' in the second element of the tuple. Has anyone been able
to successfully do this with iTunes' COM server? I have seen other
'Operation unavailable' messages in a few other mailing lists but was
unable to find any solutions to this problem.

Regards,
David

Sep 19 '05 #1
1 10454
Basically, this means the application doesn't register itself
with the Running Object Table. There's not much you can
do about it, except maybe petition whoever makes ITunes.

Roger

"David Nicolson" <da************@hotmail.com> wrote in message news:ma************************************@python .org...
Hi,

I have been successfully using iTunes' COM interface with Python using either of the following lines successfully:

iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Ap plication")
iTunes = win32com.client.Dispatch("iTunes.Application")

The only problem is that it will launch iTunes if it is not running by instantiating the object here. There are some reasons
why I have not attempted to use more COM to check if iTunes is an active process, I tried either of the following lines to
only form a connection if iTunes is running.

iTunes = win32com.client.GetActiveObject("iTunes.Applicatio n")
iTunes = win32com.client.GetObject(Class = "iTunes.Application")

Both lines result in a pythoncom.com_error with 'Operation unavailable' in the second element of the tuple. Has anyone been
able to successfully do this with iTunes' COM server? I have seen other 'Operation unavailable' messages in a few other
mailing lists but was unable to find any solutions to this problem.

Regards,
David


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly...
3
by: RJ | last post by:
Hi, I've been going over the Quick Start to Client side COM and Python and many other sources, but cannot find an example that will get my com/ActiveX .ocx USB device driver imported. The Excel...
0
by: Paul McGuire | last post by:
Software versions: Python - 2.3.3 win32all extensions - build 163 OS- Win2000 SP4 I am having trouble in accessing a customer's proprietary COM type library. After running makepy against the...
2
by: Sibylle Koczian | last post by:
Hello, I've installed Python 2.4 and the win32 extensions, using administrator rights, under Windows XP in "C:\Programme". As this is a directory without spaces I didn't expect any problems. But...
3
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two...
2
by: Ray | last post by:
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid
11
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which...
4
by: sterling | last post by:
I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co =...
2
by: RyanN | last post by:
Greetings, I'm trying to get DispatchWithEvents() to work with HyperAccess (terminal program) without much success. I've done a bunch of searching and found some examples using IE: This works...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.