Questions tagged [applescript]
AppleScript is a proprietary programming language in macOS to control and exchange data with applications.
3,442
questions
1
vote
0
answers
18
views
Automating Outlook Tasks under Sonoma using AppleScript
I am trying to automate some tasks in macOS Sonoma and Microsoft Outlook 16.78.3 using AppleScript.
This is my simple test script to check if I can access outlook items at all:
tell application "...
1
vote
0
answers
8
views
AppleScript Not Selecting Button in System Settings
I'm trying to write an AppleScript that selects "Shuffle All" and toggles "Show on all Spaces" in the Wallpaper preference pane in System Settings (see screenshot). However, the ...
0
votes
0
answers
17
views
Script to mirror display to iPad
My screen broke on my MacBook, and my current way to use it has been to connect a HDMI, and then mirror the display to my iPad. Any way to automate this maybe with Automator?
The screen is completely ...
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 ...
1
vote
1
answer
41
views
How to osacompile a script containing `tell Application` and NSAppleScriptEnabled without activating it
How do I compile the following script without actually activating the application during the compilation?
tell application "/Applications/VLC.app" to activate
If I do e.g. this, it will not ...
2
votes
3
answers
65
views
Change app's icon by script
On Sonoma 14.5. I have some apps that I want to a set custom icon for. This is easy enough to do in Finder -- right click on the app, choose get info, and drag and drop the icon I want into the icon ...
4
votes
1
answer
142
views
How can I get the Console to display "can’t" instead of "canÕt"?
It's only a small thing I guess, but I'm annoyed to see errors reported in the console for my AppleScripts where the text of the error message contains substitute characters. e.g.
Error Number: -43 ...
1
vote
2
answers
53
views
How to create a new iTerm2 with a keystroke and bring just this window to front
I've searched for quite a while now, I talked to numerous artificial intelligences, real intelligences and I tried many things including apple script and iTerms python API. But it seems impossible to ...
1
vote
1
answer
40
views
MacOS Music script does not work triggered inside app
For years, I've been using a really simple AppleScript to reset Music's AirPlay device back to my computer. I trigger it using a keyboard shortcut Command + E and the script doesn’t run. Same if I use ...
1
vote
0
answers
30
views
Applescript application disappears from login items after running once
I have an AppleScript application (i.e. an AppleScript exported as an application) in my "Login Items" list which disappears from the list after running once.
The script itself is simple:
...
1
vote
1
answer
46
views
How can I program my Mac to know when my iPhone is home?
Situation: I wrote an alarm clock app that runs on a MacMini. (No, I have never found any commercial app that works like I want it to.) But sometimes I spend the night away from home, and I don’t ...
0
votes
1
answer
36
views
Is it possible to automate Music.app to play a random album by one specific artist?
I have lots of 'albums' in my library in Apple Music which are by a certain artist. I find these good to work to. They are all relatively similar (dance music mixes.)
I would like to make an ...
0
votes
0
answers
26
views
How can I automate opening a new window if none exists in the current space by a dock click?
I've been customizing my Mac to enhance my productivity and there’s one last hiccup: the Dock's behavior with spaces and opening new windows.
Context
I use separate spaces for different activities—...
0
votes
0
answers
20
views
Make it easier to toggle color filters
I need a more convenient way to toggle this option.
I'm happy for it to be a toggled at a keystroke, an option in my top menu bar, or an option in this thing:
I initially tried ChatGPT to write an ...
0
votes
2
answers
38
views
How to find the desktop which contains a Terminal window
I have a Terminal window on desktop 1 running some unit tests.
On desktop 2, I'm using Chrome on the Internet.
I want to run an applescript at the end of unit tests, in order to switch to desktop 1.
I ...