Skip to main content

Questions tagged [applescript]

AppleScript is a proprietary programming language in macOS to control and exchange data with applications.

649 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
1 answer
2k views

Change keyboard layout automatically when external keyboard connected

I recently purchased an external keyboard (non-apple) that is used at home and also dragged along with me from time to time, and I've noticed a need. My Mac is in English, as well as its physical ...
hpl002's user avatar
  • 191
7 votes
0 answers
547 views

Applescript - Reminders - Unbearably Slow

I wanted to write a script to "push" reminders back by an hour. I came up with this: tell application "Reminders" launch set c to current date set newtime to c + 3600 set the remind ...
Markus's user avatar
  • 71
7 votes
1 answer
4k views

AppleScript to read all notifications in the Notification Center OSX 10.10 Yosemite

It seems like the following AppleScript is no longer working in the latest version of the OS X 10.10 (Yosemite): on run tell application "System Events" tell process "...
Fabio Moggi's user avatar
6 votes
0 answers
890 views

Yosemite Mail "Load Remote Content" from senders in my contacts

I would like Mail on Yosemite to load remote content from senders in my contacts and not for everyone else. I have remote content disabled now and I have pieced together an AppleScript to click the ...
alecho's user avatar
  • 160
5 votes
0 answers
14k views

Convert Mac to Windows paths and visa-versa for sharing with colleagues

Wanted to share perhaps a more thorough answer to this question, where the solution does not satisfy. Reference: How to translate between Windows and Mac -style file locations? PROBLEM From a Mac, I ...
Matt Deniston's user avatar
5 votes
1 answer
440 views

Any way to write the Terminal scrollback history?

I would like to open a new tab in Terminal with custom scrollback history. The primary use-case is to "fork" an existing tab such that both tabs contain the same scrollback history, but more generally ...
TerminalUser's user avatar
4 votes
1 answer
256 views

How to send an email with AppleScript, without the text being put in a blockquote

I am trying to use AppleScript to automate sending mails through AppleMail, but the message always ends up being send as a blockquote (i.e. as if I replied to an email and my message got quoted). Is ...
powerpete's user avatar
4 votes
0 answers
626 views

How to stop Mac apps from automatically recognising phone numbers?

Whenever there's a string of a few numbers on my Mac, it recognises it as a phone number and tries to dial it (through FaceTime) every time I click it. Is there a way to stop this, either with System ...
Righter's user avatar
  • 164
4 votes
1 answer
2k views

Use Google speech to text instead of Apple's

Google currently has much higher quality speech transcription. You can try it easily by going to doc.new and pressing Cmd-Shift-S and talking. Compare to using the built in system from Apple (pressing ...
avv's user avatar
  • 283
4 votes
1 answer
1k views

Adding login items from terminal in Catalina

I've tried multiple ways but none work. A few AppleScripts and even some bash script somebody made. Which essentially just executes a different AppleScript afaik. Some of the commands I have tried: ...
undefinedChar's user avatar
4 votes
0 answers
773 views

How to use AppleScript to make Siri shortcuts?

Is there a way for me to configure my MacBook with AppleScript so that Siri will tell me my schedule for the day and other relevant information I want to know? I would like to be able to write ...
Jack Moody's user avatar
4 votes
0 answers
2k views

Click a button on dialog window using AppleScript on Microsoft Excel

When I open the .ods file in microsoft excel I would like to on the "Alert" dialog box click "Yes" with the apple script. I try like this, but not work :( set theWorkbookFile to choose file with ...
Grzegorz's user avatar
4 votes
0 answers
10k views

How to get rid of the "Grant File Access" dialog in Word 2016+AppleScript when inserting a picture

We use AppleScript to create MS Word documents, which also included pictures. This works fine with Word 2011, but I run into problems with Word 2016. When opening files with Word 2016 via ...
doekman's user avatar
  • 867
4 votes
0 answers
607 views

Executing "Copy Dropbox Link" with a script

I want to create a script that executes the command from the contextual (control-click) menu, "Copy Dropbox Link". How can I access this command with Applescript (or any other Mac scripting service)? ...
Crowder's user avatar
  • 3,964
3 votes
1 answer
120 views

Can I Make Applescript to Count Number of Files Created?

I would like to start learning AppleScript. I want to add to my workflow a counter that will keep track of the amount of PDFs i create for a job and keep a tally of those documents. I can then forget ...
rcktship's user avatar
3 votes
0 answers
214 views

Automating Zoom.us app with applescript

I'm helping disabled person to adapt Zoom application for their special needs. The problem is that zoom exposes only raise hand reaction via Option + y keyboard shortcut. My goal is to let this person ...
A B's user avatar
  • 490
3 votes
0 answers
605 views

How to run VBA macro using AppleScript?

To run VBA macros stored in Personal.xlsb, I have to: Tool - macros (I use menu bar search for this) In the macro dialog box, I have to go to the end of xlsb! and type the name of subroutine (have to ...
PSZ's user avatar
  • 41
3 votes
1 answer
231 views

Applescript permissions in Mac OS 12

My music licensing business uses Filemaker and quite a few Applescripts as part of its day to day operations. For years we have been running everything on OS 10.14 without any issues. We recently ...
user1588920's user avatar
3 votes
1 answer
319 views

How to resize multiple photos (batch) in Apple Photos app on macOS

Having 1 TB of photos and videos in Photos.app, one might want to resize some old photos or even videos so that the changes are perfectly (keeping all metadata) updated in the Photos.app and the ...
Vito Valov's user avatar
3 votes
0 answers
108 views

Is it possible to add url to reminder through AppleScript in attachment (preview) style

Hi folks, I have an apple script question. Maybe someone know is it possible to add reminder with url in form of preview and not text (on screenshot I want a bottom variant) Adding url in form of the ...
japanese-goblinn's user avatar
3 votes
0 answers
2k views

Not authorized to send Apple events to System Events. (-1743)

I can execute my Apple Script when I load/open it from Apple Script Editor. No errors. However, I have added Editor to the menu bar of my Mac (Catalina OS) with my script copied to the User Scripts ...
wuki's user avatar
  • 31
3 votes
2 answers
2k views

AppleScript - Click coordinates stopped working

I use a web-based program that lacks batch actions. This creates the need for repetitive clicking. I wrote a script on Apple's Script Editor that took care of that, it is very simple and worked ...
GabePhil's user avatar
3 votes
0 answers
118 views

Any tricks anyone can recommend on how to uniquely identify a window (in any app) after restart?

I have a fun little project I am working on. I am developing an AppleScript that saves and restores windows to their original desktops (a.k.a. "Spaces") after a restart or an app relaunch. ...
hepcat72's user avatar
  • 1,287
3 votes
0 answers
2k views

Add Finder Sidebar Section via Terminal

Is it possible to add a new section to the Finder sidebar? I'm interested in adding a new section to the Finder sidebar, and auto-populating it as part of some personal automation. I understand that ...
Tom J Nowell's user avatar
3 votes
1 answer
2k views

Move an application window to a specific desktop with AppleScripts

Does anyone know how to move an application window to a specific desktop with AppleScripts? I am asking this because I want to automate the following process, for example: move the 1st window of ...
Yutaro's user avatar
  • 31
3 votes
0 answers
2k views

How can I run an executable as sudo by double clicking in Finder?

I just wanted to see if anyone more experienced with MacOS (primarily develop on Windows) can help me with a small issue I'm currently trying to resolve. Based on the comments I just want to add some ...
Chris's user avatar
  • 131
3 votes
0 answers
374 views

Using AppleScript to delete an event still existing in Calendar?

I'm trying to write an AppleScript that clears a calendar (an iCloud one) of all of its events. I have the following: tell application "Calendar" tell calendar "Test calendar" set ...
Patrick's user avatar
  • 31
3 votes
0 answers
209 views

Programmatic (AppleScript) access to notification centre history

I have followed this thread, which addresses active notifications which appear on the desktop: How do I clear All OS X notifications with 1 click?. These solutions offer programatic approaches to ...
Barton Friedland's user avatar
3 votes
0 answers
180 views

highlighting text in safari

I need to highlight every instance of some keywords in Safari. I have this script which work : set myList to {"demo", "demo1"} try tell application "Safari" do JavaScript "document....
Kevin's user avatar
  • 2,378
3 votes
0 answers
1k views

loginwindow high CPU usage

I have simple zsh script which executes the following code at a regular interval. spotify_track=`osascript -e 'tell application "Spotify" to name of current track as string'`; This is causes ...
mohitmun's user avatar
  • 131
3 votes
0 answers
1k views

Display long text with applescript, preferably with a scrollbar

How can applescript display a long text that does not fit on the screen? I am looking for command similar to "display dialog", yet where I would be able to read the whole text. "display dialog" ...
laetitia's user avatar
3 votes
0 answers
1k views

AppleScript and Numbers: Copying from one spreadsheet to another?

I'm new to AppleScript, and I'm trying to find a way to use it to copy a value from one Numbers spreadsheet and paste it into another file. The situation is that I've been using Numbers to run a ...
Paul C's user avatar
  • 31
3 votes
0 answers
211 views

Close Dock and top bar

Is there a way to keep the application Dock closed. Every time I do: killall dock It closes for a bit then automatically reopens. I want to be able to make an AppleScript program that keeps it ...
Bradman175's user avatar
3 votes
0 answers
237 views

Is there a tool or scripting approach to change the arrangement of displays?

I move my monitors around a bit during the day. Specifically I rotate them or move my laptop to different positions. Each time I have to open up System Preferences > Displays > Arrangement and make ...
studgeek's user avatar
  • 4,371
3 votes
0 answers
330 views

Export image from clipboard to folder

I create a lot of mockups for my mobile phone. I recently heard of the brilliant idea to just put your current mockup as an image into your Dropbox (or whatever cloud your using). Then just take your ...
fancy's user avatar
  • 361
3 votes
0 answers
2k views

Set iMessage sender in applescript for a new message

Applescript allows you to send messages via iMessage and the command line, ie) https://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service Is ...
Luke Rehmann's user avatar
3 votes
0 answers
580 views

Detecting typing in Messeges app using applescript?

In the new Messages app, which replaced iChat, you can see when another person is typing: And i've been scripting around the messages app and was wondering if there was any way to detect when the ...
Trevor Rudolph's user avatar
3 votes
0 answers
381 views

Applescript vs. Spaces in Lion (10.7)

In Snow Leopard (10.6), I had an applescript that toggled iTunes between "maximised on Space 2" and "mini-player on all spaces": set app_identifier to do shell script "echo 'com.apple.iTunes' | /usr/...
Ben Williams's user avatar
3 votes
1 answer
351 views

Is there a way for AppleScript to detect when a Desktop is switched?

When I switch desktops, I want to have a way to remind me of the purpose of that desktop. I'm thinking of using AppleScript to detect when I switch desktops, and show a pop up of sorts. Desktops / ...
makerofthings7's user avatar
3 votes
1 answer
3k views

How can I permanently force Xerox secure printing?

My clients are printing direct to a network printer (no print server). Xerox have confirmed that the Secure Print Only option is only available in Windows, so I am looking at editing .plists, ...
Si King's user avatar
  • 137
2 votes
0 answers
16 views

How to use AppleScript to find all emails from the same sender?

My goal is to search mail for all messages in the inbox from a sender, simply by selecting one email and enabling the script. I have succeeded in writing a script that opens all messages from a ...
Izaac Post's user avatar
2 votes
0 answers
178 views

Use Applescript to check if screen is locked on a Mac with Apple silicon?

For years, I've used Applescripts to check if my Mac's monitor is locked (not to be confused with checking if the screen saver is active. I don't have the screen saver lock the screen since I use the ...
2oh1's user avatar
  • 947
2 votes
0 answers
44 views

Compiling an AppleScript workflow dependent on script libraries into a self-contained app

When building an AppleScript using Script Editor and some external /Library/Script Libraries, it is possible to make the final app self-contained by compiling it. I tested it by compiling a script ...
user776686's user avatar
2 votes
0 answers
217 views

Add "Allow in the background" items from command line

Some of the applications on my system run only if they are allowed to run in the background. I want to run these apps only in certain time windows. Due to this, I am manually enabling the app in ...
Chillar Anand's user avatar
2 votes
2 answers
175 views

Use Applescript to set a Music app playlist's View Options?

I'm trying to write an Applescript that lets me set up the view options for a playlist, instead of having to click "View (as songs) > Show View Options" and then clicking a bajillion ...
2oh1's user avatar
  • 947
2 votes
1 answer
62 views

Applescript folder action to email file

What's wrong with this script? I keep getting a syntax error on the word message on line 9. property defaultEmailApplication : "Microsoft Outlook" -- change this to the name of your ...
Ryan's user avatar
  • 39
2 votes
0 answers
39 views

Disable Badges with a script on multiple apps in Ventura

Trying to have a script I can use with a shortcut to disable badge notifications on multiple apps for when I need to focus - like for example in a meeting, etc. I don't want to have to go into ...
Ery's user avatar
  • 21
2 votes
1 answer
197 views

Ventura, automatically close all "Disk Not Ejected Property" notifications?

On macOS 12.x I was using a script to automatically close massive number of Disk Not Ejected Properly notifications that show up the next morning if I inadvertently leave my computer running with one ...
inspirednz's user avatar
2 votes
0 answers
96 views

Is there a way to programatically detect Universal Control monitors and arrange displays?

I've been trying to find a way to programatically detect and script Universal Control. (Some background: imagine you have two Macs—call them A and B—both hooked up to external displays over USB-C to ...
Tom Morris's user avatar
2 votes
0 answers
54 views

AppleScript's "Set first paragraph to" using Mail no longer works with 13.1 (Ventura)

I have an Automator/AppleScript task working since months that takes a selected e-mail, replies to it and adds a standard greeting on top of the reply. Since updating to macOS Ventura (13.1), the ...
fredlcore's user avatar

1
2 3 4 5
13