1
我需要Apple脚本的帮助。我不擅长这件事。脚本是这样的:更改窗口的边界
(*
This Apple script will resize any program window to an exact size and the window is then moved to the center of your screen.
Specify the program name, height and width below and run the script.
Written by Amit Agarwal on December 10, 2013
*)
set theApp to "Finder"
set appHeight to 412
set appWidth to 678
tell application "Finder"
set screenResolution to bounds of window of desktop
end tell
set screenWidth to item 3 of screenResolution
set screenHeight to item 4 of screenResolution
tell application theApp
activate
reopen
set yAxis to (screenHeight - appHeight)/2 as integer
set xAxis to (screenWidth - appWidth)/2 as integer
set the bounds of the first window to {xAxis, yAxis, appWidth + xAxis, appHeight + yAxis}
tell application "Finder" to set the sidebar width of every Finder window to 142
end tell
我想调整Finder的大小,但没有将它置于屏幕中央。可能吗?
感谢您的回复,但我这样sloved:<设置该app为“发现者” 集appHeight到412 集appWidth至678 告诉应用该app \t激活 \t重新 \t告诉应用程序“发现者”到设置的每个搜索窗口142 的侧边栏宽度端告诉 告诉应用程序“系统事件” \t告诉处理该app \t窗1的\t集大小为{appWidth,appHeight} \t end tell end tell>最后,我只需在System Preferences面板中添加Apple Script Editor.app:安全和隐私➡隐私➡辅助功能。 ︎ – user5520752
这很好,如果它适合你。这在您切换应用程序时不起作用。如果应用程序可编写脚本,最好避免使用UI脚本。 – jweaks