3

To automate changing the color of selected text in Notes it can be done with UI Scripting, which you are already using to click Strikethrough on the menu. Since you did not specify a color or which tab on the Colors window you want to work with, I'll show two examples, one for the Pencils tab and the other for the Color Palettes tab. With the text already ...


2

I do not have a menu item that starts with Simulator; however, using Experimental as in Experimental Features, the following example AppleScript code did retrieve the names of the menu items on the Experimental Features menu item of the Develop menu in Safari. (My system is set to US English.) tell application "System Events" to tell application process "...


2

When you have a window that is a system dialog, or alert, type of window, and you do not know which application it belongs to, you can try using code such as the following example AppleScript code to determine the name of the application to which it belongs: tell application "System Events" to ¬ get name of every application process ¬ whose role ...


2

The following example AppleScript code will do as you asked: set the clipboard to "questions/392514/i-want-to-write-a-script-to-open-a-fixed-url-whats-in-the-clipboard-ex-open" set myURL to "https://apple.stackexchange.com/" & (the clipboard) tell application "Safari" to ¬ tell its first window to ¬ set its current tab to ¬ (...


1

If you are just wanting to script the clicking go the Open in New Tabs menu item of the target folder under Bookmarks, then the following example AppleScript code will do that: set bookmarksFolder to "Saved Tabs" tell application "Safari" to activate delay 1 tell application "System Events" to ¬ click menu item "Open in New Tabs" of ¬ menu 1 ...


1

No, System Events can only send keystrokes to the frontmost window and is not capable of sending keystrokes to a window that's in the background.


1

While I know you've asked about automating this via AppleScript/Automator; nonetheless, let me offer a different, possibly better, approach in which a keyboard shortcut is assigned to the existing Export as PDF… command on the File menu in Mail. You would then be able to select the message(s) and press, e.g., ⌘D then Enter to have the message(s) exported to ...


1

This following AppleScript code will save single or multiple selected email messages as individual PDF files. Each PDF file will be named as the subject of the selected email message. This solution works for me using the latest version of macOS Catalina. tell application "Mail" to activate tell application "System Events" to tell application process "Mail"...


1

Run which exiftool or type exiftool and use that path instead of exiftool in the script. For e.g. if I was using git in Automator, I'd do this. /usr/bin/git pull Modify this for exiftool usage.


1

Going off the answer you provided: on open fileName do shell script "PATH=/Library/TeX/texbin:$PATH ¬ open -n -a /Applications/Xournal++.app " & ¬ quoted form of POSIX path of fileName end open a simpler solution would have been: on open {fileName} tell application "Xournal++" to open (fileName as «class furl») ...


1

You can try these three potential solutions to see if either fare any better than the built-in Automator action. The first is a plain AppleScript handler that takes a list of exceptions (apps that are exempt from being quit), and then proceeds to send a quit command to all the others (they being any application process not belonging to a file in the /System ...


1

Upgrading to Catalina solved this problem, and the twin problem I had: App Store on Mojave: "We could not complete your purchase. cancelled".


1

I just had to figure out how to open and read a plist with JXA myself, and it was not intuitive at all. The documentation on JXA is frankly terrible. I searched the dictionaries in Script Editor, but also made liberal use of the properties() method in Script Editor, which will show you all the properties of many objects. I finally did figure it out for ...


1

You can also use Hammerspoon to do this programmatically. I have this in my Hammerspoon init script: -- swap which is primary screen: external monitor or laptop hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "f11", function() -- allScreens seems to return the screens in order of primary, non-primary -- so with two screens, this always operates on the ...


1

Change "activate" to "run" to make the script run in the background. also add "quit" to the end of the script with a delay of 0.6 to quit system preferences after executing the script. try tell application "System Preferences" (run) set current pane to pane "com.apple.preference.trackpad" end tell tell application "System Events" tell process "...


Only top voted, non community-wiki answers of a minimum length are eligible