Skip navigation.
 
mlRe: Send an event to another app
FROM : Nick Zitzmann
DATE : Thu Mar 06 05:40:29 2008

On Mar 5, 2008, at 9:20 PM, Alex Kac wrote:

> I realize that under OS X things are different and they simply don't 
> work that way. I also know that menus do have a handler and I 
> *assume* that even if a menu is greyed out or a sheet is open (which 
> I understand is modal) that the main window can still handle events 
> or messages. So what I want to do under OS X is write my own app 
> that periodically will force this app to save its document by 
> calling the same handler as what the Save menu command would call. 
> Again, I do realize that "bad things may happen", but for this app 
> we are using its worth trying for me.



Typically you'd do this by issuing an AppleScript command, which you 
can do with the NSAppleScript class. Something like "tell application 
MyApp to save document in front of documents" ought to work if the 
hypothetical MyApp is an NSDocument-based application.

Nick Zitzmann
<http://www.chronosnet.com/>

Related mailsAuthorDate
mlRe: Send an event to another app Nick Zitzmann Mar 6, 05:40
mlRe: Send an event to another app Alex Kac Mar 6, 05:47
mlRe: Send an event to another app Kyle Sluder Mar 6, 06:08
mlRe: Send an event to another app Christopher Nebel Mar 6, 18:26