home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activepython / ActivePython-2.1.1.msi / Python21_win32com_test_Testpys.sct < prev    next >
Encoding:
Text File  |  2001-07-26  |  1.1 KB  |  63 lines

  1. <scriptlet>
  2.  
  3. <Registration
  4.   Description="TestPys"
  5.   ProgID="TestPys.Scriptlet"
  6.   Version="1"
  7.   ClassID="{2eeb6080-cd58-11d1-b81e-00a0240b2fef}">
  8.  
  9.   <SCRIPT LANGUAGE="VBScript">      
  10.     Function Register()
  11.         Msgbox "Scriptlet 'Test' registered."      
  12.     End Function
  13.     
  14.     Function Unregister()
  15.         Msgbox "Scriptlet 'Test' unregistered."      
  16.     End Function
  17.    </SCRIPT>
  18. </Registration>
  19.  
  20. <implements id=Automation type=Automation>
  21.   <property name=PyProp1>
  22.     <get/>
  23.     <put/>
  24.   </property>
  25.   <property name=PyProp2>
  26.     <get/>
  27.     <put/>
  28.   </property>
  29.   <method name=PyMethod1>
  30.   </method>
  31.  
  32.   <method name=PyMethod2>
  33.   </method>
  34. </implements>
  35.  
  36. <script language=python>
  37.  
  38. PyProp1 = "PyScript Property1";
  39. PyProp2 = "PyScript Property2";
  40.  
  41. def get_PyProp1():
  42.   return PyProp1
  43.  
  44. def put_PyProp1(newValue):
  45.   PyProp1 = newValue
  46.  
  47. def get_PyProp2():
  48.   return PyProp2
  49.  
  50. def put_PyProp2(newValue):
  51.   PyProp2 = newValue
  52.  
  53. def PyMethod1():
  54.   return "PyMethod1 called"
  55.  
  56. def PyMethod2():
  57.   return "PyMethod2 called"
  58.  
  59. </script>
  60.  
  61. </scriptlet>
  62.  
  63.