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