I'm trying to make an applescript so if window 1 of Textedit is frontmost makes a new window and expands the window. Here's a snippet of what I have so far:
Code:
tell application "System Events"
tell application "TextEdit"
if window 1 = frontmost then
tell process "Textedit"
key code {55, 45}
set bounds of window 2 to {160, 80, 980, 700}
end if
end tell
end tell
end tell
The code above is there so that if someone has a open Textedit window it will make a new window and make the window wider. +Rep to people who help