Hello!
First what you need is the MS-ScriptControl:
http://msdn.microsoft.com/scripting/scriptcontrol/default.htm
then this code is running without limitations:
01: <html><head>
02: <script>
03: sc=new ActiveXObject("ScriptControl");
04: sc.Language="Python";
05: sc.AddCode("from win32com.client import Dispatch\ndef
pyDispatch(Name):\n return Dispatch(Name)");
06: function ActiveXObjectEx(Name) { return sc.Run("pyDispatch", Name); }
07: </script>
08: <script>
09: var xml=ActiveXObjectEx("Microsoft.XMLDOM"); // unsave COM-object
10: xml.loadXML("<xml>test succesful</xml>");
11: xml.save("C:/super.xml"); // !!!! restricted access !!!!
12: delete xml;
13: alert("please look for <super.xml> in the root-dir :)");
14: </script>
15: </head></html>
(tested with IE5 and IE5.5SP1, Pyhton 1.52 and Python 2)
An other solution cold be the use of HTA insteed of IE.
http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
Markus.
sorry for my terrible english :)
----- Original Message -----
From: "Andrew Wilcox" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 04, 2000 8:55 PM
Subject: using an "untrusted dynamic module" from Active Scripting
> I've working on an intranet application that's pulling data into MS
> Project. It would be very nice for my users if they could run my Python
> script just by pushing a button on the intranet web page. This is all
> inside of IE 5.
>
> I'm trying to see if I can use active scripting following the examples in
> axscript. My attempt to import win32com results in an "ImportError:
> untrusted dynamic module: win32api".
>
> Is there a way that I can set my security settings to allow me access to
> win32com? I've gone into the Internet Options of IE 5 and fiddled with
the
> security settings in the "Local intranet" zone. I've set it to allow
> anything :-), but sadly that doesn't seem to be enough.
>
> Any help would be appreciated!
>
> Thanks,
>
> Andrew
>
>
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activepython
>
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython