| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | """Suite Finder Basics: Commonly-used Finder commands and object classes
 | 
					
						
							|  |  |  | Level 1, version 1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | Generated from /System/Library/CoreServices/Finder.app | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | AETE/AEUT resource version 0/144, language 0, script 0 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import aetools | 
					
						
							|  |  |  | import MacOS | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _code = 'fndr' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Finder_Basics_Events: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def copy(self, _no_object=None, _attributes={}, **_arguments): | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		"""copy: (NOT AVAILABLE YET) Copy the selected items to the clipboard (the Finder must be the front application)
 | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 		Keyword argument _attributes: AppleEvent attribute dictionary | 
					
						
							|  |  |  | 		"""
 | 
					
						
							|  |  |  | 		_code = 'misc' | 
					
						
							|  |  |  | 		_subcode = 'copy' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		if _arguments: raise TypeError, 'No optional args expected' | 
					
						
							|  |  |  | 		if _no_object != None: raise TypeError, 'No direct arg expected' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		_reply, _arguments, _attributes = self.send(_code, _subcode, | 
					
						
							|  |  |  | 				_arguments, _attributes) | 
					
						
							| 
									
										
										
										
											2002-04-23 21:08:54 +00:00
										 |  |  | 		if _arguments.get('errn', 0): | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 			raise aetools.Error, aetools.decodeerror(_arguments) | 
					
						
							|  |  |  | 		# XXXX Optionally decode result | 
					
						
							|  |  |  | 		if _arguments.has_key('----'): | 
					
						
							|  |  |  | 			return _arguments['----'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	_argmap_sort = { | 
					
						
							|  |  |  | 		'by' : 'by  ', | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def sort(self, _object, _attributes={}, **_arguments): | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 		"""sort: (NOT AVAILABLE YET) Return the specified object(s) in a sorted list
 | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 		Required argument: a list of finder objects to sort | 
					
						
							|  |  |  | 		Keyword argument by: the property to sort the items by (name, index, date, etc.) | 
					
						
							|  |  |  | 		Keyword argument _attributes: AppleEvent attribute dictionary | 
					
						
							|  |  |  | 		Returns: the sorted items in their new order | 
					
						
							|  |  |  | 		"""
 | 
					
						
							|  |  |  | 		_code = 'DATA' | 
					
						
							|  |  |  | 		_subcode = 'SORT' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		aetools.keysubst(_arguments, self._argmap_sort) | 
					
						
							|  |  |  | 		_arguments['----'] = _object | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		_reply, _arguments, _attributes = self.send(_code, _subcode, | 
					
						
							|  |  |  | 				_arguments, _attributes) | 
					
						
							| 
									
										
										
										
											2002-04-23 21:08:54 +00:00
										 |  |  | 		if _arguments.get('errn', 0): | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 			raise aetools.Error, aetools.decodeerror(_arguments) | 
					
						
							|  |  |  | 		# XXXX Optionally decode result | 
					
						
							|  |  |  | 		if _arguments.has_key('----'): | 
					
						
							|  |  |  | 			return _arguments['----'] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class application(aetools.ComponentItem): | 
					
						
							|  |  |  | 	"""application - The Finder """ | 
					
						
							|  |  |  | 	want = 'capp' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class Finder_preferences(aetools.NProperty): | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	"""Finder preferences - (NOT AVAILABLE YET) Various preferences that apply to the Finder as a whole """ | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	which = 'pfrp' | 
					
						
							|  |  |  | 	want = 'cprf' | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | class clipboard(aetools.NProperty): | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	"""clipboard - (NOT AVAILABLE YET) the Finder\xd5s clipboard window """ | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	which = 'pcli' | 
					
						
							|  |  |  | 	want = 'obj ' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class desktop(aetools.NProperty): | 
					
						
							|  |  |  | 	"""desktop - the desktop """ | 
					
						
							|  |  |  | 	which = 'desk' | 
					
						
							|  |  |  | 	want = 'cdsk' | 
					
						
							|  |  |  | class frontmost(aetools.NProperty): | 
					
						
							|  |  |  | 	"""frontmost - Is the Finder the frontmost process? """ | 
					
						
							|  |  |  | 	which = 'pisf' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | class home(aetools.NProperty): | 
					
						
							|  |  |  | 	"""home - the home directory """ | 
					
						
							|  |  |  | 	which = 'home' | 
					
						
							|  |  |  | 	want = 'cfol' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class insertion_location(aetools.NProperty): | 
					
						
							|  |  |  | 	"""insertion location - the container in which a new folder would appear if \xd2New Folder\xd3 was selected """ | 
					
						
							|  |  |  | 	which = 'pins' | 
					
						
							|  |  |  | 	want = 'obj ' | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | class name(aetools.NProperty): | 
					
						
							| 
									
										
										
										
											2002-08-07 15:53:42 +00:00
										 |  |  | 	"""name - the Finder\xd5s name """ | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	which = 'pnam' | 
					
						
							|  |  |  | 	want = 'itxt' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class product_version(aetools.NProperty): | 
					
						
							|  |  |  | 	"""product version - the version of the System software running on this computer """ | 
					
						
							|  |  |  | 	which = 'ver2' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | class selection(aetools.NProperty): | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	"""selection - the selection in the frontmost Finder window """ | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	which = 'sele' | 
					
						
							|  |  |  | 	want = 'obj ' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | class startup_disk(aetools.NProperty): | 
					
						
							|  |  |  | 	"""startup disk - the startup disk """ | 
					
						
							|  |  |  | 	which = 'sdsk' | 
					
						
							|  |  |  | 	want = 'cdis' | 
					
						
							|  |  |  | class trash(aetools.NProperty): | 
					
						
							|  |  |  | 	"""trash - the trash """ | 
					
						
							|  |  |  | 	which = 'trsh' | 
					
						
							|  |  |  | 	want = 'ctrs' | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | class version(aetools.NProperty): | 
					
						
							|  |  |  | 	"""version - the version of the Finder """ | 
					
						
							|  |  |  | 	which = 'vers' | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	want = 'utxt' | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | class visible(aetools.NProperty): | 
					
						
							|  |  |  | 	"""visible - Is the Finder\xd5s layer visible? """ | 
					
						
							|  |  |  | 	which = 'pvis' | 
					
						
							|  |  |  | 	want = 'bool' | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | #        element 'alia' as ['indx', 'name'] | 
					
						
							|  |  |  | #        element 'appf' as ['indx', 'name', 'ID  '] | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | #        element 'brow' as ['indx', 'ID  '] | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | #        element 'cdis' as ['indx', 'name', 'ID  '] | 
					
						
							|  |  |  | #        element 'cfol' as ['indx', 'name', 'ID  '] | 
					
						
							|  |  |  | #        element 'clpf' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | #        element 'cobj' as ['indx', 'rele', 'name', 'rang', 'test'] | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | #        element 'ctnr' as ['indx', 'name'] | 
					
						
							|  |  |  | #        element 'cwin' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | #        element 'docf' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | #        element 'file' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | #        element 'inlf' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | #        element 'lwnd' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | #        element 'pack' as ['indx', 'name'] | 
					
						
							| 
									
										
										
										
											2002-08-07 15:53:42 +00:00
										 |  |  | application._superclassnames = [] | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | import Files | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | import Window_classes | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | import Containers_and_folders | 
					
						
							|  |  |  | import Finder_items | 
					
						
							| 
									
										
										
										
											2002-08-07 15:53:42 +00:00
										 |  |  | application._privpropdict = { | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'Finder_preferences' : Finder_preferences, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	'clipboard' : clipboard, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'desktop' : desktop, | 
					
						
							|  |  |  | 	'frontmost' : frontmost, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'home' : home, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'insertion_location' : insertion_location, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	'name' : name, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'product_version' : product_version, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	'selection' : selection, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'startup_disk' : startup_disk, | 
					
						
							|  |  |  | 	'trash' : trash, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	'version' : version, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'visible' : visible, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2002-08-07 15:53:42 +00:00
										 |  |  | application._privelemdict = { | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'Finder_window' : Window_classes.Finder_window, | 
					
						
							|  |  |  | 	'alias_file' : Files.alias_file, | 
					
						
							|  |  |  | 	'application_file' : Files.application_file, | 
					
						
							|  |  |  | 	'clipping' : Files.clipping, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'clipping_window' : Window_classes.clipping_window, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | 	'container' : Containers_and_folders.container, | 
					
						
							|  |  |  | 	'disk' : Containers_and_folders.disk, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'document_file' : Files.document_file, | 
					
						
							|  |  |  | 	'file' : Files.file, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'folder' : Containers_and_folders.folder, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'internet_location_file' : Files.internet_location_file, | 
					
						
							|  |  |  | 	'item' : Finder_items.item, | 
					
						
							|  |  |  | 	'package' : Files.package, | 
					
						
							|  |  |  | 	'window' : Window_classes.window, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # Indices of types declared in this module | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | _classdeclarations = { | 
					
						
							|  |  |  | 	'capp' : application, | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _propdeclarations = { | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'desk' : desktop, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'home' : home, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'pcli' : clipboard, | 
					
						
							|  |  |  | 	'pfrp' : Finder_preferences, | 
					
						
							|  |  |  | 	'pins' : insertion_location, | 
					
						
							| 
									
										
										
										
											2002-04-23 21:08:54 +00:00
										 |  |  | 	'pisf' : frontmost, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'pnam' : name, | 
					
						
							|  |  |  | 	'pvis' : visible, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'sdsk' : startup_disk, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'sele' : selection, | 
					
						
							| 
									
										
										
										
											2003-03-29 00:13:17 +00:00
										 |  |  | 	'trsh' : trash, | 
					
						
							| 
									
										
										
										
											2003-03-28 23:38:00 +00:00
										 |  |  | 	'ver2' : product_version, | 
					
						
							|  |  |  | 	'vers' : version, | 
					
						
							| 
									
										
										
										
											2000-08-20 19:29:03 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _compdeclarations = { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | _enumdeclarations = { | 
					
						
							|  |  |  | } |