I have a finder script that does the following:
– Closes all finder windows
- Checks to see if the laptop has any monitors attached or not
– Then it creates three new finder windows at equal sizes all in column mode
I have used this script for a VERY long time and through many OS updates and had no problems. However under Ventura for some reason the windows appear at random places on the screen!
Any ideas?
Thanks
J
-- 4k 3000 x 2000
-- 5k 2500 x 1500
tell application "Image Events"
set theDisplays to count of displays
end tell
tell application "Finder"
if theDisplays > 1 then
-- external monitor connected
-- 4k 3000 x 2000
set base to 0
set wd to 2500
set to_height to 1550
set gap to 50
set he to (to_height / 3)
else
-- built in monitor
-- 1800 x 1200 g50
set base to 0
set wd to 1800
set to_height to 1200
set gap to 80
set he to (to_height / 3)
end if
try
close windows
end try
make new Finder window
set current view of Finder window 1 to column view
set properties of window 1 to {bounds:{8, base, wd, he}}
set position of Finder window 1 to {6, base}
make new Finder window
set properties of window 1 to {bounds:{8, base, wd, he}}
set position of Finder window 1 to {6, (he + gap)}
make new Finder window
set properties of window 1 to {bounds:{8, base, wd, he}}
set position of Finder window 1 to {6, (he + he + (gap * 2))}
end tell
[AppleScript] tag corrected to lower case by NG.