Is there an easy way to have a dialog window auto aligned to the right side of the screen regardless of screen resolution (preferably the upper right corner)? It seems that there should be something built in to do this but I can't seem to figure it out.
Thanks
Auto place dialog window on the right side
Re: Auto place dialog window on the right side
As you please... (tested in CS2 & CS5.1) and here's excellent respasitory: http://www.kahrel.plus.com/indesign/scriptui.html
Code: Select all
dlg = false, wi = null, he = null;
(function loop() {
win = new Window (dlg ? 'dialog' : 'palette');
(wi && he) ? win.frameLocation = [String($.screens).match(/\d{4}/) - wi, 0] : win.center();
win.add ('statictext {text: "This is your dialog window in right upper corner."}')
grp = win.add('group'); grp.add("button", [0,0,28,19], "OK", {name: 'close'})
if (!dlg) win.show(), win.close(), wi = win.size[0], he = win.size[1], dlg = true, loop()
else win.show()
})()
- Attachments
-
- Dialogue Box Position.zip
- (609 Bytes) Downloaded 312 times