Questions tagged [applescript]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
29 views

How to plot a point on the circumference of a circle using AppleScript and Illustrator

I need to put a grid of squares inside a circle in Illustrator. Ive written a script that works for this and gives me the following result But the problem I have is that the small areas of the grid ...
0
votes
0answers
44 views

How do I continuously check the status of a process and execute something once the process stops with an Apple Script?

I'm using an Apple Script to open an application and transcode a file. What I need to be able to do is continuously check the CPU usage of the process and when the CPU usage hits 0 I need to do ...
0
votes
1answer
144 views

How To Remove Only The Characters Inside Brackets [ ] From A String

So I have been searching for hours on how to do this via Applescript and I see no post about it. Basically, I have the following string: @junior_cat23, [ID]-[E9B-Z8X-H1V-722] I want the script to ...
0
votes
0answers
36 views

Convert resource-fork type 1 font files to some sort of data-fork font files?

I am trying to sort and organize resource-fork font files, and I'm trying to figure out if there is a tool that can do it for me, or some pointers to some documentation that would help me write my own ...
1
vote
0answers
52 views

Can the Books app be automated or scripted?

I don't know much about AppleScript or Automator. I use Catalina, up to date as of today, 2020 Jan 06. Today I was trying to use Automator to change the Category of multiple books in my Books Library, ...
0
votes
0answers
88 views

Applescript to send email messages to the ALL EMAILS of persons with specific in interest

I am trying to write a script that filters the persons in the Contacts application whose note include a specific keyword and sending those who has at least one e-mail address an e-mail (to all their ...
1
vote
1answer
481 views

Catalina Messages app: run applescript on receive new message & when the message is read?

Are applescripts for Messages still saved in /Library/Application Scripts/com.apple.iChat? That seems like an odd location, but I didn't find a folder for com.apple.messages I tried saving this in ...
0
votes
1answer
56 views

Applescript to send email messages to the persons with specific in interest and with at least one email address

I am trying to write a script that filters the persons in the Contacts application whose note include a specific keyword and sending those who has at least one e-mail address an e-mail. I have written ...
0
votes
0answers
78 views

Repeat keystroke while key is held [duplicate]

Is there a way or a 3rd party application which would let me 'send' a keyboard input/keystroke to a game (so that it has the same effect as physically hitting the key on the keyboard rather than just ...
0
votes
1answer
170 views

AppleScript click Ui Element with modifier keys

I want to click an Ui Element button with modifier keys pressed. Here is my code: tell application "System Events" tell process "Pro Tools" tell (1st window whose title contains "Edit: ")...
1
vote
0answers
86 views

applescript how to focus keyboard on menu bar 2

I am trying to get the keyboard to focus the right menu bar (Bartender 3 has this exact same feature). In System Preference, Shortcut, Keyboard there is a shortcut but it works only for the left menu. ...
0
votes
0answers
51 views

Mail Script in Rules

Hopefully, I can explain what I am attempting to achieve. I have an email address designated for SMS (sms@domain.com) This account gets check via Mail (apple V13). I have a rule that every message ...
0
votes
0answers
32 views

Is Paste Special via AppleScript broken in Microsoft Excel?

This seems like a fairly straightforward question. I am using Microsoft Excel 16.10 on a Mac running 10.13.6. When I run the following code: tell application "Microsoft Excel" tell worksheet "...
0
votes
1answer
104 views

How can I automate adding sender addresses to a Rule in macOS Mail? [duplicate]

So I've created a Mail Rule "Bin Spam Messages" that will delete messages from a sender. What I can't figure out is how to automate adding new sender addresses to the rule. I'm guessing I could do ...
1
vote
1answer
77 views

Batch Removal of “Where from” Metadata Without a Handler

I have many images that contain the "Where from" metadata in the "get info" section that shows the URL where they were downloaded from. I want to remove this information from all of them at the same ...
0
votes
2answers
319 views

How to mount a disk image with automator or Applescript and without hdiutil?

An Automator workflow that mounts a disk image on when I drag and drop the dmg file onto it is easy: Instead of dragging and dropping the dmg file I want to double click the created workflow and ...
1
vote
1answer
133 views

How can I tell if True Tone is on/off in a script?

I want to be able to print out if True Tone is on or off in a script. Is there a command to determine this?
0
votes
0answers
68 views

How to open multiple folders with a specific Application (Gemini 2)?

This is a supposed to be a simple AppleScript but I have searched many post on stackexchange.com and I cannot find anything that works. Basically, "Gemini 2" is a duplicate of finder (macpaw.com/...
-1
votes
1answer
220 views

QuicKeys no longer runs in Catalina, how to run AppleScript on schedule?

don't use Calendar instead, it always fails. QuicKeys is always promising although it can't wake up the Mac itself.
0
votes
2answers
54 views

Can't Rename Images Sequentially Via Applescript Because Other Images Already Have That Name

I am trying to automate batch renaming of images sequentially by using a simple Applescript. But I am having difficulty telling the script that there are images in the same folder that already have ...
1
vote
2answers
52 views

applescript: determine the date of last Sunday

I need to take today's date and work backwards to Sunday and get that date. so, for instance today is Monday, December 16. I need to know that the previous Sunday was December 15. I've tried ...
1
vote
0answers
115 views

enabling javascript in Chrome using an AppleScript

Is it possible to enable Javascript in Chrome aside from manually scrolling through the View menu? I tried scripting it, but it didn't execute or list any errors: activate application "Google Chrome"...
0
votes
1answer
98 views

Having Issues Renaming Files That Are Moved From A New to Old Folder via Applescript [duplicate]

Ok so this is a complex script that I hope someone out-there can help me with because I have spent the entire day trying to figure this out. Lets say I collect cat images from Instagram and I have ...
0
votes
1answer
61 views

How to make and alias list from multiples results of a shell script?

So this is the shell script that I have in my Applescript editor which brings up all of the videos that have been added to my computer today. do shell script "mdfind 'kMDItemDateAdded >= $time....
0
votes
2answers
79 views

Automator Change to directory of dropped files before running Shell command

Seems extremely simple, but I can't figure it out... I want to be able to change to the directory (folder) where the dropped file is located before running my shell script on that file. So either I ...
2
votes
0answers
132 views

Open Safari Passwords pane with AppleScript or Shell script

I'm trying to find a way to open the Safari Passwords pane without opening Safari - similar to how Siri opens it when you ask "Show me my passwords" on macOS. Any ideas? I'm thinking some kind of URL ...
0
votes
0answers
123 views

Apple Script - append text to note with new line

I am having a little trouble appending Text to a Apple Note. set AppendedText to (the clipboard) ################################### tell application "Notes" tell account "iCloud" tell ...
0
votes
1answer
43 views

Tools, languages, libraries and API's for development of a MacOS wide application [closed]

Please just assume that the user has accepted whatever permission are required. Is it possible to listen to window actions under MacOS? In Swift preferably? For instance, if a window moves, is ...
0
votes
0answers
77 views

Automator - applescript - (condition) if X button exist then click, if not, click Y button

I am struggling with writing a script for opening up a webpage and click different buttons depending if the button itself exists. I want it to be if X button exists, then click X button. If Y button ...
1
vote
0answers
398 views

iCloud Drive - Is there a way to manually refresh iCloud Drive files?

There's nothing wrong with how my iCloud drive files sync. It's just that sometimes it takes several minutes for them to sync. Is there a way to manually trigger a refresh?
0
votes
0answers
36 views

Apple Script - How to I check if an iCloud Drive file has been updated from another device?

Is there a way to check, via applescript, which device has updated a file stored in iCloud Drive? I know that the terminal command mdls [file path] lists lots of metadata. Does any of it identify ...
0
votes
0answers
172 views

Automator script to convert webp file to JPG not working

Hi I'm trying to write a Catalina mac Automator script that will convert .WEBP files into .JPG files. The shell code in Automator I'm using is for img in "$@"; do filename=${img%.*} /usr/...
1
vote
0answers
30 views

How to I create a Dock menu for my AppleScript application?

I just created an application with AppleScript, and I would like to create custom menu items for its Dock menu, as shown in the image below. How do I do that? I'm somewhat familiar with AppleScript, ...
2
votes
1answer
108 views

AppleScript to choose item on web page

Is it possible with AppleScript to choose a clickable element in a web page and click it and if so, can you give me an example?
1
vote
1answer
33 views

My mac Automator Application script is not working with two arguments

On my Catalina mac, I have this Mac Automator shell script to remove all metadata from image files as follows: for f in "$@" do /usr/local/bin/exiftool -all= "$f" done Now this utility exiftool by ...
0
votes
0answers
19 views

Incorrect validation loop [duplicate]

I made a loop that inserts a number into a string, and by the color of the number (blue - registered, red - missing), using the standard utility Digital Colors Meter determines the color of the number....
1
vote
1answer
30 views

Apple Script - How do I check if the bounds of a window are equal to specific values?

I know that the following code can adjust the bounds of a specific window set bounds of (front window of application "Notes") to {0, 0, 540, 300} But how do I check if the bounds of a window are ...
4
votes
4answers
668 views

Switch to a specific input source in OS X in Catalina with AppleScript

I use different keyboard layouts and switched between them using a simple script on changeKeyboardLayout(layoutName) tell application "System Events" to tell process "SystemUIServer" ...
0
votes
0answers
36 views

Incorrect validation loop for iMessage [duplicate]

I'm trying to do a number checker in imessage. We all know that there is no such api, so I'm trying to use the tools at hand. The main took with past issues on this site on this topic. I made a loop ...
1
vote
1answer
73 views

iMessage checker

I'm trying to do a number checker in imessage. We all know that there is no such api, so I'm trying to use the tools at hand. The main took with past issues on this site on this topic. I made a ...
1
vote
1answer
86 views

Set a coloured text and send it to the clipboard

This is probably very easy, but all the solutions I found were directed to specific applications. At my work, we use an online system within the browser and I find myself every day setting the color ...
1
vote
2answers
198 views

Apple Script - How do I check if a window with a specific title exists?

I would like to create an apple script that checks if a window of an application with a specific name (not id or index) exists. I used the following code in a previous script, and it works: tell ...
0
votes
2answers
261 views

Applescript - Close all windows except frontmost window

I have created an automator quick action that runs the following apple script tell application "System Events" set frontApp to name of first application process whose frontmost is true --...
1
vote
2answers
77 views

Why does AppleScript “exists” sometimes always return “false”? (part of question regarding checking documents in Pages)

I'm new to AppleScript and I've reached this problem after several other problems and work arounds (see further down for more details). My current problem is that I'm telling Pages to check if any ...
1
vote
2answers
32 views

Request Applescript to copy only one file type from 2 folders, into a 3rd folder

Hi I've been trying to find utilities that will do this but I am guessing applescript/Automator on Catalina mac would work too. Basically I have 2 folders with all kinds of books (.pdf, .mobi and ....
1
vote
1answer
550 views

How do I use AppleScript to open a specific note from Apple's Notes application?

I would like to create an AppleScript (or a command from Terminal) that opens a specific note from Apple's Notes application, preferably in a separate window. To be clear, I don't want to create a new ...
1
vote
2answers
87 views

How do I remove and/or change the speed of the minimize animation for application windows in macOS Catalina?

When I click on the yellow minimize button at the top of an application window, it takes forever for the application to minimize and go into the dock. Is there a way to remove or change the speed of ...
1
vote
1answer
87 views

How do I save a text file using a variable using the “New Text File” action in Automator?

I am new to Automator and writing with AppleScript. I wrote a program that collects URLs and stores them as a long, single string. After the AppleScript portion of the workflow, I want to save the ...
0
votes
1answer
139 views

applescript: commands to maximize (green button) an iTerm window

Assuming I am opening an iTerm window with the following AppleScript: tell application "iTerm" set win1 to (create window with default profile) repeat until exists win1 ...
1
vote
1answer
32 views

applescript: Appropriately escape input in script invocation

I have the following snippet in an applescript: tell current session of current tab of current window write text "watch -n1 'kubectl get pods | grep -i" & input' ...

1
3 4
5
6 7
54