问题
I'm trying to change a window title with AppleScript but I've no success.
tell application "Finder" to set name of window "oldWinName" to "newWinName"
Also tried call method "setTitle:" of (window "oldWinName") with parameter {"newWinName"}
Any ideas out there?
Regards
回答1:
window of which application?
eg, for terminal.app
tell application "Terminal"
set custom title of window 1 to "hello world"
end tell
or, for textedit.app
tell application "TextEdit"
set name of window 1 to "hello world"
end tell
most applications would have a similar approach :)
来源:https://stackoverflow.com/questions/37631769/rename-window-title-in-os-x-with-applescript-or-terminal