Mac:AppleScript: Difference between revisions

Jump to navigation Jump to search
Line 14: Line 14:
e.g. if Firefox Sync would like to have an Applescript command "tell application "Firefox" to sync", it could register with the Applescript service to forward all "sync" Applescript requests to their Javascript code.
e.g. if Firefox Sync would like to have an Applescript command "tell application "Firefox" to sync", it could register with the Applescript service to forward all "sync" Applescript requests to their Javascript code.


'''Discussed Options'''
'''Implementation Options'''


*Proxy objects: similar to Tom Dyas' work in {{bug|516502}}, have an application create their own set of proxy Obj-C classes to respond to Applescript.  
*Proxy objects: similar to Tom Dyas' work in {{bug|516502}}, have an application create their own set of proxy Obj-C classes to respond to Applescript.  
Line 23: Line 23:
**Pros: can be maintained at the Gecko-level, allows developers with no knowledge of Obj-C to provide functionality to Applescript
**Pros: can be maintained at the Gecko-level, allows developers with no knowledge of Obj-C to provide functionality to Applescript
**Cons: could have performance implications (given changes to NSApplication), greater chance of problems interacting with Apple's code
**Cons: could have performance implications (given changes to NSApplication), greater chance of problems interacting with Apple's code
'''Other Options'''


*Override [NSScriptCommand executeCommand] and do our own parsing and handling of Applescript commands.
*Override [NSScriptCommand executeCommand] and do our own parsing and handling of Applescript commands.
31

edits

Navigation menu