> How do I also set the size and position of the window?
There are two possibilities.
1. If you don't mind using a 3rd-party control, then
2. There is also a "pure" script method, which can cause
a great deal for angst, but may get the job done.
If the app has a "system menu" (commonly if an app has a
logo icon in the its window's upper left corner, then it
supports a system menu). First appactivate the window
you wish to move/size. Then using sendkeys, sent an
alt-space combination to bring up the system menu.
Then for move send alt-m, for size send alt-s. If using
sendkeys, this may be alt-space-m, or alt-space-s.
For either move or size the frame of the window will show
a wide gray border.
For move, send a down or up arrow to more the window down
or up, and send a left or right arrow to move the window
left or right. Send a cr to stop this.
For size, you should see a "four Arrow icon" (a.k.a. a
N-E-S-W icon) in the center of your (active) window. Then
if you send an up arrow, you will see a N-S arrow appear
on the top border, sending a down arrow will give you a N-S
arrow on your bottom border. Then you can move the top or
bottom of the window with up or down arrows. Send a cr to
stop this. Likewise, starting with the NESW cursor, you can
send a left arrow to move the left border and a right arrow
to move the right border.
This is more easily done from the keyboard, but you may also
(after using plenty of enabling profanity) be able to eventually
achieve this from script.
You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)