Todo: 集成多平台 解决因SaiNiu线程抢占资源问题 本地提交测试环境打包 和 正式打包脚本与正式环境打包bat 提交Python32环境包 改进多日志文件生成情况修改打包日志细节
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<HTML>
|
||||
|
||||
<SCRIPT Language="Python" RUNAT=Server>
|
||||
|
||||
# Just for the sake of the demo, our Python script engine
|
||||
# will create a Python.Interpreter COM object, and call that.
|
||||
|
||||
# This is completely useless, as the Python Script Engine is
|
||||
# completely normal Python, and ASP does not impose retrictions, so
|
||||
# there is nothing the COM object can do that we can not do natively.
|
||||
|
||||
o = Server.CreateObject("Python.Interpreter")
|
||||
|
||||
Response.Write("Python says 1+1=" + str(o.Eval("1+1")))
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
</HTML>
|
||||
@@ -0,0 +1,52 @@
|
||||
<%@ Language=Python %>
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<BODY BACKGROUND="/samples/images/backgrnd.gif">
|
||||
|
||||
<TITLE>Python test</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="FFFFFF">
|
||||
|
||||
<SCRIPT Language="Python" RUNAT=Server>
|
||||
# NOTE that the <% tags below execute _before_ these tags!
|
||||
Response.Write("Hello from Python<P>")
|
||||
Response.Write("Browser is "+bc.browser)
|
||||
import win32api # Should be no problem using win32api in ASP pages.
|
||||
Response.Write("<p>Win32 username is "+win32api.GetUserName())
|
||||
</SCRIPT>
|
||||
|
||||
<BODY BGCOLOR="FFFFFF">
|
||||
|
||||
<%
|
||||
import sys
|
||||
print(sys.path)
|
||||
from win32com.axscript.asputil import *
|
||||
print("Hello")
|
||||
print("There")
|
||||
print("How are you")
|
||||
%>
|
||||
|
||||
<%bc = Server.CreateObject("MSWC.BrowserType")%>
|
||||
<BODY BGCOLOR="FFFFFF">
|
||||
<table border=1>
|
||||
<tr><td>Browser</td><td> <%=bc.browser %>
|
||||
<tr><td>Version</td><td> <%=bc.version %> </td></TR>
|
||||
<tr><td>Frames</td><td>
|
||||
<%Response.Write( iif(bc.frames, "TRUE", "FALSE")) %></td></TR>
|
||||
<tr><td>Tables</td><td>
|
||||
<%Response.Write( iif (bc.tables, "TRUE", "FALSE")) %></td></TR>
|
||||
<tr><td>BackgroundSounds</td><td>
|
||||
<%Response.Write( iif(bc.BackgroundSounds, "TRUE", "FALSE"))%></td></TR>
|
||||
<tr><td>VBScript</td><td>
|
||||
<%Response.Write( iif(bc.vbscript, "TRUE", "FALSE"))%></td></TR>
|
||||
<tr><td>JavaScript</td><td>
|
||||
<%Response.Write( iif(bc.javascript, "TRUE", "FALSE"))%></td></TR>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%@ language=python%>
|
||||
<html>
|
||||
<%Response.Redirect("test1.html")%>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<body>
|
||||
GOT There
|
||||
<script language=javascript>
|
||||
location.href ="http://192.168.0.1/Python/interrupt/test.asp"
|
||||
</script>
|
||||
</body>
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<%@ language =Python%>
|
||||
<html>
|
||||
<head>
|
||||
<%Response.Redirect("test.html")%>
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<body>
|
||||
GOT HERE
|
||||
<script language=javascript>
|
||||
location.href ="http://192.168.0.1/Python/interrupt/test1.asp"
|
||||
</script>
|
||||
</body>
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<HTML>
|
||||
|
||||
<SCRIPT Language="Python" RUNAT=Server>
|
||||
|
||||
for i in range(3,8):
|
||||
Response.Write("<FONT SIZE=%d>Hello World!!<BR>" % i)
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
</HTML>
|
||||
@@ -0,0 +1,179 @@
|
||||
<!--
|
||||
original Author: Bill Rollins
|
||||
adapted for python by aaron watters
|
||||
Purpose: This HTML example shows how to use Microsoft's ActiveX Chart control.
|
||||
Properties of the control are changed using sub procedures called
|
||||
by radio buttons and check boxes. The AboutBox method is called from
|
||||
a command button.
|
||||
Created: 3/16/96
|
||||
Edited: 3/19/96 - VBScript code edited so there is only one procedure for each property.
|
||||
3/23/96 - Font sizes changed in title. Added text to the Notes section.
|
||||
6/01/96 - Change OBJECT tag to match E3 Beta requirements
|
||||
-->
|
||||
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>ActiveX / VBScript Chart Example</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR=#FFFFCC TEXT=#000000>
|
||||
|
||||
<B><FONT SIZE=6>Chart Example</FONT></B><BR>
|
||||
<FONT SIZE=2>You must be running Microsoft Internet Explorer 3.0 and have the Microsoft ActiveX Chart Control installed to view this page.</FONT><BR>
|
||||
<P>
|
||||
The chart control enables you to draw charts. The chart's types and styles are properties of the control. The chart has one method, AboutBox. The chart generates no events.
|
||||
|
||||
<HR>
|
||||
|
||||
<OBJECT
|
||||
classid="clsid:FC25B780-75BE-11CF-8B01-444553540000"
|
||||
CODEBASE="http://activex.microsoft.com/controls/iexplorer/iechart.ocx#Version=4,70,0,1161"
|
||||
TYPE="application/x-oleobject"
|
||||
id=Chart1
|
||||
width=200
|
||||
height=200
|
||||
align=left
|
||||
hspace=0
|
||||
vspace=0
|
||||
>
|
||||
|
||||
<param name="_extentX" value="300">
|
||||
<param name="_extentY" value="150">
|
||||
<param name="ChartStyle" value="0">
|
||||
<param name="ChartType" value="4">
|
||||
<param name="hgridStyle" value="0">
|
||||
<param name="vgridStyle" value="0">
|
||||
<param name="colorscheme" value="0">
|
||||
<param name="rows" value="2">
|
||||
<param name="columns" value="4">
|
||||
<param name="data[0][0]" value="30">
|
||||
<param name="data[0][1]" value="2">
|
||||
<param name="data[0][2]" value="20">
|
||||
<param name="data[0][3]" value="40">
|
||||
<param name="data[1][0]" value="15">
|
||||
<param name="data[1][1]" value="33">
|
||||
<param name="data[1][2]" value="21">
|
||||
<param name="data[1][3]" value="45">
|
||||
<param name="BackStyle" value="1">
|
||||
|
||||
|
||||
</object>
|
||||
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
|
||||
|
||||
# Calls the AboutBox Method. This displays the Chart Object About Box
|
||||
def DoChartAboutBox():
|
||||
ax.Chart1.AboutBox()
|
||||
|
||||
# Changes the type of chart. WhatType is passed as a value (0-5) when one of the Chart Type radio buttons is selected
|
||||
def DoChartType(WhatType):
|
||||
ax.Chart1.ChartType = WhatType
|
||||
|
||||
# Turns horizontal gridlines on or off depending on value of chkHorizontal checkbox
|
||||
def DoHorizontalGrid():
|
||||
print(ax.chkHorizontal.Checked)
|
||||
if ax.chkHorizontal.Checked:
|
||||
ax.Chart1.HGridStyle = 1
|
||||
else:
|
||||
ax.Chart1.HGridStyle = 0
|
||||
|
||||
# Sets the background of the chart to Opaque or Transparent
|
||||
def DoBackground(intBackGround):
|
||||
ax.Chart1.BackStyle = intBackGround
|
||||
|
||||
# Turns vertical gridlines on or off depending on value of chkVertical checkbox
|
||||
def DoVerticalGrid():
|
||||
if ax.chkVertical.Checked:
|
||||
ax.Chart1.VGridStyle = 1
|
||||
else:
|
||||
ax.Chart1.VGridStyle = 0
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
|
||||
<TABLE BORDER = 0 XBORDER=5 BGCOLOR="#FFFFCC" WIDTH=300 ALIGN=LEFT>
|
||||
<TR><TD colspan=2 BGCOLOR=NAVY ALIGN=CENTER><FONT COLOR=FFFFCC>Chart Type</TR>
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(0)"> Simple Pie </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(11)"> Simple Column </TD></TR>
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(1)"> Pie with Wedge Out </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(12)"> Stacked Column </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(2)"> Simple Point </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(13)"> Full Column </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(3)"> Stacked Point </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(14)"> Simple Bar </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(4)"> Full Point </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(15)"> Stacked Bar </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(5)"> Simple Line </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(16)"> Full Bar </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(6)"> Stacked Line </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(17)"> HLC Stock </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(7)"> Full Line </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(18)"> HLC Stock WSJ</TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(8)"> Simple Area </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(19)"> OHLC Stock </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(9)"> Stack Area </TD>
|
||||
<TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(20)"> OHLC Stock WSJ </TD></TR>
|
||||
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=ChartType onClick="DoChartType(10)"> Full Area </TD></TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<TABLE XBORDER=5 WIDTH=125 BGCOLOR="#FFFFCC" ALIGN=LEFT>
|
||||
<TR><TD BGCOLOR=NAVY ALIGN=CENTER><FONT COLOR=FFFFCC>Gridlines</TR>
|
||||
<TR><TD><INPUT TYPE=CHECKBOX NAME="chkHorizontal" onClick="DoHorizontalGrid()">Horizontal</TD></TR>
|
||||
<TR><TD><INPUT TYPE=CHECKBOX NAME="chkVertical" onClick="DoVerticalGrid()">Vertical</TD></TR>
|
||||
<TR><TD BGCOLOR=NAVY ALIGN=CENTER><FONT COLOR=FFFFCC>Background</TR>
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=BackStyle onClick="DoBackground(1)">Opaque</TD></TR>
|
||||
<TR><TD><INPUT TYPE=RADIO NAME=BackStyle onClick="DoBackground(0)">Transparent</TD></TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<BR CLEAR=ALL>
|
||||
<BR>
|
||||
|
||||
<INPUT TYPE=BUTTON VALUE="About Chart Control" NAME="cdmChartAboutBox" onClick="DoChartAboutBox()">
|
||||
|
||||
<BR CLEAR=ALL>
|
||||
<BR><BR>
|
||||
|
||||
<HR>
|
||||
<B><FONT SIZE=4>Notes</FONT></B><BR>
|
||||
The chart's properties on this page are changed by selecting the various radio buttons and check boxes. The OnClick event of these intrinsic controls calls VBScript procedures that change the chart properties.<BR>
|
||||
<P>
|
||||
The About Chart Control command button calls the chart's AboutBox method.<BR>
|
||||
<P>
|
||||
To view the source code for this page, select <SAMP>Source</SAMP> from the <SAMP>View</SAMP> menu.<BR>
|
||||
<P>
|
||||
If you have any questions or comments about this example, please send them to <A HREF ="mailto:billr@smart.net">billr@smart.net</A>. We would appreciate feedback and would like to hear about other developers' experiences with these new tools.<BR>
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
|
||||
|
||||
|
||||
<ADDRESS>
|
||||
<FONT SIZE=2>
|
||||
© 1996 Rollins & Associates, Inc.<BR>
|
||||
Page last updated 08/28/96<BR>
|
||||
Please send comments to <A HREF ="mailto:billr@smart.net">billr@smart.net</A><BR>
|
||||
</FONT>
|
||||
</ADDRESS>
|
||||
|
||||
</HTML>
|
||||
@@ -0,0 +1,46 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
Let's try this out:
|
||||
|
||||
<FORM>
|
||||
<INPUT NAME="Button1" TYPE="Button" OnClick="foo1" LANGUAGE="VBScript">
|
||||
<FORM METHOD="GET" NAME="MyForm">
|
||||
<INPUT TYPE="TEXT" NAME="Text1" SIZE=25>
|
||||
<INPUT TYPE="SUBMIT">
|
||||
<INPUT NAME="Button2" TYPE="Button" VALUE="Hi" OnClick="text2.value=window.document.location" LANGUAGE="VBScript">
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Text2">
|
||||
</FORM>
|
||||
And here is a second form
|
||||
<P>
|
||||
<FORM NAME="Form2" METHOD="GET">
|
||||
<INPUT NAME="Button2" TYPE="Button" VALUE="Hi" OnClick="button2.value=window.document.location" LANGUAGE="VBScript">
|
||||
</FORM><BR>
|
||||
|
||||
<SCRIPT LANGUAGE="JScript">
|
||||
y=15
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="VBScript">
|
||||
x = 13
|
||||
Sub foo1
|
||||
Dim y
|
||||
y = 14
|
||||
alert "Hello"
|
||||
End Sub
|
||||
|
||||
Sub Window_OnLoad
|
||||
foo1
|
||||
MyForm.button2.value = "Loaded"
|
||||
Form2.button2.value = "Loaded"
|
||||
End Sub
|
||||
Sub Link_MouseMove(b, s, x, y)
|
||||
MsgBox b
|
||||
End Sub
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
print("Python loaded")
|
||||
</SCRIPT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,24 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<base target="text">
|
||||
<TITLE> Internet Workshop </TITLE>
|
||||
</HEAD>
|
||||
<BODY leftmargin=8 bgcolor="#FFFFFF" VLINK="#666666" LINK="#FF0000">
|
||||
<FONT FACE="ARIAL,HELVETICA" SIZE="2">
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<P><FONT FACE="ARIAL,HELVETICA" SIZE="5"><B>Python AX Script Engine</B></FONT>
|
||||
<BR>Demo using the Marquee Control
|
||||
<BR>Mark Hammond.
|
||||
|
||||
<P>This is really quite a boring demo, as the Marquee control does everything. However, there is Python code behind the buttons that change the speed. This code is all of 2 lines per button!!!
|
||||
|
||||
<P>For more information on Python as an ActiveX scripting language, see
|
||||
|
||||
<P><B>Python</B>
|
||||
<BR><A HREF="https://www.python.org">https://www.python.org</A>
|
||||
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,115 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Python Script sample: Calculator</TITLE></HEAD>
|
||||
<BODY><FONT FACE=ARIAL SIZE=3> <!-- global default -->
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
# globals
|
||||
Accum = 0.0 # Previous number (operand) awaiting operation
|
||||
FlagNewNum = 1 # Flag to indicate a new number (operand) is being entered
|
||||
NullOp = lambda x,y: y
|
||||
PendingOp = NullOp# Pending operation waiting for completion of second operand
|
||||
numberButNames = ['Zero','One','Two','Three','Four','Five','Six','Seven','Eight','Nine']
|
||||
|
||||
def NumPressed(Num):
|
||||
print("NumPressed", Num)
|
||||
global FlagNewNum
|
||||
if FlagNewNum:
|
||||
ax.document.Keypad.ReadOut.Value = Num
|
||||
FlagNewNum = None
|
||||
else:
|
||||
if ax.document.Keypad.ReadOut.Value == "0":
|
||||
ax.document.Keypad.ReadOut.Value = str(Num)
|
||||
else:
|
||||
ax.document.Keypad.ReadOut.Value= ax.document.Keypad.ReadOut.Value + str(Num)
|
||||
|
||||
# Dynamically create handlers for all the decimal buttons.
|
||||
# (ie, this will dynamically create "One_OnClick()"... etc handlers
|
||||
for i in range(len(numberButNames)):
|
||||
exec "def %s_OnClick():\tNumPressed(%d)\n" % (numberButNames[i],i)
|
||||
|
||||
def Decimal_OnClick():
|
||||
global curReadOut, FlagNewNum
|
||||
curReadOut = ax.document.Keypad.ReadOut.Value
|
||||
if FlagNewNum:
|
||||
curReadOut = "0."
|
||||
FlagNewNum = None
|
||||
else:
|
||||
if not ("." in curReadOut):
|
||||
curReadOut = curReadOut + "."
|
||||
ax.document.Keypad.ReadOut.Value = curReadOut
|
||||
|
||||
import sys, string
|
||||
|
||||
def Operation(Op, fn):
|
||||
global FlagNewNum, PendingOp, Accum
|
||||
ReadOut = ax.document.Keypad.ReadOut.Value
|
||||
print("Operation", Op, ReadOut, PendingOp, Accum)
|
||||
if FlagNewNum:
|
||||
# User is hitting op keys repeatedly, so don't do anything
|
||||
PendingOp = NullOp
|
||||
else:
|
||||
FlagNewNum = 1
|
||||
Accum = PendingOp( Accum, float(ReadOut) )
|
||||
ax.document.Keypad.ReadOut.Value = str(Accum)
|
||||
PendingOp = fn
|
||||
|
||||
def ClearEntry_OnClick():
|
||||
# Remove current number and reset state
|
||||
global FlagNewNum
|
||||
ax.document.Keypad.ReadOut.Value = "0"
|
||||
FlagNewNum = 1
|
||||
|
||||
def Clear_OnClick():
|
||||
global Accum, PendingOp
|
||||
Accum = 0
|
||||
PendingOp = NullOp
|
||||
ClearEntry_OnClick()
|
||||
|
||||
def Neg_OnClick():
|
||||
ax.document.Keypad.ReadOut.Value = str(-float(ax.document.Keypad.ReadOut.Value))
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
<form action="" Name="Keypad">
|
||||
<TABLE>
|
||||
<B>
|
||||
<TABLE BORDER=2 WIDTH=50 HEIGHT=60 CELLPADDING=1 CELLSPACING=5>
|
||||
<CAPTION ALIGN=top> <b>Calculator</b><p> </CAPTION>
|
||||
<TR>
|
||||
<TD COLSPAN=3 ALIGN=MIDDLE><INPUT NAME="ReadOut" TYPE="Text" SIZE=24 VALUE="0" WIDTH=100%></TD>
|
||||
<TD></TD>
|
||||
<TD><INPUT NAME="Clear" TYPE="Button" VALUE=" C " ></TD>
|
||||
<TD><INPUT NAME="ClearEntry" TYPE="Button" VALUE=" CE " ></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT NAME="Seven" TYPE="Button" VALUE=" 7 " ></TD>
|
||||
<TD><INPUT NAME="Eight" TYPE="Button" VALUE=" 8 " ></TD>
|
||||
<TD><INPUT NAME="Nine" TYPE="Button" VALUE=" 9 " ></TD>
|
||||
<TD></TD>
|
||||
<TD><INPUT NAME="Neg" TYPE="Button" VALUE=" +/- " ></TD>
|
||||
<TD><INPUT NAME="Percent" TYPE="Button" VALUE=" % " OnClick="Operation('%', lambda x,y: x*y/100.0)"></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><INPUT NAME="Four" TYPE="Button" VALUE=" 4 " ></TD>
|
||||
<TD><INPUT NAME="Five" TYPE="Button" VALUE=" 5 " ></TD>
|
||||
<TD><INPUT NAME="Six" TYPE="Button" VALUE=" 6 " ></TD>
|
||||
<TD></TD>
|
||||
<TD ALIGN=MIDDLE><INPUT NAME="Plus" TYPE="Button" VALUE=" + " OnClick="Operation('+', lambda x,y: x+y)"></TD>
|
||||
<TD ALIGN=MIDDLE><INPUT NAME="Minus" TYPE="Button" VALUE=" - " OnClick="Operation('-', lambda x,y: x-y)"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT NAME="One" TYPE="Button" VALUE=" 1 " ></TD>
|
||||
<TD><INPUT NAME="Two" TYPE="Button" VALUE=" 2 " ></TD>
|
||||
<TD><INPUT NAME="Three" TYPE="Button" VALUE=" 3 " ></TD>
|
||||
<TD></TD>
|
||||
<TD ALIGN=MIDDLE><INPUT NAME="Multiply" TYPE="Button" VALUE=" * " OnClick="Operation('*', lambda x,y: x*y)" ></TD>
|
||||
<TD ALIGN=MIDDLE><INPUT NAME="Divide" TYPE="Button" VALUE=" / " OnClick="Operation('/', lambda x,y: x/y)" ></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT NAME="Zero" TYPE="Button" VALUE=" 0 " ></TD>
|
||||
<TD><INPUT NAME="Decimal" TYPE="Button" VALUE=" . " ></TD>
|
||||
<TD COLSPAN=3></TD>
|
||||
<TD><INPUT NAME="Equals" TYPE="Button" VALUE=" = " OnClick="Operation('=', lambda x,y: x)"></TD>
|
||||
</TR></TABLE></TABLE></B>
|
||||
</FORM>
|
||||
</FONT></BODY></HTML>
|
||||
@@ -0,0 +1,16 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
|
||||
<SCRIPT>
|
||||
b="Hello There, how are you"
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
print("Hello")
|
||||
a="Hi there"
|
||||
document.write("Hello<P>")
|
||||
alert("Hi there")
|
||||
</SCRIPT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,25 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Python AXScript Demos</TITLE>
|
||||
</HEAD>
|
||||
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
def Window_OnLoad():
|
||||
pass
|
||||
# import win32traceutil
|
||||
# print("Frames are", ax.window.frames._print_details_())
|
||||
# print("Frame 0 href = ", ax.frames.Item(0).location.href)
|
||||
|
||||
def Name_OnLoad():
|
||||
print("Frame loading")
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
<FRAMESET FRAMEBORDER=1 COLS = "250, *">
|
||||
<FRAME SRC="demo_menu.htm">
|
||||
<FRAME SRC="demo_check.htm" NAME="Body">
|
||||
</FRAMESET>
|
||||
|
||||
|
||||
</HTML>
|
||||
@@ -0,0 +1,39 @@
|
||||
<HTML>
|
||||
<H1>Engine Registration</H1>
|
||||
|
||||
<BODY>
|
||||
|
||||
<p>The Python ActiveX Scripting Engine is not currently registered.<p>
|
||||
|
||||
<p>Due to a <a href="https://web.archive.org/web/20080305234321/http://starship.python.net:80/crew/mhammond/win32/PrivacyProblem.html">
|
||||
privacy concern</a> discovered in the engine, the use of Python inside IE has been disabled.</p>
|
||||
|
||||
Before any of the supplied demos will work, the engine must be successfully registered.
|
||||
|
||||
<P>To install a version of the engine, that does work with IE, you can execute the Python program
|
||||
<CODE>win32com\axscript\client\pyscript_rexec.py</CODE> must be run. You can either do this manually, or follow the instructions below.</p>
|
||||
|
||||
<H2>Register the engine now!</H2>
|
||||
|
||||
<p>If you have read about the <a href="https://web.archive.org/web/20080305234321/http://starship.python.net:80/crew/mhammond/win32/PrivacyProblem.html">
|
||||
privacy concern</a> and still wish to register the engine, just follow the process outlined below:</p>
|
||||
<OL>
|
||||
<LI>Click on the link below
|
||||
<LI><B>A dialog will be presented asking if the file should be opened or saved to disk. Select "Open it".</B>
|
||||
<LI>A Console program will briefly open, while the server is registered.
|
||||
</OL>
|
||||
|
||||
<P><A HREF="..\..\..\client\pyscript_rexec.py">Register the engine now</A>
|
||||
|
||||
<H2>Checking the registration</H2>
|
||||
After the registration is complete, simply hit the Reload button. If the
|
||||
registration was successful, the page will change to the Python/AvtiveX Demo Page.
|
||||
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
try:
|
||||
window.open("demo_intro.htm", "Body")
|
||||
except:
|
||||
history.back()
|
||||
</SCRIPT>
|
||||
</BODY></HTML>
|
||||
@@ -0,0 +1,37 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
|
||||
<H1>
|
||||
<MARQUEE NAME="Marquee1" DIRECTION=LEFT BEHAVIOR=SCROLL SCROLLAMOUNT=10 SCROLLDELAY=200
|
||||
>Python ActiveX Scripting Demonstation
|
||||
</MARQUEE>
|
||||
</H1>
|
||||
|
||||
<p>Congratulations on installing the Python ActiveX Scripting Engine</p>
|
||||
|
||||
<p>Be warned that there is a <a href="https://web.archive.org/web/20080305234321/http://starship.python.net:80/crew/mhammond/win32/PrivacyProblem.html">
|
||||
privacy concern</a> with this engine. Please read this information, including how to disable the feature.</p>
|
||||
|
||||
|
||||
<H3>Object model</H3>
|
||||
<P>Except as described below, the object module exposed should be similar to that exposed
|
||||
by Visual Basic, etc. Due to the nature of ActiveX Scripting, the details for each
|
||||
host are different, but Python should work "correctly".
|
||||
|
||||
<P>The object model exposed via Python for MSIE is not as seamless as VB. The biggest limitation is
|
||||
the concept of a "local" namespace. For example, in VB, you can
|
||||
code <code>text="Hi there"</code>, but in Python, you must code
|
||||
<code>MyForm.ThisButton.Text="Hi There"</code>. See the <A HREF="foo2.htm">foo2</A> sample
|
||||
for futher details.
|
||||
|
||||
<H3>Known bugs and problems</H3>
|
||||
<UL>
|
||||
<LI><P>This release seems to have broken Aaron's mouse-trace sample. No idea why, and I'm supposed to be looking into it.
|
||||
<LI><P>Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally
|
||||
no problem.
|
||||
<LI><P>If you are trying to use Python with the Windows Scripting Host, note that
|
||||
.pys files are not correct registered - you will need to explicitly
|
||||
specify either cscript.exe or wscript.exe on the command line.
|
||||
</UL>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -0,0 +1,14 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
<H1>Scripting Demos</H1>
|
||||
<P>An <A HREF="demo_check.htm" TARGET=Body>Introduction</A> to the
|
||||
scripting engine.
|
||||
|
||||
<P>The <A HREF="calc.htm" TARGET=Body>Calculator Demo</A> is a very
|
||||
cool sample written by Aaron Watters.
|
||||
|
||||
<P><A HREF="mouseTrack.htm" TARGET=Body>Mouse track</A> is another of
|
||||
Aaron's samples, and shows how fast the Python engine is!
|
||||
|
||||
<P>The <A HREF="foo2.htm" TARGET=Body>foo2 sample</A> is mainly used
|
||||
for debugging and testing, but does show some forms in action.
|
||||
@@ -0,0 +1,25 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
A page generated by Python
|
||||
|
||||
<SCRIPT LANGUAGE="XXXVBScript">
|
||||
document.open()
|
||||
document.writeLn "<P>Hello from VBScript"
|
||||
document.close()
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
ax.document.write("<P>Hello from Python")
|
||||
ax.document.close()
|
||||
ax.document.open()
|
||||
ax.document.write("<P>Hello again from Python")
|
||||
ax.document.close()
|
||||
|
||||
def Window_OnLoad():
|
||||
pass
|
||||
# ax.document.write("<P>Hello from Load from Python")
|
||||
# ax.document.close()
|
||||
</SCRIPT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,105 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
|
||||
<SCRIPT>
|
||||
b="Hello"
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
import win32traceutil
|
||||
import sys
|
||||
print("Hello")
|
||||
a="Hi there"
|
||||
print("Location is", document.location)
|
||||
document.write("Hello", " from version ", 2, " of the Python AXScript Engine","<P>")
|
||||
document.writeln("This is Python", sys.version)
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
<P>The caption on the first button is set by the Window Load code. Clicking
|
||||
that button changes the text in the first edit box.
|
||||
|
||||
<P>The second button changes its own text when clicked.
|
||||
|
||||
<P>The fourth button calls a global function, defined in the global 'script' scope,
|
||||
rather than the 'MyForm' scope.
|
||||
|
||||
<FORM NAME="MyForm" METHOD="GET">
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
print("Hello from in the form")
|
||||
</SCRIPT>
|
||||
<INPUT NAME="Button1" TYPE="Button" OnClick="MyForm.Text1.value='Hi'" LANGUAGE="Python">
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Text1">
|
||||
<INPUT NAME="Button2" TYPE="Button" VALUE="Click for 'Hi'" OnClick="a='Howdy'; MyForm.Button2.value='Hi'" LANGUAGE="Python">
|
||||
<INPUT NAME="Button3" TYPE="Button" VALUE="Click for URL" OnClick="MyForm.Text2.value=document.location" LANGUAGE="Python">
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Text2">
|
||||
<INPUT NAME="Button4" TYPE="Button" VALUE="Call global fn" OnClick="foo1()" LANGUAGE="Python">
|
||||
<INPUT NAME="Button5" TYPE="Button" VALUE="Script for... Test">
|
||||
<script for="Button5" event="onClick" language="Python">
|
||||
print("HelloThere")
|
||||
window.alert("Hello")
|
||||
def ATest():
|
||||
print("Hello from ATEst")
|
||||
|
||||
ATest()
|
||||
</script>
|
||||
<INPUT NAME="Button6" TYPE="Button" VALUE="Set Other" OnClick="Form2.Text1.Value='Hi from other'" LANGUAGE="Python">
|
||||
|
||||
</FORM><BR>
|
||||
<P>
|
||||
And here is a second form
|
||||
<P>
|
||||
<FORM NAME="Form2" METHOD="GET">
|
||||
<INPUT NAME="Button1" TYPE="Button" OnClick="Form2.Text1.Value='Hi'" LANGUAGE="Python">
|
||||
<INPUT NAME="Button2" TYPE="Button" VALUE="Set Other" OnClick="MyForm.Text1.Value='Hi from other'" LANGUAGE="Python">
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Text1">
|
||||
<INPUT NAME="ButRExec" TYPE="Button" VALUE="RExec fail" OnClick="import win32api;win32api.MessageBox(0,'Oops')" LANGUAGE="Python">
|
||||
<INPUT NAME="ButRExec2" TYPE="Button" VALUE="RExec fail 2" OnClick="import sys,win32traceutil;print(sys.modules);from win32com.client import dynamic;import win32com.client.dynamic, pythoncom, win32com.client;o=win32com.client.Dispatch('Word.Application')" LANGUAGE="Python">
|
||||
<INPUT NAME="ButVB" TYPE="Button" VALUE="VBScript Button" OnClick='alert("Hi from VBScript")'>
|
||||
<INPUT NAME="ButCallChain" TYPE="Button" VALUE="Multi-Language call" OnClick='CallPython()'>
|
||||
</FORM><BR>
|
||||
|
||||
<SCRIPT LANGUAGE="VBScript">
|
||||
function CallPython()
|
||||
alert("Hello from VB - I'm about to call Python!")
|
||||
PythonGlobalFunction()
|
||||
end function
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="JScript">
|
||||
function JScriptFunction()
|
||||
{
|
||||
alert("Hello from JScript");
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
x=13
|
||||
|
||||
def foo1():
|
||||
y = 14
|
||||
for name, item in globals().items():
|
||||
print(name, "item")
|
||||
alert ("Hello from AXCode")
|
||||
print("Y is ", y)
|
||||
|
||||
def PythonGlobalFunction():
|
||||
window.alert("Hello from Python - I'm about to call JScript!")
|
||||
window.JScriptFunction()
|
||||
|
||||
def Window_OnLoad():
|
||||
print("X is", x)
|
||||
print("a is", a)
|
||||
# print("------ GLOBALS ----------")
|
||||
# for n,v in globals().items():
|
||||
# print(n, '=', v)
|
||||
print("MyForm is", MyForm)
|
||||
print("MyForm is repr", "MyForm")
|
||||
print("MyForm.Button1 is", "MyForm.Button1")
|
||||
MyForm.Button1.Value = "Python Rules!"
|
||||
Form2.Button1.value = "Form2!"
|
||||
MyForm.Text1.value = document.location
|
||||
</SCRIPT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,25 @@
|
||||
<HTML>
|
||||
<BODY>
|
||||
|
||||
<FORM NAME="TestForm" METHOD="POST" >
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Name">Name<br>
|
||||
<INPUT TYPE="TEXT" SIZE=25 NAME="Address">Address<br>
|
||||
<INPUT TYPE=SUBMIT
|
||||
</FORM>
|
||||
|
||||
<SCRIPT LANGUAGE="Python" for="TestForm" Event="onSubmit">
|
||||
return Validate()
|
||||
</SCRIPT>
|
||||
|
||||
<SCRIPT LANGUAGE="Python">
|
||||
|
||||
def Validate():
|
||||
if not TestForm.Name.Value or not TestForm.Address.Value:
|
||||
ax.alert("You must enter a name and address.")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,59 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<base target="text">
|
||||
<TITLE> Internet Workshop </TITLE>
|
||||
</HEAD>
|
||||
<BODY leftmargin=8 bgcolor="#FFFFFF" VLINK="#666666" LINK="#FF0000">
|
||||
<FONT FACE="ARIAL,HELVETICA" SIZE="2">
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<P><FONT FACE="ARIAL,HELVETICA" SIZE="5"><B>Marquee Demo</B></FONT>
|
||||
|
||||
<P>
|
||||
|
||||
|
||||
<OBJECT
|
||||
ID="Marquee1"
|
||||
CLASSID="CLSID:1A4DA620-6217-11CF-BE62-0080C72EDD2D"
|
||||
CODEBASE="/workshop/activex/gallery/ms/marquee/other/marquee.ocx#Version=4,70,0,1112"
|
||||
TYPE="application/x-oleobject"
|
||||
WIDTH=100%
|
||||
HEIGHT=80
|
||||
>
|
||||
<PARAM NAME="szURL" VALUE="marqueeText1.htm">
|
||||
<PARAM NAME="ScrollPixelsX" VALUE="0">
|
||||
<PARAM NAME="ScrollPixelsY" VALUE="-5">
|
||||
<PARAM NAME="ScrollDelay" VALUE="100">
|
||||
<PARAM NAME="Whitespace" VALUE="0">
|
||||
</OBJECT>
|
||||
|
||||
<br> <br>
|
||||
|
||||
<INPUT TYPE="Button" NAME="btnFaster" VALUE="Faster">
|
||||
<INPUT TYPE="Button" NAME="btnNormal" VALUE="Normal">
|
||||
<INPUT TYPE="Button" NAME="btnSlower" VALUE="Slower">
|
||||
|
||||
<SCRIPT Language="Python">
|
||||
|
||||
def btnFaster_Onclick():
|
||||
ax.Marquee1.ScrollDelay = 0
|
||||
|
||||
def btnNormal_Onclick():
|
||||
ax.Marquee1.ScrollDelay = 50
|
||||
|
||||
def btnSlower_Onclick():
|
||||
ax.Marquee1.ScrollDelay = 300
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
<B>Notes:</B>
|
||||
<P>
|
||||
|
||||
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,82 @@
|
||||
<HTML>
|
||||
|
||||
<HEAD><TITLE>Python Scripting sample: Mouse tracking</TITLE></HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TOPMARGIN=8>
|
||||
<FONT SIZE=5>
|
||||
<TABLE Border=0><TR VALIGN=MIDDLE><TD>
|
||||
<A ID="Image"> <IMG
|
||||
SRC="file:..\..\..\..\..\win32com\html\image\pycom_blowing.gif"
|
||||
ALT="Clickable Map Image" HEIGHT=113 WIDTH=624 BORDER=0></A>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR VALIGN=MIDDLE><TD VALIGN=MIDDLE ALIGN=CENTER><FONT SIZE=5><INPUT
|
||||
TYPE="text" NAME="TxtLinkDescription" SIZE=50></FONT></TD></TR></TABLE>
|
||||
</FONT>
|
||||
|
||||
<P>
|
||||
A mouse tracking demo. Move the mouse over the image above...
|
||||
|
||||
<SCRIPT Language="Python">
|
||||
<!--
|
||||
# Remember the last location clicked
|
||||
# print("here we go", 1)
|
||||
mx = my = 0
|
||||
|
||||
# class for rectangle testing
|
||||
class rect:
|
||||
def __init__(self, lowx, lowy, upx, upy, desc, url):
|
||||
self.lowx, self.lowy, self.upx, self.upy, self.desc, self.url = \
|
||||
lowx, lowy, upx, upy, desc, url
|
||||
def inside(self, x, y):
|
||||
# print((x,y), "inside", self.desc)
|
||||
result = self.lowx <= x <= self.upx and self.lowy <= y <= self.upy
|
||||
# print(result)
|
||||
return result
|
||||
def mouse_move(self):
|
||||
# print("move", self.desc)
|
||||
ax.TxtLinkDescription.Value = coords + " - " + self.desc
|
||||
def onclick(self):
|
||||
# print("click", self.desc)
|
||||
ax.TxtLinkDescription.Value = coords +" click! " + `self.url`
|
||||
if self.url: ax.location = self.url
|
||||
|
||||
blows = "Blows away "
|
||||
rects =[rect(12,48,59,101,blows+"Visual Basic", ""),
|
||||
rect(107,0,172,58,blows+"Internet Explorer", ""),
|
||||
rect(193,0,261,56,blows+"Microsoft Access", ""),
|
||||
rect(332,43,392,93,blows+"Microsoft Word", ""),
|
||||
rect(457,52,521,99,blows+"Microsoft Excel", ""),
|
||||
rect(537,12,613,85,"Python blows them all away!", "https://www.python.org"),
|
||||
]
|
||||
|
||||
default = rect(0,0,0,0,"Click on an icon","")
|
||||
|
||||
def Image_MouseMove(s, b, x, y):
|
||||
global mx, my, coords
|
||||
coords =`(x,y)`
|
||||
# print(coords)
|
||||
mx, my = x, y
|
||||
for r in rects:
|
||||
if r.inside(x,y):
|
||||
# print(r.desc)
|
||||
r.mouse_move()
|
||||
break
|
||||
else:
|
||||
# print(default.desc)
|
||||
default.mouse_move()
|
||||
|
||||
def Image_OnClick():
|
||||
for r in rects:
|
||||
if r.inside(mx,my):
|
||||
r.onclick()
|
||||
break
|
||||
-->
|
||||
</SCRIPT>
|
||||
|
||||
<P>
|
||||
|
||||
</FONT>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,31 @@
|
||||
#app=WScript.Application
|
||||
#app._print_details_() # Use this to see what Python knows about a COM object.
|
||||
|
||||
g_index = 1
|
||||
# A procedure, using a global.
|
||||
def Show(desc, value = None):
|
||||
global g_index # Need global for g_index, as I locally assign.
|
||||
# No global needed to "xl" object, as only referenced.
|
||||
# Also note "xl" is assigned later in the script - ie, Python is very late bound.
|
||||
xl.Cells(g_index, 1).Value = desc
|
||||
if value: xl.Cells(g_index, 2).Value = value
|
||||
g_index = g_index + 1
|
||||
|
||||
xl = WScript.CreateObject("Excel.Application")
|
||||
import sys
|
||||
|
||||
xl.Visible = 1
|
||||
xl.Workbooks.Add()
|
||||
|
||||
# Show the WScript properties.
|
||||
Show("Application Friendly Name", WScript.Name)
|
||||
Show("Application Version", WScript.Version)
|
||||
Show("Application Context: Fully Qualified Name", WScript.FullName)
|
||||
Show("Application Context: Path Only", WScript.Path)
|
||||
Show("State of Interactive Mode", WScript.Interactive)
|
||||
|
||||
Show("All script arguments:")
|
||||
args = WScript.Arguments
|
||||
|
||||
for i in range(0,args.Count()):
|
||||
Show("Arg %d" % i, args(i))
|
||||
@@ -0,0 +1,44 @@
|
||||
""" Windows Script Host Sample Script
|
||||
' Ported to Python
|
||||
'
|
||||
' ------------------------------------------------------------------------
|
||||
' Copyright (C) 1996 Microsoft Corporation
|
||||
'
|
||||
' You have a royalty-free right to use, modify, reproduce and distribute
|
||||
' the Sample Application Files (and/or any modified version) in any way
|
||||
' you find useful, provided that you agree that Microsoft has no warranty,
|
||||
' obligations or liability for any Sample Application Files.
|
||||
' ------------------------------------------------------------------------
|
||||
'
|
||||
' This sample demonstrates how to write/delete from the registry.
|
||||
"""
|
||||
|
||||
WshShell = WScript.CreateObject("WScript.Shell")
|
||||
|
||||
WshShell.Popup("This script shows how to use registry related methods.", 2)
|
||||
|
||||
WshShell.Popup("Create key HKCU\\Foo with value 'Top level key'")
|
||||
WshShell.RegWrite("HKCU\\Foo\\", "Top level key")
|
||||
|
||||
WshShell.Popup("Create key HKCU\\Foo\\Bar with value 'Second level key'")
|
||||
WshShell.RegWrite( "HKCU\\Foo\\Bar\\", "Second level key")
|
||||
|
||||
WshShell.Popup ("Set value HKCU\\Foo\\Value to REG_SZ 1")
|
||||
WshShell.RegWrite( "HKCU\\Foo\\Value", 1)
|
||||
|
||||
WshShell.Popup ("Set value HKCU\\Foo\\Bar to REG_DWORD 2")
|
||||
WshShell.RegWrite ("HKCU\\Foo\\Bar", 2, "REG_DWORD")
|
||||
|
||||
WshShell.Popup ("Set value HKCU\\Foo\\Bar to REG_EXPAND_SZ '3'")
|
||||
WshShell.RegWrite ("HKCU\\Foo\\Bar\\Baz", "%SystemRoot%\\Foo")
|
||||
|
||||
WshShell.Popup ("Delete value HKCU\\Foo\\Bar\\Baz")
|
||||
WshShell.RegDelete ("HKCU\\Foo\\Bar\\Baz")
|
||||
|
||||
WshShell.Popup ("Delete key HKCU\\Foo\\Bar")
|
||||
WshShell.RegDelete ("HKCU\\Foo\\Bar\\")
|
||||
|
||||
WshShell.Popup ("Delete key HKCU\\Foo")
|
||||
WshShell.RegDelete ("HKCU\\Foo\\")
|
||||
|
||||
WScript.Echo ("Done")
|
||||
@@ -0,0 +1,14 @@
|
||||
# Testall - test core AX support.
|
||||
|
||||
# Test "Restricted Execution" (ie, IObjectSafety).
|
||||
# This will fail if in a "restricted execution" environment, but
|
||||
# will silenty do nothing of not restricted. This same line in an MSIE
|
||||
# script would cause an exception.
|
||||
print("Importing win32api...")
|
||||
import win32api
|
||||
if 1==1:
|
||||
print("Hi")
|
||||
|
||||
WScript.Echo("Hello from WScript")
|
||||
|
||||
#fail
|
||||
Reference in New Issue
Block a user