Allow interapplication communication between apps on macOS using JavaScript for Automation.

Posts under JXA tag

2 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Applescript to estimate driving times
I'm trying to automate making accurate alarms to help me estimate when I need to leave to be on time for meetings. To do this accurately, I want to access Apple Maps (or Google Maps services, or ...) to get an estimate of driving times given current driving conditions. So I'd like to query the maps service reasonably close to departure time. (If I get an estimate on Sunday evening at for an appoint on Monday at rush hour leaving from a different location, it's obviously going to be inaccurate.) Ideally, I'd like to directly access my Apple Calendar to get the appointments and their locations. But if that's too complicated, I'll just create a formatted text file or sqlite file or whatever with the information. I've considered doing this with Shortcuts, Automator, AppleScript, JXA, Hammerspoon, Python, etc. It seems that each technology has part of what I need, but not all. But I don't have deep knowledge of any of them. Perhaps someone can advise me on the most appropriate technology. Here are my impressions: Shortcuts: Has built in access to driving time estimates and Calendar events, but awkward and possibly too limited in terms of program logic. Automator: Is more capable than Shortcuts in some ways, less in others. AppleScript: I don't know. JXA: I prefer Javascript to AppleScript, but it seems hard to find good documentation. Python: I'm quite proficient in Python, but I don't know if I can access things like Calendar events. If not, I'm willing to keep a separate file manually. (I could perhaps create the Calendar events from this, except that some appointments are set up by my work.) Hammerspoon: I don't have any experience with it and don't know it's capabilities. Any advice appreciated.
2
0
570
Sep ’23
Automated Mouse Moving
I am attempting to automate the movement of my mouse fully through Apple software. I have tried a variety of things, and I am now on the Dev Forums because I've ran out of ideas. Some of the things I have attempted are: Full Keyboard Access, Mouse Keys, Accessibility Keyboard with Panel Editor actions. Please, feel free to share any advice you may have. My goal is to only move the mouse enough for the computer to know it is active. That could be one pixel. Mouse keys works, but I can't get it to automate, I still have to click "u" and "o" to move the mouse. Thanks for any advice y'all may have! Have a blessed day!
0
0
408
Aug ’23