10a8c90248264a8b26970b4473770bcc3df8515fJosh Gao"""Suite Web Browser Suite: Class of events supported by Web Browser applications 20a8c90248264a8b26970b4473770bcc3df8515fJosh GaoLevel 1, version 1 30a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 40a8c90248264a8b26970b4473770bcc3df8515fJosh GaoGenerated from /Applications/Internet Explorer.app 50a8c90248264a8b26970b4473770bcc3df8515fJosh GaoAETE/AEUT resource version 1/0, language 0, script 0 60a8c90248264a8b26970b4473770bcc3df8515fJosh Gao""" 70a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 80a8c90248264a8b26970b4473770bcc3df8515fJosh Gaoimport aetools 90a8c90248264a8b26970b4473770bcc3df8515fJosh Gaoimport MacOS 100a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 110a8c90248264a8b26970b4473770bcc3df8515fJosh Gao_code = 'WWW!' 120a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 130a8c90248264a8b26970b4473770bcc3df8515fJosh Gaoclass Web_Browser_Suite_Events: 140a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 150a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def Activate(self, _object=None, _attributes={}, **_arguments): 160a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """Activate: Activate Internet Explorer and optionally select window designated by Window Identifier. 170a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Required argument: Window Identifier 180a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 190a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: Window Identifier of window to activate 200a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 210a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 220a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'ACTV' 230a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 240a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments: raise TypeError, 'No optional args expected' 250a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments['----'] = _object 260a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 270a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 280a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 290a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 300a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 310a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 320a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 330a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 340a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 350a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 360a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def CloseAllWindows(self, _no_object=None, _attributes={}, **_arguments): 370a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """CloseAllWindows: Closes all windows 380a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 390a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: Success 400a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 410a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 420a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'CLSA' 430a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 440a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments: raise TypeError, 'No optional args expected' 450a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _no_object is not None: raise TypeError, 'No direct arg expected' 460a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 470a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 480a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 490a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 500a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 510a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 520a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 530a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 540a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 550a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 560a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _argmap_CloseWindow = { 570a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'ID' : 'WIND', 580a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'Title' : 'TITL', 590a8c90248264a8b26970b4473770bcc3df8515fJosh Gao } 600a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 610a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def CloseWindow(self, _no_object=None, _attributes={}, **_arguments): 620a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window. 630a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument ID: ID of the window to close. (Can use -1 for top window) 640a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument Title: Title of the window to close 650a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 660a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: Success 670a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 680a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 690a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'CLOS' 700a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 710a8c90248264a8b26970b4473770bcc3df8515fJosh Gao aetools.keysubst(_arguments, self._argmap_CloseWindow) 720a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _no_object is not None: raise TypeError, 'No direct arg expected' 730a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 740a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 750a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 760a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 770a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 780a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 790a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 800a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 810a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 820a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 830a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def GetWindowInfo(self, _object, _attributes={}, **_arguments): 840a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """GetWindowInfo: Returns a window info record (URL/Title) for the specified window. 850a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Required argument: Window Identifier of the window 860a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 870a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: 880a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 890a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 900a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'WNFO' 910a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 920a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments: raise TypeError, 'No optional args expected' 930a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments['----'] = _object 940a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 950a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 960a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 970a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 980a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 990a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 1000a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 1010a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 1020a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 1030a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1040a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def ListWindows(self, _no_object=None, _attributes={}, **_arguments): 1050a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ListWindows: Returns list of Window Identifiers for all open windows. 1060a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 1070a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: undocumented, typecode 'list' 1080a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 1090a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 1100a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'LSTW' 1110a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1120a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments: raise TypeError, 'No optional args expected' 1130a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _no_object is not None: raise TypeError, 'No direct arg expected' 1140a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1150a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1160a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 1170a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 1180a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 1190a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 1200a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 1210a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 1220a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 1230a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1240a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _argmap_OpenURL = { 1250a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'to' : 'INTO', 1260a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'toWindow' : 'WIND', 1270a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'Flags' : 'FLGS', 1280a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'FormData' : 'POST', 1290a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'MIME_Type' : 'MIME', 1300a8c90248264a8b26970b4473770bcc3df8515fJosh Gao } 1310a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1320a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def OpenURL(self, _object, _attributes={}, **_arguments): 1330a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """OpenURL: Retrieves URL off the Web. 1340a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Required argument: Fully-qualified URL 1350a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument to: Target file for saving downloaded data 1360a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument toWindow: Target window for resource at URL (-1 for top window, 0 for new window) 1370a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument Flags: Valid Flags settings are: 1-Ignore the document cache; 2-Ignore the image cache; 4-Operate in background mode. 1380a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument FormData: data to post 1390a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument MIME_Type: MIME type of data being posted 1400a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 1410a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 1420a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 1430a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'OURL' 1440a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1450a8c90248264a8b26970b4473770bcc3df8515fJosh Gao aetools.keysubst(_arguments, self._argmap_OpenURL) 1460a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments['----'] = _object 1470a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1480a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1490a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 1500a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 1510a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 1520a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 1530a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 1540a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 1550a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 1560a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1570a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _argmap_ParseAnchor = { 1580a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'withURL' : 'RELA', 1590a8c90248264a8b26970b4473770bcc3df8515fJosh Gao } 1600a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1610a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def ParseAnchor(self, _object, _attributes={}, **_arguments): 1620a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ParseAnchor: Combines a base URL and a relative URL to produce a fully-qualified URL 1630a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Required argument: Base URL 1640a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument withURL: Relative URL that is combined with the Base URL (in the direct object) to produce a fully-qualified URL. 1650a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 1660a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Returns: Fully-qualified URL 1670a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 1680a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 1690a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'PRSA' 1700a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1710a8c90248264a8b26970b4473770bcc3df8515fJosh Gao aetools.keysubst(_arguments, self._argmap_ParseAnchor) 1720a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments['----'] = _object 1730a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1740a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1750a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 1760a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 1770a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 1780a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 1790a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 1800a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 1810a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 1820a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1830a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _argmap_ShowFile = { 1840a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'MIME_Type' : 'MIME', 1850a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'Window_Identifier' : 'WIND', 1860a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 'URL' : 'URL ', 1870a8c90248264a8b26970b4473770bcc3df8515fJosh Gao } 1880a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 1890a8c90248264a8b26970b4473770bcc3df8515fJosh Gao def ShowFile(self, _object, _attributes={}, **_arguments): 1900a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ShowFile: FileSpec containing data of specified MIME type to be rendered in window specified by Window Identifier. 1910a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Required argument: The file 1920a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument MIME_Type: MIME type 1930a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument Window_Identifier: Identifier of the target window for the URL. (Can use -1 for top window) 1940a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument URL: URL that allows this document to be reloaded. 1950a8c90248264a8b26970b4473770bcc3df8515fJosh Gao Keyword argument _attributes: AppleEvent attribute dictionary 1960a8c90248264a8b26970b4473770bcc3df8515fJosh Gao """ 1970a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _code = 'WWW!' 1980a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _subcode = 'SHWF' 1990a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2000a8c90248264a8b26970b4473770bcc3df8515fJosh Gao aetools.keysubst(_arguments, self._argmap_ShowFile) 2010a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments['----'] = _object 2020a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2030a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2040a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _reply, _arguments, _attributes = self.send(_code, _subcode, 2050a8c90248264a8b26970b4473770bcc3df8515fJosh Gao _arguments, _attributes) 2060a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.get('errn', 0): 2070a8c90248264a8b26970b4473770bcc3df8515fJosh Gao raise aetools.Error, aetools.decodeerror(_arguments) 2080a8c90248264a8b26970b4473770bcc3df8515fJosh Gao # XXXX Optionally decode result 2090a8c90248264a8b26970b4473770bcc3df8515fJosh Gao if _arguments.has_key('----'): 2100a8c90248264a8b26970b4473770bcc3df8515fJosh Gao return _arguments['----'] 2110a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2120a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2130a8c90248264a8b26970b4473770bcc3df8515fJosh Gao# 2140a8c90248264a8b26970b4473770bcc3df8515fJosh Gao# Indices of types declared in this module 2150a8c90248264a8b26970b4473770bcc3df8515fJosh Gao# 2160a8c90248264a8b26970b4473770bcc3df8515fJosh Gao_classdeclarations = { 2170a8c90248264a8b26970b4473770bcc3df8515fJosh Gao} 2180a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2190a8c90248264a8b26970b4473770bcc3df8515fJosh Gao_propdeclarations = { 2200a8c90248264a8b26970b4473770bcc3df8515fJosh Gao} 2210a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2220a8c90248264a8b26970b4473770bcc3df8515fJosh Gao_compdeclarations = { 2230a8c90248264a8b26970b4473770bcc3df8515fJosh Gao} 2240a8c90248264a8b26970b4473770bcc3df8515fJosh Gao 2250a8c90248264a8b26970b4473770bcc3df8515fJosh Gao_enumdeclarations = { 2260a8c90248264a8b26970b4473770bcc3df8515fJosh Gao} 227