コード例 #1
0
ファイル: __init__.py プロジェクト: WeizhengZhou/pokemonWalk
	def call(self, name, *args):
		""" Call the specified user-defined handler.
				
				name : str -- the handler's name (case-sensitive)
				args : anything -- arguments to pass to script, if any; see documentation for supported types
				Result : anything | None -- the script's return value, if any
			
			Notes:
			
			- The handler's name must be a user-defined identifier, not an AppleScript keyword; e.g. 'myCount' is acceptable; 'count' is not.
			
			- AppleScript will ignore excess arguments. Passing insufficient arguments will result in an error.
			
			- If execution fails, a ScriptError is raised.
		"""
		evt = self._newevent(kae.kASAppleScriptSuite, kae.kASPrepositionalSubroutine, args)
		evt.setDescriptor_forKeyword_(NSAppleEventDescriptor.descriptorWithString_(name), 
						fourcharcode(kae.keyASSubroutineName))
		return self._unpackresult(*self._script.executeAppleEvent_error_(evt, None))
コード例 #2
0
ファイル: __init__.py プロジェクト: gianghta/Mactify
	def call(self, name, *args):
		""" Call the specified user-defined handler.
				
				name : str -- the handler's name (case-sensitive)
				args : anything -- arguments to pass to script, if any; see documentation for supported types
				Result : anything | None -- the script's return value, if any
			
			Notes:
			
			- The handler's name must be a user-defined identifier, not an AppleScript keyword; e.g. 'myCount' is acceptable; 'count' is not.
			
			- AppleScript will ignore excess arguments. Passing insufficient arguments will result in an error.
			
			- If execution fails, a ScriptError is raised.
		"""
		evt = self._newevent(kae.kASAppleScriptSuite, kae.kASPrepositionalSubroutine, args)
		evt.setDescriptor_forKeyword_(NSAppleEventDescriptor.descriptorWithString_(name), 
						fourcharcode(kae.keyASSubroutineName))
		return self._unpackresult(*self._script.executeAppleEvent_error_(evt, None))
コード例 #3
0
ファイル: aecodecs.py プロジェクト: gianghta/Mactify
 def packstr(self, val):
     return NSAppleEventDescriptor.descriptorWithString_(val)
コード例 #4
0
ファイル: aecodecs.py プロジェクト: WeizhengZhou/pokemonWalk
	def packstr(self, val):
		return NSAppleEventDescriptor.descriptorWithString_(val)