0

AppleScript: Set bounds of window 1 to …

Tim “Kudusch” Schatto-Eckrodt 10 years ago updated 10 years ago 2
It would be awesome if you could resize Textastic windows with the standard AppleScript function get bounds and set bounds.
Textastic is not scriptable at the moment.

But, if you add the AppleScript Editor to System Preferences -> Security & Privacy -> Privacy -> Accessibility, you can use the following commands:

get:

tell application "System Events" to tell application process "Textastic"
get size of window 1
end tell

set:

tell application "System Events" to tell application process "Textastic"
tell window 1
set {size, position} to {{1280, 800}, {50, 50}}
end tell
end tell

Alright! Thank you very much for that tip!