• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScript for resizing/repositioning Preview document windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: AppleScript for resizing/repositioning Preview document windows
      • From: Laine via AppleScript-Users <email@hidden>
  • Prev by Date: Re: Ann: New eBook AppleScript Latest Reference for v2.8
  • Next by Date: Re: AppleScript for resizing/repositioning Preview document windows
  • Previous by thread: Re: AppleScript-Users Digest, Vol 20, Issue 43
  • Next by thread: Re: AppleScript for resizing/repositioning Preview document windows
  • Index(es):
    • Date
    • Thread