"2. Is there a way to position the window of the running program so it always opens to the same spot on the desktop?"
_ScreenMove leftX, topY ' after screen statement, there is also
_ScreenMove _Middle ' <<< but this takes some time so a _Delay or _Screenexists check is needed, bah too slow IMHO
"3. When the program exits, I sometimes get the message "press any key to continue" when all I want is the window to close."
Don't use End, use System
_ScreenMove leftX, topY ' after screen statement, there is also
_ScreenMove _Middle ' <<< but this takes some time so a _Delay or _Screenexists check is needed, bah too slow IMHO
"3. When the program exits, I sometimes get the message "press any key to continue" when all I want is the window to close."
Don't use End, use System
b = b + ...