8,875 questions
1 vote
1 answer
54 views
Python AppleScript module fails: AttributeError: 'str' object has no attribute '_unpackresult'
I have been using the AppleScript module in Python for some time now, but its latest version is refusing to work on any but the most trivial code. This is the Python script: #!/opt/local/bin/python3 ...
0 votes
0 answers
79 views
Customize app icon of AppleScript applications in new Mac OS 26 to be tinted/dark/etc
I needed to launch an app with arguments, so way back i created it that way the accepted answer here suggests https://superuser.com/questions/16750/how-can-i-run-an-application-with-command-line-...
1 vote
1 answer
45 views
Cannot set track details in macOS Music with AppleScript
I record music at home and regularly need to add tracks created with GarageBand to Music. This requires me to manually set the artist, album, genre, year, & artwork so I'm trying to write an ...
0 votes
0 answers
74 views
"Paste" menu item is disabled when run app via applescript with administrator privileges
When running the application through apple scripts with administrator rights, the menu item "Paste" is disabled on any input fields. For example do shell script "/Applications/Safari....
1 vote
0 answers
231 views
AppleScript Issue with current track in Apple Music
I have upgraded to macOS 26 and got this strange error with AppleScript: current track doesn't work any more for streaming content, it works only for downloaded songs in user's library. tell ...
0 votes
2 answers
119 views
Import a folder in Photos while making albums with subfolders
Thanks to codez on GitHub who provided an Apple script to import a folder in Photos making proper Albums of all subfolders. Nevertheless it’s not maintained anymore and the script have few bugs I can’...
1 vote
1 answer
100 views
Improve Speed of AppleScript that Opens Multiple Folders in Multiple Tabs in new Finder Window?
I have a series of subfolders with a parent folder called "Inventory" within a internal hard drive. Each subfolder name consists of a number, a hyphen and some text, such as: "329 - ...
0 votes
0 answers
41 views
Equality between objects in Applescript and JXA (trying to find the current slide in Keynote)
I am trying to find what is the selected slide in the active Keynote presentation via scripting. Just using the slide number does not work, because it's -1 on ANY hidden slide. Things work ok in ...
1 vote
2 answers
172 views
Find bluetooth connected devices battery level through Apple Script
I'm making a swift app that shows the battery level of all connected bluetooth devices. I've got three devices connected: Mysz(name surname), Magic Keyboard (name), i12; where Mysz is just Magic Mouse....
0 votes
1 answer
58 views
Applescript error: Can’t get file (test.csv)
I have the following AppleScript that checks whether the file test.csv exists on the desktop. When I run the code, the following message appears: Script Error: Can’t get file ‘Macintosh HD:Users:adam:...
0 votes
0 answers
55 views
How can I open a Mail Attachment on macOS 15.5 Sequoia?
I am looking for a script to open the (pdf) attachment of a (new) eMail using Mail 16.0. I tried this AppleScript and hoped it would open the attachment, but nothing happens: tell application "...
0 votes
0 answers
23 views
Inaccurate row column counts returned to AppleScript by Numbers spreadsheets when Category grouping is used
I have a Numbers spreadsheet that I group according to the data of a couple of columns. For example I group according to the year included in a Date Purchased column well as an Account column. When ...
-1 votes
1 answer
73 views
How can AppleScript send a keystroke to a window deep within a group hierarchy?
I've written a number of AppleScript programs over the years to send keystrokes to various applications. It is usually as simple as: tell application "TextEdit" to activate delay 0.5 tell ...
0 votes
1 answer
105 views
Process a .gcode/txt file to extract data into a .csv file with Applescript
Here's what I'd like to do: Process a .gcode file to extract certain data and then create a .csv file containing all this data. For your information, this .gcode file is used on a 3D printer or laser/...
0 votes
2 answers
65 views
Copy and rename a file with AppleScript without changing its extension
This applescript allows me to extract the text I'm interested in from a .gcode file but actually creates a copy of the file before modifying the original file. I would like to save the file without ...