Benches macOS

2

Window Resize Animation

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hey All

I am an applescript newbie so forgive me if this is a silly question.

But I am writing a basic script (or rather trying to) that will resize a window to a particular size when run but I was wondering if there was anyway to animate the resize so it scales up or down rather than just jumping from one size to another?

Thanks

D ^_^

2 replies

Sign in or join Beachball Help to reply.

  1. 0

    Camelot

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    There are several ways of doing it, and the specifics may vary by application, but here's one approach:

    tell application "TextEdit"

    set l to 100

    set t to 100

    set r to 200

    set b to 300

    activate

    repeat until b ≥ 450

    set bounds of window 1 to {l, t, r, b}

    set b to b + 2

    set r to r + 2

    end repeat

    end tell

    The variables
    l, t, r and
    b correspond to the left, top, right, and bottom coordinates of the window. A simple repeat loop resizes the window while incrementing the bottom and right values.

  2. 0

    Community User

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for that. I will give that a go. I suspected it may be something like that.

    Thanks Again

    D ^_^