Eress
03-11-2015, 15:39
Mi servirebbe modificare uno script Apple in modo da ridimensionare sidebar e finestre Finder, ma senza centrarle nello schermo. Non sono molto esperto in materia :D
Lo script in questione è questo:
(*
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
Ho modificato le dimensioni del Finder e aggiunto in fondo la riga della sidebar. Lo script funziona, ma vorrei come detto, eliminare la parte che centra le finestre del Finder nello schermo. Ho provato a modificare le righe in basso o eliminarle del tutto, ma così si ridimensiona solo la sidebar, mentre sulle finestre non funziona più. Qualcuno esperto di script saprebbe come fare?
Lo script in questione è questo:
(*
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
Ho modificato le dimensioni del Finder e aggiunto in fondo la riga della sidebar. Lo script funziona, ma vorrei come detto, eliminare la parte che centra le finestre del Finder nello schermo. Ho provato a modificare le righe in basso o eliminarle del tutto, ma così si ridimensiona solo la sidebar, mentre sulle finestre non funziona più. Qualcuno esperto di script saprebbe come fare?