Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: window.bounds gives weird results

$
0
0

The application frame makes things worse. It doesn't flip-flop, it wanders across a small area of the screen. Look at this from the JS Console:

 

app.layoutWindows[0].bounds = app.layoutWindows[0].bounds

Result: 7,12,1155,872

app.layoutWindows[0].bounds = app.layoutWindows[0].bounds

Result: 20,2,1183,882

app.layoutWindows[0].bounds = app.layoutWindows[0].bounds

Result: 5,-8,1183,892

app.layoutWindows[0].bounds = app.layoutWindows[0].bounds

Result: -10,-18,1183,902

 

Yes, yDelta does vary according to where it starts life. I'm seeing lots of different values, but the script seems to compensate correctly in all cases, including detecting that a window is in the way and moving the front window to the alternative position.

 

I'm aware of the concept of saving settings as labels and frequently do that, but in this case there are many advantages to using an external file -- transferability from one ID release to another -- finetuning the position with a text editor.

 

I like ESTK beside my window so I can debug scripts.

 

Thanks,

 

Dave


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>