Testpys.sct 1.0 KB

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