• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Progressbar opens on the wrong monitor

Community Beginner ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Hi, my MacBook has a second bigger monitor on the right where Indesign is usually open.
In my script:

- if I open a 'dialog' (alert for example), it appears correctly on the rightside monitor over the Indesign document

- if I open a 'progressbar' (see code below), it appears on the MacBook monitor on the leftside not over the Indesign document (then even dialogs start to appear on the wrong monitor)

 

Is there a way to open the progressbar over Indesign on the rightside monitor?
If you're ask yourself 'why?', it's because I need to let a Teamviewer client to launch my scripts AND see the progressbar

---

function creaPannelloProgress(valoreMassimoProgress, larghezzaBarraProgress) {
pannelloProgress = new Window('window','Linkamento dei codici');
with (pannelloProgress) {
pannelloProgress.barraProgress = add('progressbar',[24,24,larghezzaBarraProgress,50],0,valoreMassimoProgress);
}
return pannelloProgress;
}
pannelloProgress = creaPannelloProgress(100,600);
pannelloProgress.show();

 

TOPICS
Scripting

Views

119

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 10, 2022 May 10, 2022

Instead of [24,24, . . .] force the palette on to the second screen by using something like [2000, 24, . . .]. Depends on the size of your screen.  To find out your screen sizes, see https://creativepro.com/files/kahrel/indesign/scriptui.html

P.

Votes

Translate

Translate
Community Expert ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Instead of [24,24, . . .] force the palette on to the second screen by using something like [2000, 24, . . .]. Depends on the size of your screen.  To find out your screen sizes, see https://creativepro.com/files/kahrel/indesign/scriptui.html

P.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Thank you, I will try.
Thankyou also for the suggested ScriptUI manual.

🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

LATEST

It works.

 
    if ($.screens.length > 1) { //two monitors?
        left_dy_w = $.screens[0].right;
        right_dy_w = $.screens[1].right - $.screens[0].right; //$.screens[1].right is the sum of both monitors width
    } else { //only one monitor
        left_dy_w = 0;
        right_dy_w = $.screens[0].right;
    }
 
var dialogoArray = new Window("dialog"); 
dialogoArray.frameLocation = [(left_dy_w + (right_dy_w / 2) - (430 / 2)), 200]; //430 is my dialog width

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines