Questions tagged [applescript]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Google Chrome does not have permissions to "see" dialog boxes

I am a huge fan of automating my workflow with Keyboard Maestro, a kind of uber macro tool that can run script steps, execute Applescript or Javascript, save variables and do lots of other stuff. I ...
Peter in Japan's user avatar
0 votes
0 answers
25 views

How to automate a macOS Finder Extension with AppleScript or Automator?

I am trying to improve a photo processing AppleScript I've already written. I have a set of files in a folder I'd like to send to an app, DXO PureRaw. I currently do this in with: open newFolderPath ...
markelp's user avatar
0 votes
0 answers
28 views

ISL Light macOS remote connection via SSH

I am trying to establish a new tunnel on ISL Light app from ISL Online. I have an account already and on when I log in, in the Computers window I can access a remote server that I am assigned to have ...
adriB's user avatar
  • 1
0 votes
0 answers
25 views

Integrate FileMerge.app into Finder using the Automator application to create a service

I was trying to adapt the accepted answer to this question. How to integrate FileMerge.app into Finder? I'm on a mac with macOS Sonoma version 14.1.1. Unfortunately I get the following error message. ...
Eritrean's user avatar
1 vote
0 answers
35 views

osascript keystroke character case with VMware web console

Looking to get the ability to simulating typing a password into a vm console. Figured osascript and keystroke should be the answer. If I run the following I get what I believe to be the correct ...
azzid's user avatar
  • 213
0 votes
0 answers
20 views

How to add automator scripts to apple shortcuts?

I am trying to run a simple automation I recorded via Automator app, that will open my AirPlay devices and start screen mirroring to my TV (named as TV). I was able to record functional automation, ...
Marakoss's user avatar
  • 111
0 votes
0 answers
75 views

macOS Terminal Command to Disable Desktop Widgets?

Looking to find a way to use a terminal command to disable/enable desktop widgets in macOS Sonoma. The closest I have been able to find so far is a script that does this. However, I would like to do ...
XRegex's user avatar
  • 1
2 votes
1 answer
76 views

Unable to rename file in applescript

I feel my AppleScript skills are sorely lacking and hope to learn from this effort. I have code working that will process one or more files dropped on my app. The processing takes an ".mp4" ...
Grandpa Bill's user avatar
0 votes
1 answer
47 views

Script to open Safari > Preferences > Websites > Notifications

I do not believe that macOS PPPC on Ventura and higher will permit this, but: Is there a way to use AppleScript (osascript) to open Safari's Preferences window and change focus to Websites > ...
da4's user avatar
  • 5,556
0 votes
0 answers
36 views

Apple Script to refresh safari at intervals and then to run key codes at interval

I'm trying to incorporate following tasks. Refresh Safari every minute After every refresh, press the down and right arrow at specific intervals. My Attempt I rattempted the following code but it's ...
Source's user avatar
  • 1
0 votes
0 answers
18 views

Relocate menu bar item with applescript?

Suppose that I want to move a menu bar item to the right. Then I do command + drag and drop. Now, is there a way to do it with applescript? In particular, this is useful when some icons on the bar ...
Ma Joad's user avatar
  • 381
0 votes
1 answer
27 views

How to tell Applescript to call a Fondation's class's init?

A subquestion could be: how to find the AppleScript name of a class's instances? Context: I use the following to access NSTimeZone variables and apply methods. use scripting additions -- essential to ...
Recycleur's user avatar
1 vote
1 answer
58 views

Can Automator be used to visit/upload/save images from a website?

I have a folder on desktop with png images. I'd like the images to be sent to a website (Vectoriser.ai). Uploaded one image at a time (multi drop is not available) and save the result to another ...
Bow's user avatar
  • 11
0 votes
0 answers
47 views

Trigger an AppleScript each time I open a new Finder window

Because of compatibility issues with the Accessibility API with Matlab, I cannot use traditional tiling window managers such as Amethyst or yabai. This is frustrating but I found an alternative at ...
Olivier Roy's user avatar
1 vote
0 answers
45 views

How to run pkg installer asking for password in GUI rather than in shell

I tried to use osascript but no luck: > osascript -e 'do shell script "installer -pkg /Users/syabro/Downloads/Crystal_Software.pkg -target /" with administrator privileges' 0:117: ...
syabro's user avatar
  • 111
0 votes
0 answers
25 views

XTEST extension unavailable (XQuartz)

I am trying to use certain properties of X11 on mac via XQuartz. I am not trying to connect to a remote machine via ssh. Here is what I am trying to execute bash-3.2$ xdotool cmd+v Warning: XTEST ...
Maths Wizzard's user avatar
3 votes
1 answer
103 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
1 vote
1 answer
383 views

Modify "Show on all Spaces" wallpaper setting by shell on macos Sonoma

In system settings, under Wallpaper, there is a new toggle option to "Show on all Spaces". I'm looking for a way to set this option via shell in terminal since when a new wallpaper is set ...
Jared Wyce's user avatar
1 vote
1 answer
114 views

Applescript to open already running app that's minimized in the Dock?

I'm running macOS 11.7.10. I have an app which I always want to be running, and I have successfully caused it to start up whenever I log in. Often, I minimize this running app, and its Dock icon then ...
HippoMan's user avatar
  • 348
0 votes
0 answers
20 views

AppleScript to open a Finder window in every desktop

I have 2 monitors and 2 desktops (Spaces) in each of them. I want to open a Finder window for each of the desktops, so 4 in total. I mapped the Spaces in Ctrl+1, 2, 3, 4 in Settings, and I am using ...
user4168715's user avatar
1 vote
0 answers
21 views

How to create a keyboard macro for cycling through applications, on Kinetic Advantage360 keyboard [duplicate]

I own a Kinetic Advantage360 keyboard with macro recording capabilities. This allows me to create sequences of key presses bound to the keyboard's special macro keys. My goal is to create a keyboard ...
Kusalananda's user avatar
4 votes
1 answer
294 views

AppleScript: Wrap selected text to a specific width

How to wrap a text selection to a certain column width using AppleScript? For e.g., let's say the following text is selected: AppleScript is a scripting language created by Apple Inc. that facilitates ...
bfxfer's user avatar
  • 81
0 votes
0 answers
34 views

Automation that will automatically update app icon after its updated

I have a lot of apps where the icons are just unpleasant and I've made much better ones that I have applied. while some apps rarely update a good amount of them do which of course mean the original ...
LOVEFIRE's user avatar
0 votes
0 answers
33 views

State of caps lock in Applescript

Is there a query to return the state of the caps lock key in Applescript? Ideally a binary value. I want a manual branch in Applescript without using a dialog.
drost's user avatar
  • 1
1 vote
0 answers
24 views

How do you disable "suggest completions while typing" autocomplete feature while editing Applescript in Automator?

I think in a recent update to Ventura they added an autocomplete feature to Applescript editing. In Script Editor, there's a setting to enable or disable "suggest completions while typing". ...
j33205's user avatar
  • 25
0 votes
0 answers
33 views

dsconfigad - Responding to terminal question

I am "very" new to making scripts, so please be patient with me. I am using Meraki console on where I work and im trying to create a script for the apple devices to join out active directory ...
Mark Boughton's user avatar
1 vote
0 answers
20 views

Script to edit "allow air play for"

Wanting to see if anyone can help me build or find a script that can edit "Allow air play for" within Airdrop & Handoff within system settings. It’s be default set to "current user&...
g003441's user avatar
  • 11
0 votes
0 answers
43 views

Using AppleScript to add images to Pages document

I am trying to automate the task of inserting an image to a pages document, then change it's arrangement properties to something that normal people use (like "move with text" and "...
j33205's user avatar
  • 25
0 votes
1 answer
29 views

Applescript: Mail - Is there a way to save user settings and re-apply them

Im am using te applescript to send mails from my Mac from a shell script. The script runs fine with one exception: The 'standard' user setting "always Bcc myself" is not set again when the ...
Rob's user avatar
  • 11
1 vote
0 answers
51 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
0 votes
0 answers
40 views

AppleScript click at times out

I am unable to use any AppleScript click at functionality: tell application "Finder" activate end tell tell application "System Events" tell ...
Jeshua Lacock's user avatar
1 vote
0 answers
30 views

Saving list of Safari tabs and their windows in corresponding order as .txt file. Solution found but need to edit it to work as desired

How can I amend the AppleScript from https://apple.stackexchange.com/a/389110 to save each windows tabs into a text file sperated by a space and repeat for each remaining windows? Same applies for ...
vee2gee's user avatar
  • 11
0 votes
0 answers
57 views

Display a Tooltip at Mouse Cursor (via Applescript or Shell Script)?

I tried googling for info about this for a while, but came up empty handed. Is there any way, either with shell or Apple script, or maybe even via python, to display a tooltip relative to the mouse ...
Max Well's user avatar
  • 259
1 vote
1 answer
55 views

Change signature of open e-mail with Apple Script

I have the following Apple Script: tell application "Mail" make new outgoing message with properties {message signature:(signature named "MyTestSignature")} activate end ...
David's user avatar
  • 220
1 vote
0 answers
31 views

M1 Macbook pro: "Add" button missing in automation > Security & Privacy Settings > System preferences

I've been wanting to add "Script Editor" to automation but there seems to be no button to add it. Is there any possible way of achieving this??
Kimchisundae's user avatar
1 vote
0 answers
41 views

Reveal app window from command line?

I'm trying to bring back up a minimized mpv window using a keyboard shortcut. I use skhd to map keyboard shortcuts to various open commands, so I can quickly launch frequently used apps. This has the ...
Harv's user avatar
  • 6,500
0 votes
0 answers
30 views

Why am I getting two different formats from Automator Workflow Get Variable Value

I have an Automator Workflow that runs an AppleScript where the operator chooses one of three option from a list {"Move Staff", "Move Retouch", "Move Grade"} A Set Value ...
JBS's user avatar
  • 45
0 votes
0 answers
99 views

How to give an edited "AppleScript app" necessary permissions in Ventura?

Since updating to macOS Ventura, I’m having a lot of permissions trouble with AppleScripts saved as apps that worked in Monterey (and previous versions of macOS) and seem to work only on the initial ...
hepcat72's user avatar
  • 1,257
0 votes
0 answers
9 views

Running AppleScript to control the app Spectacle (Shift+Opt+right arrow) [duplicate]

I am trying to set up a shortcut to open two apps, then position them on-screen. There doesn't appear to be a way to run a Hotkey command within shortcuts. So I have opted to try my hand at ...
Montae Montana's user avatar
0 votes
0 answers
53 views

AppleScript to delete emails to specific recipient in macOS Mail

I am currently facing a challenge involving the Mail app on macOS (latest version). I am looking for assistance in writing an AppleScript (or other viable method) to delete all emails sent to "...
Paul Vincent's user avatar
0 votes
1 answer
106 views

Accessing iCloud Drive files via AppleScript

I am trying to get AppleScript to open a file located at iCloud Drive:Documents:Manuals:BBEdit_13.0.1_User_Manual.pdf. tell application "Finder" open file "/Users/cb/Library/Mobile ...
bayswaterbill's user avatar
0 votes
0 answers
29 views

Power source-based resolutions using AppleScript and Controlplane? [duplicate]

I've been searching for a good applescript to automatically change my resolution based on my power source and/or shortcuts. For context I'm using macOS Ventura 13.4 and I'm new to scripting, I want to ...
Atharv Tandale's user avatar
0 votes
1 answer
65 views

Auto grab a window screenshot on each mouse click Mac

Is it possible to Applescript an autotake of a screenshot in an app on every mouse click without need to press Cmd+Shift+4->Click every time?
Davids Gaisevskis's user avatar
0 votes
1 answer
31 views

How can I convert a path of UI elements to string/text?

I am using the following to get the UI element path for the mouse pointer location. use framework "Foundation" property NSEvent : a reference to current application's NSEvent property ...
Max Well's user avatar
  • 259
0 votes
0 answers
23 views

AppleScript mouse commands in a background user

We use AppleScript (Javascript to be precise) to automate certain UI tests. The script uses the mouse (using MouseTools) and the keyboard (using system.keystroke and system.keyCode). This has been ...
Jonas Sourlier's user avatar
0 votes
2 answers
63 views

Reveal Symbolic Link in Finder, NOT the file it resolves to?

I wrote the following script to select copied/pasted Finder items in the target folder I pasted them into. tell application "Finder" set thePath to POSIX path of (insertion location as ...
Max Well's user avatar
  • 259
0 votes
1 answer
109 views

Strange "Operation not permitted" when automating Keynote via AppleScript

I am on Ventura 13.5. I wrote a little AppleScript to convert directory tree containing Keynote .key files into Powerpoint. I am facing strange error: When I run my script (either from terminal via ...
Michal's user avatar
  • 291
0 votes
0 answers
76 views

How do I cycle through Chrome windows of a specific profile using AppleScript?

I'm using the following function in Hammerspoon to find tabs in Chrome for arbitrary URLs. If the URLs can't be found, then a new tab is opened. Mostly I use this to tabs I care about with a keyboard ...
oalders's user avatar
  • 103
1 vote
2 answers
104 views

How can I identify and sort groups of text lines separated by a blank line?

I am sorting a large number of archived picture files where some are duplicated, and I want to remove the duplicates. I use the following shell script to get a list of dupes. fdupes -r -A /Users/...
Yves's user avatar
  • 185
0 votes
1 answer
235 views

How to use Applescript to set output sound volume

I want to tweak the Applescript I use to select the sound output, to also dial the output volume up to 100%. (* Applescript to toggle between two sound outputs by Line number, ¬ as they appear in the ...
Chap's user avatar
  • 1,184

1
2 3 4 5
69