Having fun with multiple monitors
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Having fun with multiple monitors
I thought I would be clever (normally a bad idea in my case), so set up a preferences page
in my Devawriter Pro:
- -
This pops a value into a custom property of the main stack
called "POZZZ": "LL", "MM" or "RR" (which should be self-explanatory).
Should all be dead simple . . .
HOWEVER, I have 3 monitors attached to my Mac Mini:
- -
BUT when I click on the right-hand picture the stack ends up on the right hand side of my left-most monitor,
when I click on the left hand side picture the stack ends up on the left hand side of the central monitor.
in my Devawriter Pro:
- -
This pops a value into a custom property of the main stack
called "POZZZ": "LL", "MM" or "RR" (which should be self-explanatory).
Should all be dead simple . . .
HOWEVER, I have 3 monitors attached to my Mac Mini:
- -
BUT when I click on the right-hand picture the stack ends up on the right hand side of my left-most monitor,
when I click on the left hand side picture the stack ends up on the left hand side of the central monitor.
Re: Having fun with multiple monitors
What did you script for this so far? That info COULD be helpful.
Do you use -> line 1 of the screenrects as the reference for positioning the stack?
Do you use -> line 1 of the screenrects as the reference for positioning the stack?
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
A line that is worth such a lot . . .line 1 of the screenrects
I'm doing this:
Code: Select all
switch the POZZZ of stack "DWPro"
put ((item one of the screenLoc) * 2) into WIDD
case "LL"
set the left of stack "DWPro" to 10
break
case "RR"
set the right of stack "DWPro" to (WIDD - 10)
break
case "MM"
set the loc of stack "DWPro" to the screenLoc
break
end switch
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
This:
if POZZZ is "RR" still pushes the stack over onto the right hand side of the left hand monitor.
Code: Select all
switch the POZZZ of stack "DWPro"
put (item 3 of line 1 of the screenrects) into WIDD
put (item 4 of line 1 of the screenrects) into HITE
case "LL"
set the left of stack "DWPro" to 10
set the top of stack "DWPro" to 100
break
case "RR"
set the loc of stack "DWPro" to (WIDD - 510),(HITE/2)
set the top of stack "DWPro" to 100
break
case "MM"
set the loc of stack "DWPro" to the screenLoc
set the top of stack "DWPro" to 100
break
end switch
Re: Having fun with multiple monitors
What about this one:
Code: Select all
...
lock screen
## Not sure if it is a good idea to put this inside of the SWITCH structure.
put (item 3 of line 1 of the screenrects) into WIDD
put (item 4 of line 1 of the screenrects) into HITE
switch the POZZZ of stack "DWPro"
case "LL"
set the left of stack "DWPro" to 10
break
case "RR"
## !!! Just like LL
set the right of stack "DWPro" to WIDD
## !!! 8-)
break
case "MM"
set the loc of stack "DWPro" to the screenLoc
break
end switch
## Avoid too much typing:
set the top of stack "DWPro" to 100
unlock screen
...
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
Still throws the stack off to the left monitor with "RR"
Re: Having fun with multiple monitors
Please post all lines of your "screenrects".
-> item 3 of line 1 of the screenrects ## WIDD
Is definitively the right border of your main monitor, so this SHOULD do the right thing.
-> item 3 of line 1 of the screenrects ## WIDD
Is definitively the right border of your main monitor, so this SHOULD do the right thing.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
0,0,1920,1080
1920,0,3200,1024
-1600,0,0,1200
1920,0,3200,1024
-1600,0,0,1200
Re: Having fun with multiple monitors
OK, what I exspected. So:
Should show -> 1920
Does it?
Code: Select all
answer WIDD
Does it?
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
NO: neither
or
inwith the cardScript return anything at all.
BUT
returns 1920 when I run it in the messageBox.
Code: Select all
answer WIDD
Code: Select all
put WIDD
BUT
Code: Select all
put (item 3 of line 1 of the screenrects)
Re: Having fun with multiple monitors
Please post your final/last script that does not work!
Maybe I was right with?
Maybe I was right with?
## Not sure if it is a good idea to put this inside of the SWITCH structure.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
You are a genius (or just gifted with the voice of experience) as moving 'that' out
of the switch statement did the job:
HOWEVER . . . I wish I could understand why that was not working inside the switch structure.
Thank you for taking the time to help me, once again.
of the switch statement did the job:
Code: Select all
on preOpencard
set the vis of stack "DWPro" to false
set the lockScreen to true
set the title of stack "DWPro" to " "
set the width of stack "DWPro" to 1000
set the height of stack "DWPro" to 688
---
put (item 3 of line 1 of the screenrects) into WIDD
put (item 4 of line 1 of the screenrects) into HITE
put WIDD
---
switch the POZZZ of stack "DWPro"
case "LL"
set the left of stack "DWPro" to 10
break
case "RR"
set the right of stack "DWPro" to (WIDD - 10)
break
case "MM"
set the loc of stack "DWPro" to the screenLoc
break
end switch
set the top of stack "DWPro" to 100
set the lockScreen to false
set the vis of stack "DWPro" to true
end preOpencard
HOWEVER . . . I wish I could understand why that was not working inside the switch structure.
Thank you for taking the time to help me, once again.
Re: Having fun with multiple monitors
I already posted this two hours ago, why didn't you take my advice the first time resp. tried my script?
That was a rhetorical question!
That was a rhetorical question!
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having fun with multiple monitors
How can I start?why didn't you take my advice the first time
Bloody-mindedness?
Likes to paddle his own canoe?
Death-wish?
It wasn't really 2 hours as I was asleep with the cat for 1 hour of that.
HOWEVER . . . I still do not understand why putting data into a variable inside a switch statement did not work.
Re: Having fun with multiple monitors
Maybe because it just doesn't work this way?
Since this is not related to SWITCH in any way?
And please look up "rhetorical" somewhere.
Since this is not related to SWITCH in any way?
And please look up "rhetorical" somewhere.