[python-win32] More IE jscript to Python com woes

Craig H. Anderson craig at coot.net
Thu Oct 14 22:29:27 CEST 2004


Thank you, Mark Hammond, your help is much appreciated.
I got further this time, but still have problems. 

An error dialog pops up with this:
A Runtime Error has occurred.
Do you wish to Debug?
Line: 24
Error: Automation server can't create object 

In the Pythonwin trace window:
Object with win32trace dispatcher created (object=None)
ComGcsMosaixApp.__init__() 8
in <ComGcsMosaixApp.ComGcsMosaixApp instance at 
0x04583558>._InvokeEx_-GetInterfaceSafetyOptions(IID('{BB1A2AE1-A4F9-11CF-8F 
20-00805F2CD064}'),) [1,0,None] 

# My Python code
from win32comext.axscript.client.framework import COMScript 

class ComGcsMosaixApp(COMScript):
   _reg_progid_ = "GCSMosaix.app"
   # use "print pythoncom.CreateGuid()"
   _reg_clsid_ = "{C5A4B907-053E-4953-B20D-93DF6598CAE1}"
   _public_attrs_ = ["Version","Dispo"]
   _readonly_attrs_ = ["Version"]
   def __init__(self):
       COMScript.__init__(self)
       self.dispoActive = 0
       self.Version = "MyVersion"
       self.Dispo = -1
       print 'ComGcsMosaixApp.__init__() 8' # debug 

// jscript code on ASP page
function onSend()
{
 var app = new ActiveXObject("GCSMosaix.app")
 app.Dispo = 78
 document.jscript.action.value="btnSendDispo"
 document.jscript.submit()
} 



More information about the Python-win32 mailing list