How is it possible to listen for events in OS X JavaScript for automation.  In the scripting Library for the Messages application there is a list of event handlers, such as messageSent and messageReceived. However, I cannot figure out how to use them...
In short - what is the JavaScript for Mac Automation equivalent of AppleScript's as «class utf8» ?  I have a unicode string that I'm trying to write to a text file using JavaScript for Mac Automation.  When writing the string to the file, a...
I'm stuck writing a JXA script using Apple's Script Editor.  Essentially, I want to go through my inbox folder and move messages older than 44 days to an archive folder.  I'm able to find the account, and my inbox and archive "mailbox...
In a Mac mail rule, I am trying to run a javascript instead of an applescript. This has been asked in Mail Rules using JavaScript for Automation instead of AppleScript but the answer is not working for me!  I have tried to simplify the code as much a...
I'm trying to click on button "Free" to download application in iTunes. I'm using Javascript for Automation to open iTunes application page:  itunes = Application('iTunes'); itunes.activate(); console.log( itunes.name() ); con...
I'm having a hard time extracting presentationNotes from a keynote presentation using JXA (Javascript for osx) I don't want to use applescript. There is way more to this script than extracting notes.  It seems rather simple. However when I ge...
In Yosemite it now is possible to use JavaScript for automation as well as Applescript. I am having trouble with certain StandardAdditions commands. E.g. from the Contacts application I can use displayAlert, but not displayNotification. Both are in t...
I use JXA to script workflows for Alfred 2 and recently tried to run a script from within another script. I need to pass some text between the scripts, so I decided to use parameters, but whenever I try to pass a string, a number, an array or anythin...
The StandardAdditions.sdef indicates that particular data types can be retrieved from the clipboard using the key 'as'.    The clipboardInfo() function reveals what these keys are for Applescript, but is less eloquent in case of Yosemite Java...
I am trying to figure out how JXA(JavaScript for Automation) works, so try to translate a simple applescript as below to JXA.  tell application "Finder"     open location "smb://XXXXXXXX" end tell   what I tried is here:  finder = App...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.