[python-win32] XP sp2 permissions

Ronnie Jones 7qrj45 at clayelectric.com
Wed Apr 27 14:38:02 CEST 2005


I just recently installed ActivePython 2.4.2 build 245 on XP sp2 and
none of the programs that is use for automating COM objects seem to
work.  The script is running on the local machine trying to operate
local COM objects.

 

Sample script:

 

import win32com.client

import win32api

 

def _BusyWait(self):

            win32api.Sleep(100)

            while self.Busy:

                        win32api.Sleep(100)

                        print 'Busy:',

            win32api.Sleep(100)

            print '\n'

            print 'Finished Script'

 

path = 'http://www.foxnews.com'

endline = '\r\n'

shell = win32com.client.Dispatch('WScript.Shell')

shell.Run('IEXPLORE')

win32api.Sleep(5000)

ie = win32com.client.GetActiveObject('InternetExplorer.Application')

print ie.LocationURL

shell.AppActivate('ClayNet')

win32api.Sleep(1000)

shell.SendKeys('\t')

win32api.Sleep(100)

shell.SendKeys(path)

win32api.Sleep(100)

shell.SendKeys(endline)

_BusyWait(ie)

 

The error I get is:

 

At the GetActiveObject line I get "Operation Unavailable"

The Shell part and the win32api sleep function seem to work normally.  I
get this same behavior from the wmi interface COM objects.

 

Question:  What permissions need to be set to these types of objects as
well as Word, Outlook, Excel, Power Point etc.?

 

Ronnie Jones

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20050427/9e4c0c6c/attachment.html


More information about the Python-win32 mailing list