home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_2899 < prev    next >
Encoding:
Text File  |  2002-03-18  |  1.1 KB  |  65 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.   global PyProp1
  46.   PyProp1 = newValue
  47.  
  48. def get_PyProp2():
  49.   return PyProp2
  50.  
  51. def put_PyProp2(newValue):
  52.   global PyProp2
  53.   PyProp2 = newValue
  54.  
  55. def PyMethod1():
  56.   return "PyMethod1 called"
  57.  
  58. def PyMethod2():
  59.   return "PyMethod2 called"
  60.  
  61. </script>
  62.  
  63. </scriptlet>
  64.  
  65.