tell application "Mail" to launch in ASOC

This doesn’t appear to do anything, yet in AppleScript Editor, it launches Mail. I’d appreciate an explanation as to what I’m missing, or at least a pointer to where I can read about it. I haven’t been able to find anything about it through searching.

– Edit–

More detail: it does appear to work at some point, but not in awakeFromNib().

– Edit again –

And it appears to work in on applicationWillFinishLaunching_(aNotification). So that’ll work for me. Nevermind! :slight_smile:

Thanks!
Derek

to let it work in any situation you can use NSTask or do shell script and use open -b com.apple.Mail. Just like your code it would startup if mail is not running, otherwise it makes it the front most application.

Thanks for the tip, DJ Bazzie Wazzie!