Rename window title in OS X with AppleScript or terminal

允我心安 提交于 2021-01-27 18:19:34

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!