MSScriptControl objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Powell

    MSScriptControl objects

    Hello all. Newcommer to the newsgroups so please let me know if Im not
    adhering to any policy.

    Ive setup an app (.NET app) which is using the MSScriptControl . I have the
    ActivePython package installed and the ActiveScript engine for Python
    registered. Thats all peachykeen.

    Im running into a problem whereby Objects that Ive extended to the script
    arent being 'seen' correctly by the engine. Other languages such as
    VBScript, JScript and RubyScript are dealing with and using the objects just
    fine. The following is an error that the pyscript engine returned upon using
    an object ive named 'Graphics'. The following error occurs when I try to use
    the methods, properties or subclasses of any object extended to the script
    via MSScriptControl .AddObject.

    Error Number : -2147352567

    Description : Traceback (most recent call last):
    File "<Script Block >", line 22, in Widget_Activate
    Widget_Paint()
    File "<Script Block >", line 36, in Widget_Paint
    Graphics.Clear
    File
    "C:\Python23\Li b\site-packages\win32c omext\axscript\ client\pyscript .py",
    line 146, in __getattr__
    return self._scriptIte m_.subItems[string.lower(at tr)].attributeObjec t
    AttributeError: 'NoneType' object has no attribute 'subItems'


    Line 145 Column -1

    I would greatly appreciate any feedback on this, and how to get objects
    extended to the scripts working in python.

    Thanks!




Working...