5 ms·
Really not sure what the point of either of these would be, could you fill in more of a real word example?
by rikkus 12y ago
Really not sure what the point of either of these would be, could you fill in more of a real word example?
- matthewmacleod 12y agoThat looks pretty straightforward - it retrieves a list of messages from Mail which have a particular subject. Presumably you can then perform actions on them.
- dubcanada 12y agoThe problem is the Javascript language requires you to import the Cocoa stuff ObjC.import('Cocoa') And then you get stuff like task = $.NSTask.alloc.init task.running == task.isRunning The AppleScript version if application "iTunes" is running then --- Do stuff... end if It may just be me, but in some cases the AppleScript version is easier and better.
- linguafranca 12y agoI think you're misreading the document, I don't think you actually have to instantiate an NSTask in order to compare whether another application is running. You would just do something like this: Mail = Application('Mail') if (Mail.isRunning) { ... }
- oatmeal_coffee 12y agoThe Cocoa/Objective-C links are for building apps, not higher-level automation.