AppleScript Keystroke does not work correctly after migrating to M2
Hi,
I've got a new MacBook Air M2 two weeks ago and have migrated my MacBook Pro 2019 to the new MacBook Air M2. Both MacBooks are on Venture 13.1.
I'm using a small AppleScript as Service with a shortcut SHIFT-CMD-D to insert the current date and time in Notes.
on run {input, parameters}
set dateString to do shell script "date +'%Y-%m-%d %k:%M'"
tell application "System Events"
keystroke dateString
end tell
return input
end run
That has inserted this line in the past and is still working on the MacBook Pro:
2023-01-11 8:00
On the MacBook Air M2 it add a dot behind the day and if you press SHIFT-CMD-D more then once it starts to reformat the entire text instead of adding another date / time string.
2023-01-11. 8:00
The reformat also happens sometimes if you press SHIFT-CMD-D the first time in a note.
As said, exactly the same AppleScript still works with no problem one the MacBook Pro in the same note in Notes.
I hope that someone has an idea how to fix it, as I'm suing this each day when making notes in meetings.
Regards, Carsten
MacBook Air, macOS 13.1