| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | """Suite Terminal Suite: Terms and Events for controlling the Terminal application
 | 
					
						
							|  |  |  | Level 1, version 1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | Generated from /Applications/Utilities/Terminal.app | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | AETE/AEUT resource version 1/0, language 0, script 0 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import aetools | 
					
						
							|  |  |  | import MacOS | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _code = 'trmx' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Terminal_Suite_Events: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	def GetURL(self, _object, _attributes={}, **_arguments): | 
					
						
							|  |  |  | 		"""GetURL: Opens a telnet: URL
 | 
					
						
							|  |  |  | 		Required argument: the object for the command | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 		Keyword argument _attributes: AppleEvent attribute dictionary | 
					
						
							|  |  |  | 		"""
 | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		_code = 'GURL' | 
					
						
							|  |  |  | 		_subcode = 'GURL' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		if _arguments: raise TypeError, 'No optional args expected' | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 		_arguments['----'] = _object | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		_reply, _arguments, _attributes = self.send(_code, _subcode, | 
					
						
							|  |  |  | 				_arguments, _attributes) | 
					
						
							| 
									
										
										
										
											2002-04-24 09:13:24 +00:00
										 |  |  | 		if _arguments.get('errn', 0): | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 			raise aetools.Error, aetools.decodeerror(_arguments) | 
					
						
							|  |  |  | 		# XXXX Optionally decode result | 
					
						
							|  |  |  | 		if _arguments.has_key('----'): | 
					
						
							|  |  |  | 			return _arguments['----'] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 	_argmap_do_script = { | 
					
						
							|  |  |  | 		'in_' : 'kfil', | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		'with_command' : 'cmnd', | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def do_script(self, _object, _attributes={}, **_arguments): | 
					
						
							|  |  |  | 		"""do script: Run a UNIX shell script or command
 | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		Required argument: the object for the command | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 		Keyword argument in_: the window in which to execute the command | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 		Keyword argument _attributes: AppleEvent attribute dictionary | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		Returns: the reply for the command | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 		"""
 | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 		_code = 'core' | 
					
						
							|  |  |  | 		_subcode = 'dosc' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-03-28 22:07:22 +00:00
										 |  |  | 		aetools.keysubst(_arguments, self._argmap_do_script) | 
					
						
							|  |  |  | 		_arguments['----'] = _object | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		_reply, _arguments, _attributes = self.send(_code, _subcode, | 
					
						
							|  |  |  | 				_arguments, _attributes) | 
					
						
							| 
									
										
										
										
											2002-04-24 09:13:24 +00:00
										 |  |  | 		if _arguments.get('errn', 0): | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 			raise aetools.Error, aetools.decodeerror(_arguments) | 
					
						
							|  |  |  | 		# XXXX Optionally decode result | 
					
						
							|  |  |  | 		if _arguments.has_key('----'): | 
					
						
							|  |  |  | 			return _arguments['----'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class application(aetools.ComponentItem): | 
					
						
							|  |  |  | 	"""application - The Terminal program """ | 
					
						
							|  |  |  | 	want = 'capp' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | class _3c_Inheritance_3e_(aetools.NProperty): | 
					
						
							|  |  |  | 	"""<Inheritance> - All of the properties of the superclass. """ | 
					
						
							|  |  |  | 	which = 'c@#^' | 
					
						
							|  |  |  | 	want = 'capp' | 
					
						
							|  |  |  | class properties(aetools.NProperty): | 
					
						
							|  |  |  | 	"""properties - every property of the Terminal program """ | 
					
						
							|  |  |  | 	which = 'pALL' | 
					
						
							|  |  |  | 	want = '****' | 
					
						
							|  |  |  | #        element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID  '] | 
					
						
							|  |  |  | #        element 'docu' as ['name', 'indx', 'rele', 'rang', 'test'] | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | applications = application | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class window(aetools.ComponentItem): | 
					
						
							|  |  |  | 	"""window - A Terminal window """ | 
					
						
							|  |  |  | 	want = 'cwin' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class background_color(aetools.NProperty): | 
					
						
							|  |  |  | 	"""background color - the background color for the window """ | 
					
						
							|  |  |  | 	which = 'pbcl' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class bold_text_color(aetools.NProperty): | 
					
						
							|  |  |  | 	"""bold text color - the bold text color for the window """ | 
					
						
							|  |  |  | 	which = 'pbtc' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | class bounds(aetools.NProperty): | 
					
						
							|  |  |  | 	"""bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """ | 
					
						
							|  |  |  | 	which = 'pbnd' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class busy(aetools.NProperty): | 
					
						
							|  |  |  | 	"""busy - Is the window busy running a process? """ | 
					
						
							|  |  |  | 	which = 'busy' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							|  |  |  | class contents(aetools.NProperty): | 
					
						
							|  |  |  | 	"""contents - the currently visible contents of the window """ | 
					
						
							|  |  |  | 	which = 'pcnt' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class cursor_color(aetools.NProperty): | 
					
						
							|  |  |  | 	"""cursor color - the cursor color for the window """ | 
					
						
							|  |  |  | 	which = 'pcuc' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class custom_title(aetools.NProperty): | 
					
						
							|  |  |  | 	"""custom title - the custom title for the window """ | 
					
						
							|  |  |  | 	which = 'titl' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class frame(aetools.NProperty): | 
					
						
							|  |  |  | 	"""frame - the origin and size of the window """ | 
					
						
							|  |  |  | 	which = 'pfra' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							|  |  |  | class frontmost(aetools.NProperty): | 
					
						
							|  |  |  | 	"""frontmost - Is the window in front of the other Terminal windows? """ | 
					
						
							|  |  |  | 	which = 'pisf' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class history(aetools.NProperty): | 
					
						
							|  |  |  | 	"""history - the contents of the entire scrolling buffer of the window """ | 
					
						
							|  |  |  | 	which = 'hist' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class normal_text_color(aetools.NProperty): | 
					
						
							|  |  |  | 	"""normal text color - the normal text color for the window """ | 
					
						
							|  |  |  | 	which = 'ptxc' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class number_of_columns(aetools.NProperty): | 
					
						
							|  |  |  | 	"""number of columns - the number of columns in the window """ | 
					
						
							|  |  |  | 	which = 'ccol' | 
					
						
							|  |  |  | 	want = 'long' | 
					
						
							|  |  |  | class number_of_rows(aetools.NProperty): | 
					
						
							|  |  |  | 	"""number of rows - the number of rows in the window """ | 
					
						
							|  |  |  | 	which = 'crow' | 
					
						
							|  |  |  | 	want = 'long' | 
					
						
							|  |  |  | class origin(aetools.NProperty): | 
					
						
							|  |  |  | 	"""origin - the lower left coordinates of the window, relative to the lower left corner of the screen """ | 
					
						
							|  |  |  | 	which = 'pori' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | class position(aetools.NProperty): | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	"""position - the upper left coordinates of the window, relative to the upper left corner of the screen """ | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	which = 'ppos' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class processes(aetools.NProperty): | 
					
						
							|  |  |  | 	"""processes - a list of the currently running processes """ | 
					
						
							|  |  |  | 	which = 'prcs' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | class size(aetools.NProperty): | 
					
						
							|  |  |  | 	"""size - the width and height of the window """ | 
					
						
							|  |  |  | 	which = 'psiz' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = '****' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class title_displays_custom_title(aetools.NProperty): | 
					
						
							|  |  |  | 	"""title displays custom title - Does the title for the window contain a custom title? """ | 
					
						
							|  |  |  | 	which = 'tdct' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | class title_displays_device_name(aetools.NProperty): | 
					
						
							|  |  |  | 	"""title displays device name - Does the title for the window contain the device name? """ | 
					
						
							|  |  |  | 	which = 'tddn' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class title_displays_file_name(aetools.NProperty): | 
					
						
							|  |  |  | 	"""title displays file name - Does the title for the window contain the file name? """ | 
					
						
							|  |  |  | 	which = 'tdfn' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | class title_displays_shell_path(aetools.NProperty): | 
					
						
							|  |  |  | 	"""title displays shell path - Does the title for the window contain the shell path? """ | 
					
						
							|  |  |  | 	which = 'tdsp' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							|  |  |  | class title_displays_window_size(aetools.NProperty): | 
					
						
							|  |  |  | 	"""title displays window size - Does the title for the window contain the window size? """ | 
					
						
							|  |  |  | 	which = 'tdws' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | windows = window | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | application._superclassnames = [] | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | import Standard_Suite | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | application._privpropdict = { | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | 
					
						
							|  |  |  | 	'properties' : properties, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | application._privelemdict = { | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'document' : Standard_Suite.document, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	'window' : window, | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | window._superclassnames = [] | 
					
						
							|  |  |  | window._privpropdict = { | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'_3c_Inheritance_3e_' : _3c_Inheritance_3e_, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'background_color' : background_color, | 
					
						
							|  |  |  | 	'bold_text_color' : bold_text_color, | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	'bounds' : bounds, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'busy' : busy, | 
					
						
							|  |  |  | 	'contents' : contents, | 
					
						
							|  |  |  | 	'cursor_color' : cursor_color, | 
					
						
							|  |  |  | 	'custom_title' : custom_title, | 
					
						
							|  |  |  | 	'frame' : frame, | 
					
						
							|  |  |  | 	'frontmost' : frontmost, | 
					
						
							|  |  |  | 	'history' : history, | 
					
						
							|  |  |  | 	'normal_text_color' : normal_text_color, | 
					
						
							|  |  |  | 	'number_of_columns' : number_of_columns, | 
					
						
							|  |  |  | 	'number_of_rows' : number_of_rows, | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	'origin' : origin, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'position' : position, | 
					
						
							|  |  |  | 	'processes' : processes, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'properties' : properties, | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	'size' : size, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'title_displays_custom_title' : title_displays_custom_title, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	'title_displays_device_name' : title_displays_device_name, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'title_displays_file_name' : title_displays_file_name, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	'title_displays_shell_path' : title_displays_shell_path, | 
					
						
							|  |  |  | 	'title_displays_window_size' : title_displays_window_size, | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | window._privelemdict = { | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # Indices of types declared in this module | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | _classdeclarations = { | 
					
						
							|  |  |  | 	'capp' : application, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'cwin' : window, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _propdeclarations = { | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'busy' : busy, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'c@#^' : _3c_Inheritance_3e_, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'ccol' : number_of_columns, | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	'crow' : number_of_rows, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'hist' : history, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'pALL' : properties, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'pbcl' : background_color, | 
					
						
							|  |  |  | 	'pbnd' : bounds, | 
					
						
							|  |  |  | 	'pbtc' : bold_text_color, | 
					
						
							|  |  |  | 	'pcnt' : contents, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	'pcuc' : cursor_color, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'pfra' : frame, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | 	'pisf' : frontmost, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'pori' : origin, | 
					
						
							|  |  |  | 	'ppos' : position, | 
					
						
							|  |  |  | 	'prcs' : processes, | 
					
						
							| 
									
										
										
										
											2003-03-23 22:07:28 +00:00
										 |  |  | 	'psiz' : size, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'ptxc' : normal_text_color, | 
					
						
							|  |  |  | 	'tdct' : title_displays_custom_title, | 
					
						
							|  |  |  | 	'tddn' : title_displays_device_name, | 
					
						
							|  |  |  | 	'tdfn' : title_displays_file_name, | 
					
						
							|  |  |  | 	'tdsp' : title_displays_shell_path, | 
					
						
							|  |  |  | 	'tdws' : title_displays_window_size, | 
					
						
							|  |  |  | 	'titl' : custom_title, | 
					
						
							| 
									
										
										
										
											2002-03-30 23:46:16 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _compdeclarations = { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _enumdeclarations = { | 
					
						
							|  |  |  | } |