fix to work on python <= 2.1
[python/dscho.git] / Lib / plat-mac / lib-scriptpackages / Explorer / Microsoft_Internet_Explorer.py
blobbce9e7698dedd6dea5c4ef3355ca8342ca31c2a9
1 """Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer
2 Level 1, version 1
4 Generated from /Applications/Internet Explorer.app
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
8 import aetools
9 import MacOS
11 _code = 'MSIE'
13 class Microsoft_Internet_Explorer_Events:
15 def GetSource(self, _object=None, _attributes={}, **_arguments):
16 """GetSource: Get the HTML source of a browser window
17 Required argument: Window Identifier of window from which to get the source. No value means get the source from the frontmost window.
18 Keyword argument _attributes: AppleEvent attribute dictionary
19 Returns: undocumented, typecode 'TEXT'
20 """
21 _code = 'MSIE'
22 _subcode = 'SORC'
24 if _arguments: raise TypeError, 'No optional args expected'
25 _arguments['----'] = _object
28 _reply, _arguments, _attributes = self.send(_code, _subcode,
29 _arguments, _attributes)
30 if _arguments.get('errn', 0):
31 raise aetools.Error, aetools.decodeerror(_arguments)
32 # XXXX Optionally decode result
33 if _arguments.has_key('----'):
34 return _arguments['----']
36 def PrintBrowserWindow(self, _object=None, _attributes={}, **_arguments):
37 """PrintBrowserWindow: Print contents of browser window (HTML)
38 Required argument: Window Identifier of the window to print. No value means print the frontmost browser window.
39 Keyword argument _attributes: AppleEvent attribute dictionary
40 """
41 _code = 'misc'
42 _subcode = 'pWND'
44 if _arguments: raise TypeError, 'No optional args expected'
45 _arguments['----'] = _object
48 _reply, _arguments, _attributes = self.send(_code, _subcode,
49 _arguments, _attributes)
50 if _arguments.get('errn', 0):
51 raise aetools.Error, aetools.decodeerror(_arguments)
52 # XXXX Optionally decode result
53 if _arguments.has_key('----'):
54 return _arguments['----']
56 _argmap_do_script = {
57 'window' : 'WIND',
60 def do_script(self, _object, _attributes={}, **_arguments):
61 """do script: Execute script commands
62 Required argument: JavaScript text to execute
63 Keyword argument window: optional Window Identifier (as supplied by the ListWindows event) specifying context in which to execute the script
64 Keyword argument _attributes: AppleEvent attribute dictionary
65 Returns: Return value
66 """
67 _code = 'misc'
68 _subcode = 'dosc'
70 aetools.keysubst(_arguments, self._argmap_do_script)
71 _arguments['----'] = _object
74 _reply, _arguments, _attributes = self.send(_code, _subcode,
75 _arguments, _attributes)
76 if _arguments.get('errn', 0):
77 raise aetools.Error, aetools.decodeerror(_arguments)
78 # XXXX Optionally decode result
79 if _arguments.has_key('----'):
80 return _arguments['----']
84 # Indices of types declared in this module
86 _classdeclarations = {
89 _propdeclarations = {
92 _compdeclarations = {
95 _enumdeclarations = {