Force LC to start on second monitor

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
MadDogDean
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 36
Joined: Thu Jan 03, 2013 6:33 pm
Location: Floating in the binary mist

Force LC to start on second monitor

Post by MadDogDean » Mon Feb 03, 2020 5:21 am

Hello all, it is nice to see the grey backdrop behind the workspace in LC9.5.x (this is how us Windows users have been trained to see programs :P )

Wondering though, if it is possible to force LC to start on a specific monitor? I have a dual monitor system, my laptop and a nice big screen beside it. As my age progresses, the little icons on LC become harder to see on the lappie screen. I would like LC to start on my second monitor.

Is there a way to do this?
Cheers,
MadDogDean

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7152
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Force LC to start on second monitor

Post by dunbarx » Mon Feb 03, 2020 3:04 pm

There certainly might be a way, based on "finder" settings.

But LC can do this itself. Use the "startup" message, sent when the application opens, to set the locs of the Script Editor, revmenubar, etc.

Craig

MadDogDean
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 36
Joined: Thu Jan 03, 2013 6:33 pm
Location: Floating in the binary mist

Re: Force LC to start on second monitor

Post by MadDogDean » Mon Feb 03, 2020 4:45 pm

Thanks Craig, I get what you are saying (I remember looking into these IDE stacks once...) but it's a little above my paygrade at present!

I was hoping for a simple "drag the window over here" type of thing. As for tweaking the startup message, I could always poll the size of the display and give one set of coordinates if the display is greater than my laptop only, and a second set if the display is exactly my laptop (in case my second monitor wasn't attached)

Something to ponder anyhow, thanks.
Cheers,
MadDogDean

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7152
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Force LC to start on second monitor

Post by dunbarx » Mon Feb 03, 2020 5:35 pm

HI.

It sort of is a "drag the window..." thing.

Try this. Set up all your windows the way you want in the large monitor, the mainStack, the SE, the toolbar, the revMenubar, etc. and ask for and remember the topLeft of each. In the stack script of your mainStack (pseudo):

Code: Select all

on openStack
set the topLeft of this stack to yourMainStackTopLeft --could be "the defaultStack"
set the topLeft of stack "revNewScriptEditor 1" to yourSETopLeft
set the topLeft of stack "revMenubar" to yourMenuBarTopLeft
set the topLeft of stack "revTools" to yourRevToolsTopLeft
Craig

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Force LC to start on second monitor

Post by [-hh] » Wed Feb 05, 2020 6:32 pm

There is also a function the screenrects that may be useful here, additionally to Craig's answer.
See the documentation for this plural form in the entry for the singular form "screenrect".
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7152
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Force LC to start on second monitor

Post by dunbarx » Wed Feb 05, 2020 7:51 pm

I have the luxury of a 32" monitor mounted on its side, giving me a long, long vertical screen that I use exclusively for the debugger, fully occupying the whole screen.

I know.

I set the loc of stack "revNewScriptEditor 1" to the topLeft of the screenRect of that monitor, as Hermann mentioned. This has to be done now and then. For example, if I close the SE, it does not remember this special loc, same thing in a new session. I have a plug-in that does it automatically.

LC gives much information about the state if both itself and its environment. The hard part is just knowing about it all.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”