Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

New answers tagged

0 votes

How to click a button using AppleScript?

I adjusted my script as follows. Get neither an error message, but unfortunately it also doesn't click the button: try tell application "System Events" tell application process &...
user avatar
1 vote

How to click a button using AppleScript?

Press Cmd+Shift+4 to get the exact coordinates where you want to click. Suppose you got the coordinates like (1065,650) then use this command in AppleScript. try tell application "system ...
user avatar
0 votes

com.automator.runner.xpc is not allowed to send keystrokes

Another thing that COULD be causing problems is spaces in the script name. I have no idea why, but as this comment on another question pointed out, it seems that having spaces in the filename of the ...
user avatar
  • 199
0 votes

Automator Applescript - How to click the second checkbox

The usual approach, is to first get a list of your window's UI elements with the Apple provided Accessibility Inspector or directly in the Script Editor. If you were to use the Script Editor, here's ...
user avatar
0 votes

Applescript to open (mail) URL scheme via clipboard?

Resolved via a Redditor tell application "Finder" to open location (the clipboard) Simples! So, this will work for applications that don't work with URL schemes natively. Simply paste in ...
user avatar
1 vote

Search all of Apple Music with AppleScript?

I like this shortcut since it works on iOS and macOS and you can inspect the API usage before importing it. https://www.icloud.com/shortcuts/cbdbcde5659b41c2928aec4b42567662 It has a note on who ...
user avatar
  • 218k
0 votes

How can I set up a shortcut on macOS Monterey to delete selected files?

Howe are you? I had a similar problem and wanted to delete files of certain folders and wrote an AppleScript as I think it is easier to use. However, you might find this useful to delete files and use ...
user avatar
2 votes

Mass Convert Numbers to CSV/Excel (Watch me do)

Create a folder on your desktop and name it "CSV_Documents". This will be the location all of your exported .csv files will be saved to. Paste this following AppleScript code into a new ...
user avatar
  • 6,307
1 vote

Scripting with multiple sections but different result

You want a select statement. Refer to https://www.tutorialspoint.com/unix/select-loop.htm for how to construct one. An example from that page... #!/bin/ksh select DRINK in tea cofee water juice appe ...
user avatar
  • 3,852
0 votes

Entering password through keystroke fails

Was able to solve this problem by using key code instead of keystroke. Not really sure about the reason for keystroke to not work. But using key code works as of now.
user avatar
  • 125
0 votes

Make any application into a global drop down application (Quake terminal style)

Found a decent answer to this question. I used bettertouchtool to assign a custom keybinding to perform the action Show/Hide Specific Application. Seems to work pretty similar to what I'm going for. ...
user avatar
  • 131
0 votes

Any way to change sound output device via Applescript or shell?

There is aloe a paid $5 app called Ears that will do the job and can be used with the command line https://retina.studio/ears/
user avatar
0 votes

How to find the application that controls system dialog window

Applescript does not work for me but you can use Accessibility Inspector.app (bundled with XCode), see How To Identify Process From A Toolbar Icon or Window?
user avatar
2 votes

How to run "node index" from a folder in terminal

You may have the cart before the horse here (or even two carts if you really want launchd or cron to schedule your process to run). I would save your command to a script file and test it with your ...
user avatar
  • 218k
4 votes

AppleScript for zipping folders does unexpected things

The reason for the error is that zip tries to compress files by storing their filenames only, as specified by the -j option (from man zip): Store just the name of a saved file (junk the path), and do ...
user avatar
  • 13.5k
0 votes

Bash script or AppleScript to connect & disconnect an Airplay display in Monterey+

I don't think a solution purely in bash would be possible, since we are trying to interface with internal macOS application events. Further, I could not find direct reference to AirPlay, Displays, or ...
user avatar
  • 83
1 vote

How do I add leading zeroes to a batch rename Applescript?

One solution would be to add the number to a string of zeros and get the desired number of digits from the end. Using your script (you might want to add some error handling for duplicates, etc), it ...
user avatar
  • 1,084
1 vote

Is it possible to change display resolution with a keyboard shortcut?

This worked for me on Monterey 12.3.1 to change resolution on my 2nd monitor from the list. I will transfer this script to automator to change resolution with keyboard set res to 3 set monitor to 2 ...
user avatar
1 vote
Accepted

script menu keeps disappearing from menu bar

I know this following AppleScript code works on macOS Monterey. Save this following AppleScript code as an .app or create an Automator Quick Action. It will automatically put the Script Menu back in ...
user avatar
  • 6,307
0 votes
Accepted

How can I stop Mac Automator using previous specification for my actions?

Each action passes an output to the next item. So your action to Rename Finder Items will pass its output on to the next action. You need to check "Ignore this action's input" when you Get ...
user avatar
  • 22.7k

Top 50 recent answers are included