Thank you, Paul. Using "screenrects" as Paul suggested, here, for future reference, is a script snippet that places a stack on the right monitor:
put the screenrects into tScrRects if the environment is "development" and the number of lines in tScrRects > 1 then -- CENTRE THE STACK ON THE RIGHT MONITOR put line 2 of tScrRects into tRMon -- right monitor rect put ((item 3 of tRMon - item 1 of tRMon) / 2 + item 1 of tRMon) & comma & \ ((item 4 of tRMon - item 2 of tRMon) / 2) into tRect set the loc of this stack to tRect else -- CENTRE THE STACK ON TE LEFT MONITOR set the loc of this stack to the screenloc end if -- Nicolas Cueto On Wed, 26 Sep 2018 at 10:03, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > "the screenrects" will return the rectangles of all active monitors with > the default monitor as the 1st line. > > Unfortunately, "the screenLoc" only returns the center of the default > monitor. You would need to get the rect of any other monitor and > calculate the center for centering a dialog on other monitors. > > > > On 9/25/2018 8:52 PM, Nicolas Cueto via use-livecode wrote: > > During "development" on Windows with 2 monitors, how to use "set the loc > of > > this stack to the screenloc" so that a stack centres in on one or the > other > > monitor? (And, if not in the development environment? say, a standalone?) > > > > Thanks. > > > > -- > > Nicolas Cueto > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode