It does in certain situations, refer to my previous post for more info:
Indeed, going to the “songs” tab and playing something from there makes everything work. Here are my assumptions (which I verified btw):
Playing any song directly will make it work with current track UNLESS this song is NOT in your Music library (either added through Apple Music or uploaded).
If you play a song not in your library, current track is not updated even if you clicked on it specifically.
Playing an album (in your library obviously) makes all the tracks within it appear in current track until autoplay takes over.
Any autoplayed track won’t appear in current track even if in your library (unless: see the last bulletpoint)
Music played through the “songs” tab all appear in current track even if autoplay kicks in. I assume this is because this tab is an iTunes legacy (visually and under the hood) and doesn’t use the modern autoplay. This tab also won’t play non-library songs unlike the “albums” tab which seems to use the correct autoplay and suffers the same symptoms as the “recently added”, “home”, “radio”, etc… tabs.
I tested, and I could find a way to refer to a song being played via Apple Music or streaming from a “radio”, using AppleScript.
Since I have not scripted iTunes or Music for a while, I am not sure if it was always like this.
I feel like this was a typo by DPet and probably should have read “and I couldn’t find a way”.
While there’s no available reference to the current track when playing from “Radio” the duration and length do get updated. cool, so maybe a Database lookup of song durations. [rolls eyes so hard he falls over].
I was curious if an AppleScript could be run by way of Spotlight Search in Tahoe, and, in limited testing, this worked if the AppleScript was saved as an app. The AppleScripts I tested did the following:
quit all apps and close all Finder windows;
backup my home folder using rsync; and
display a dialog.
I did not have to set permissions for the above AppleScript apps (other than the dialogs when the app was first run), and they did not appear in the Privacy & Security Accessibility settings. I’m running public beta 6.
I wasn’t able to run an AppleScript that displayed a notification. The AppleScript app did appear in the Notifications pane of System Settings, but enabling the settings didn’t help. For now I’ll use a swiftDialog notification.
For some time I’ve used Shane’s Dialog Toolkit Plus and Myriad Tables Lib script libraries with numerous AppleScripts. With macOS Sequoia, some of these worked but others did not. After installing macOS Tahoe, those that did work continued to work, which is obviously good news. When time permits, I’ll retest those that did not work to see if they might work with Tahoe, which is probably unlikely but worth the time.
Upgraded to macOS Tahoe, and sad to say, Script Editor still crashes when a tab is closed. Doesn’t always crash, but a very high chance so it is very disruptive if you work with a lot of script in tabs on a daily basis.
Notifications work for me, though I had to set them to “Persistent” to have them actually appear in the corner rather than only in notification center (no focus mode enabled).
I haven’t run into this in a while. I always use command+W to close tabs, so maybe something is different there?
I retested with the release version of macOS 26.0 and found the same thing. The notification displays in the corner of the screen if set to persistent but not otherwise.
It’s a kludge but the following will display the notification in the corner of the screen without setting the notification to persistent. This worked if the AppleScript is saved as an app and run by double-clicking on the app or by way of Spotlight Search.
do shell script "osascript -e 'display notification \"Hello World\"'"
Hi all,
I was testing this old AppleScript on MacOS 26.0 Tahoe and it seems the whose keyword doesn’t work correctly, also, it seems some UI element attributes couldn’t be accessed anymore.
-- This script click on the Fast User Switching menu item on Control Center menu bar to open the drop down list, then find the correct user item to click to. It was working fine in MacOS 15 Sequoia btw.
on main(intendedUserName)
tell application "System Events"
try
tell its application process "ControlCenter"
-- Click on the Fast User Switching button on menu bar
if not exists (first menu bar item of menu bar 1 ¬
whose value of attribute "AXIdentifier" is "com.apple.menuextra.user") then return "NO_SWITCHING_BUTTON"
click (first menu bar item of menu bar 1 ¬
whose value of attribute "AXIdentifier" is "com.apple.menuextra.user")
-- Find the correct user item and click it
delay 2
set userButtons to (every button of scroll area 1 of group 1 of window 1 whose value of attribute "AXAttributedDescription" contains intendedUserName)
repeat with userButton in userButtons
click item 1 of userButton
delay 1
return "SWITCHED_USER"
end repeat
end tell
on error errorMessage
return "FAILED_EXECUTING|" & errorMessage
end try
return "FAILED_SWITCHING|NotFoundUser"
end tell
end main
I’ve tried to manually find the UI elements by looping instead of using whose, which does work for “AXIdentifier” attribute. But as soon as we access the “AXAttributedDescription”, the script will fail with errAEEventFailed: -10000.
-- Updated script. Still failing on MacOS 26 Tahoe.
on main(intendedUserName)
tell application "System Events"
try
tell its application process "ControlCenter"
set fusBtn to null
set menuItems to menu bar items of menu bar 1
repeat with menuItem in menuItems as list
try
set attr to value of attribute "AXIdentifier" of menuItem
if attr is "com.apple.menuextra.user" then
set fusBtn to menuItem
end if
end try
end repeat
if fusBtn is null then return "NO_SWITCHING_BUTTON"
click fusBtn
delay 2
UI elements of group 1 of window 1
if not (exists group 1 of window 1) then
return "NO_SWITCH_USER_DROPDOWN"
else
set agentItems to checkboxes of group 1 of window 1
repeat with agentItem in agentItems as list
try
-- Failing here, but if we `log attributes of agentItem`, then we see the UI element does have the AXAttributedDescription attr.
set agentName to value of attribute "AXAttributedDescription" of agentItem
if agentName is intendedUserName then
click agentItem
delay 1
return "SWITCHED_USER"
end if
end try
end repeat
end if
end tell
on error errorMessage
return "FAILED_EXECUTING|" & errorMessage
end try
return "FAILED_SWITCHING|NotFoundUser"
end tell
end mainHandler
The user name can only be found in the “AXAttributedDescription” attribute. Title, name, value, AXHelp, AXDescription… doesn’t have the value. Accessing the other attributes (AXTitle, AXHelp…) in MacOS 26 seems easy to fail also.
Can anyone confirm having the same issue on MacOS 26 or help giving me a guidance on what I can try next here?
Thanks
If I remember correctly, Finder did not return hidden folders and files unless it was set to to do so, which isn’t the case on my computer. However, I checked and the contents of the ~/Library folder is returned by Finder in an AppleScript on macOS Tahoe. I don’t think this was the case before Tahoe, but I could easily be wrong about that. BTW, using Finder to recursively get all folders or files from a user’s home folder is probably a bad idea, but that’s a separate issue.
I do suffer from the same issue, even wrote an issue report using feedback assisstant and forum but no words from Apple yet. I check if it is fixed with every OS update but till now nothing is changed.
I don’t think this is directly related to macOS 26,
but I came across something that made me wonder if it’s always been like this (in other words, if it’s by design).
If this is the intended behavior, it feels a bit odd to me.
Looking at this article (see the URL below),
it seems that back in 2006, this byte swap didn’t occur according to the posts at the time.
So I’m wondering — when did this behavior change?
#!/usr/bin/env osascript
use AppleScript version "2.8"
use scripting additions
######-->text
# $ U+FF04 FULLWIDTH DOLLAR SIGN
log «data utxtFF04» as Unicode text
-->$
# ① U+2460 CIRCLED DIGIT ONE
log «data utxt2460» as Unicode text
-->①
# U+F8FF PRIVATE USE AREA-F8FF
log «data utxtF8FF» as Unicode text
-->
######-->DO run script
set strReturn to run script "«data utxtFF04»"
-->ӿ
# ӿ U+04FF CYRILLIC SMALL LETTER HA WITH STROKE
log (run script "«data utxt2460»")
-->怤
# 怤 U+6024 CJK UNIFIED IDEOGRAPH-6024
log (run script "«data utxtF8FF»")
-->
# U+FFF8
(*
bites swap
$
utxtFF04 = U+FF04
FF←→04
U+04FF
*)
log (run script "«data utxt04FF»")
-->$
log (run script "«data utxt6024»")
-->①
log (run script "«data utxtFFF8»")
-->
I’m not completely sure if this depends on my environment or on the script itself, but on macOS 26.1 with Script Editor version 2.11 (233), it feels like something has changed.
When I run scripts that normally produce a huge amount of log output — for example, a loop that calls do shell script a thousand times — the memory usage during execution now seems noticeably lower.
Compared to macOS 15, the memory consumption feels much lighter.
Again, this is just my impression, but it really looks improved.