AppleScript for resizing/repositioning Preview document windows
AppleScript for resizing/repositioning Preview document windows
- Subject: AppleScript for resizing/repositioning Preview document windows
- From: Barry Fass-Holmes via AppleScript-Users <email@hidden>
- Date: Sun, 22 Oct 2023 16:33:41 -0700
Hello!
The script below functioned properly under macOS Monterey, but now under
Ventura it does not.
The open document windows do not resize at all. I’ve experimented with the last
two values in the bounds statements, but the windows remain at the same size as
when Preview launched and the documents reopened from the last session (as if
the bounds statement did not process at all).
How can I fix the script so that it functions properly under Ventura? Many
thanks in advance.
Barry
tell application "Preview"
activate
set _theWindows to every window
repeat with i from 1 to number of items in _theWindows
set this_item to item i of _theWindows
set the bounds of this_item to {0, 0, 720, 940}
end repeat
delay 1
tell application "Preview" to activate
tell application "System Events"
keystroke "g" using {option down, command down}
keystroke 14
delay 1.5
keystroke return
end tell
set the bounds of window 1 to {200, 0, 720, 940}
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden