Positions of windows in "Open in two windows" scripts

Dear all

DTPO has a very useful script (at least for my works) which creates two document windows for an identical document. However:
(1) I find that the positions of the windows (same situation for documents that were opened or not-opened in DTPO before) is a bit strange (see the image). I looked into the script and it seems there are some calculations of the new windows’ size based on the user’s screen resolution. May I know what parameters in the script should I adjust in order to fit the two windows in a screen.
(2) If a document window is already opened, running the script will still open another two windows of the same document. May I know if some parameters/lines of codes can be changed in order to detect whether one new additional window (if a doc window is already opened) or two new windows (if doc is in the group) should be created?

I am using an external monitor (attached to an iMac) with resolution of 3840x2160 as my main monitor.

Thank you very much


Reading into the script, the positions of the two windows are coded relative to the main DTPO window. I have resolved the issue by hard-coding the desirable windows positions into the scripts (quick and dirty but good enough for my purpose). This is a really useful script and thanks for all those advance users who contribute many hours of coding to help other forum members.


Hardcoding is fine when you’re in a closed loop, so not a bad personal solution.

Thanks :smiley:


i found the DT blog entry about this script accidentally this morning, and don’t know how to reply to the blog, so I do it here:

This script is extremely helpful for me! I have to read a lot of student essays and research papers in pdf form, and this script helps me to keep the references list open at all times while reading the document.

Many thanks!


You’re very welcome. When I wrote it, it was for a simple reason. But as I coded, I thought of more ways it could be useful. Yours is another great example of what it can be used for. Thanks for the kind words and sharing your experience. :smiley: