WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: mcjathan on April 17, 2015, 02:03:46 PM

Title: Set Window Coordinates of Program About to Be Opened via RunShell?
Post by: mcjathan on April 17, 2015, 02:03:46 PM
Hi all,

I have a Winbatch script that loops over a number of *.pdf files and opens them using Winbatch's RunShell() function, and Adobe Acrobat Professional.  After opening the *.pdf file, I place the Acrobat window where I want it using Winbatch's WinPlace() function.

Is it possible to set the window coordinates I want prior to calling RunShell()?  An Int() function perhaps?

Jeff
Title: Re: Set Window Coordinates of Program About to Be Opened via RunShell?
Post by: td on April 17, 2015, 02:59:24 PM
You can't set the coordinates of a window before the window exists unless you find where the application stores its previous position and modify that before starting the application.

You can use WinPlaceSet to set the normal position of an iconized window so you could start your application with an iconized window, call WinPlaceSet, and then call WinShow to display the window.