Multiple Screen Issue
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Multiple Screen Issue
Sturgis,
Just for fun, I built the attached plugin, named "idShowScreen". When selected it opens a large empty window with a couple buttons. Click "Make Map" and it makes a proportional map of all screens and open LC windows in a multiscreen environment. The stack window objects are all draggable, and when dropped change their respective stacks - I wanted to be able to see where off screen stacks were, or store some off screen. The only parameter it changes of any stack is it's rect.
It works standalone or as a plugin. I've only tested on Win7 x64, but I tested it with my screens in many orientations.
Walt
Oops just tested a very odd screen configuration, now it handles that too.
Just for fun, I built the attached plugin, named "idShowScreen". When selected it opens a large empty window with a couple buttons. Click "Make Map" and it makes a proportional map of all screens and open LC windows in a multiscreen environment. The stack window objects are all draggable, and when dropped change their respective stacks - I wanted to be able to see where off screen stacks were, or store some off screen. The only parameter it changes of any stack is it's rect.
It works standalone or as a plugin. I've only tested on Win7 x64, but I tested it with my screens in many orientations.
Walt
Oops just tested a very odd screen configuration, now it handles that too.
- Attachments
-
- idShowScreen2.zip
- (2.5 KiB) Downloaded 328 times
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: Multiple Screen Issue
Don't get put off by my use of technical terms here Walt, but.. thats just "neato!"
Re: Multiple Screen Issue
That's quite cute. A couple of well-placed lockscreens speed things up considerably, although it's fun watching it draw. I can report that it works on linux as well, although it doesn't draw the screen outlines for multiple desktops.
Re: Multiple Screen Issue
Thanks. I just finished loading Ubuntu on a flash drive, I'll try to see why it doesn't draw the screens in Linux if I get the time.
Walt
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: Multiple Screen Issue
No, it *does* draw the screens. It's just that if I have some windows in desktop 1 and some in desktop 2 it places the stack images properly but doesn't draw the surrounding screens for the desktop that isn't current. Minor thing, and I'm impressed enough that it figures out where the offscreen stacks are.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
Post Submit: oops, sorry if this looks out of place. I didn't realise this thread had 2 pages.
I'll return and delete this ASAP if it doesn't belong.
I'm hoping this helps
Speaking of cludgy.
I just happen to be working on this last night needing a break from my current project.
I've got three screens on my win32.
And was getting frustrated with the time wasted having to search thru three screens.
And was experimenting with forcing exact locations of LC IDE and all its sub-stacks.
i.e. forcing meaning don't query where the stack is - just place it right there every time
This is very cludgy work in progress but hope this could be a starting ground
and maybe even learn a few niftier tricks from more experienced developers.
I'm hoping there are better ways to open the properties Inspector and script editor.
I'd be very interested in any suggestions about how to arrange related stacks and their sub-stacks together.
in win32
the left and the effectieve left didn't seem to make any difference in this scripts.
the rectangle seems to be the internal rectagle of the stack.
i.e. excluds the borders around each stack/form/window.
I'm sure I'm missing something here.
You need to add a button btnDummy to your stack if you want to use this code as is:
I'll return and delete this ASAP if it doesn't belong.
I'm hoping this helps
Speaking of cludgy.
I just happen to be working on this last night needing a break from my current project.
I've got three screens on my win32.
And was getting frustrated with the time wasted having to search thru three screens.
And was experimenting with forcing exact locations of LC IDE and all its sub-stacks.
i.e. forcing meaning don't query where the stack is - just place it right there every time
This is very cludgy work in progress but hope this could be a starting ground
and maybe even learn a few niftier tricks from more experienced developers.
I'm hoping there are better ways to open the properties Inspector and script editor.
I'd be very interested in any suggestions about how to arrange related stacks and their sub-stacks together.
in win32
the left and the effectieve left didn't seem to make any difference in this scripts.
the rectangle seems to be the internal rectagle of the stack.
i.e. excluds the borders around each stack/form/window.
I'm sure I'm missing something here.
You need to add a button btnDummy to your stack if you want to use this code as is:
Code: Select all
-- button btnArrangeStacks
on mouseUp
-- Rects -- left, top, right and bottom of the rectangle
-- put the screenRect into rectScreen
-- put the screenRects into rectScreens
-- put the rect of stack revMenubar into rectMenuBar
-- set the left of rectMenuBar to 0
-- set the right of rectMenuBar to 0
-- set the rect of stack revMenubar to recMenuBar
-- LiveCode MenuBar
set the effective left of stack revMenubar to 0 + 5
set the effective top of stack revMenubar to 0 + 30
set the left of this stack to the Right of stack revMenubar + 10
set the top of this stack to 25
-- LiveCode Tools Palette
--if revApplicationOverview is not among the lines of the openStacks then
-- open stack revTools
palette stack revTools
-- end if
--
set the left of stack revTools to 0 + 5
set the top of stack revTools to the effective bottom of stack revMenuBar + 25
Try
-- if revaltplugin is not among the lines of the openStacks then
palette stack revaltplugin
-- end if
set the left of stack revaltplugin to the right of stack revTools + 5
set the top of stack revaltplugin to the effective top of stack revTools - 20
catch tErr
end Try
-- open stack "revPropertyPalette"
-- send "revBuildPropertyPalette" to stack "revTemplatePalette"
-- palette stack "revPropertyPalette 1"
--call openPropertyInspector
local tTargetID
put the long id of the target into tTargetID
# create the inspector linked to this control
send "revBuildPropertyPalette tTargetID" to stack "revTemplatePalette"
# get the name of the inspector linked to this control
local tPaletteName
put revPropertyPalettes(tTargetID) into tPaletteName
open stack tPaletteName
-- put the rectangle of stack tPaletteName into recPaletteName
if revaltplugin is among the lines of the openStacks then
set the left of stack tPaletteName to the right of stack revaltplugin + 5
else
set the left of stack tPaletteName to the right of revTools + 5
end if
set the top of stack tPaletteName to the top of stack revTools
-- put the rect of stack revTools into recTools + 5
edit the script of button btnDummy
-- if "revNewScriptEditor 1" is not among the lines of the openStacks then
-- palette stack "revNewScriptEditor 1"
-- end if
set the left of stack "revNewScriptEditor 1" to the right of stack tPaletteName + 10
set the height of stack "revNewScriptEditor 1" to the bottom of stack tPaletteName + 200
set the top of stack "revNewScriptEditor 1" to the top of stack revTools + 10
put the rect of stack revApplicationOverview into rectAppBrowser
-- the working screenRects - left, top, right and bottom of the rectangle
-- Adding the working adjective to either form returns the virtual co-ordinates
-- of each screen's working-area.
-- The working-area of a screen is defined to be the area not convered by OS furniture
-- (such as the task bar on Windows, and the Dock and Menubar on Mac OS X).
-- NOTE: specify the effective keyword,
-- the rectangle includes the outline added by the showFocusBorder property.
-- It also includes the heavy outline added to the defaultButton.
-- If the showFocusBorder of the object is false, or the object is not currently focused,
-- the effective rectangle is the same as the rectangle.
end mouseUp
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
Hi walt,WaltBrown wrote: ...
But what is interesting, if I get all open stacks and their rects, I get:
revTools, 7,136,91,595
Untitled 1, 111,145,843,698
revMenubar, 60,30,868,105
revDictionary, 598,-1005,1362,-529
revStartCentre, 291,175,990,625
...
Walt
Any change of you posting the script for all open stack and their rects?
tia
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
Hi Walt,
Thats very cool!
Works on Win32.
Anyone know how to save all these positions?
I can move them around but on LC close then LC open all the stacks are in differnt places than when I left them.
Thats very cool!
Works on Win32.
Anyone know how to save all these positions?
I can move them around but on LC close then LC open all the stacks are in differnt places than when I left them.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Multiple Screen Issue
Put this in a button.
Code: Select all
on mouseUp
answer listStackRects()
end mouseUp
function listStackRects
local tWindows, tWin, tList
put the windows into tWindows
repeat for each line tWin in tWindows
put tWin & comma & the rect of stack tWin & return after tList
end repeat
return tList
end listStackRects
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
thanks heaps!
LOL.
Yeah ok.
Don't know why I was thinking it was a single script line for the msgbox.
LOL.
Yeah ok.
Don't know why I was thinking it was a single script line for the msgbox.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Multiple Screen Issue
You can replace "windows" with "openStacks", "mainStacks, "revLoadedStacks" etc.
I like the idea of preset configurations. Like "CodingDesktop", "TestingDesktop", UserInterfaceDesktop", etc.
Walt
I like the idea of preset configurations. Like "CodingDesktop", "TestingDesktop", UserInterfaceDesktop", etc.
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
Is there an exhaustive list anywhere?WaltBrown wrote:You can replace "windows" with "openStacks", "mainStacks, "revLoadedStacks" etc.
And by "You can replace..."
Do you mean I should get the exact same values?
Cause I think thats what is happening.
Yeah in your idShow screen "Save as default positions for CodeingDesktop, or Testing Desktop, or etc"I like the idea of preset configurations. Like "CodingDesktop", "TestingDesktop", UserInterfaceDesktop", etc.
Walt
Is there any chance of anyone having a test of this Show Stacks and tell me why my basic field table is the same no matter which stack list I'm trying to display?
I can't work out what I'm missging here.
Perhaps a lockScreen or something like that?
tia
- Attachments
-
- BGS2.zip
- (8.73 KiB) Downloaded 280 times
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Multiple Screen Issue
windows and the openstacks are synonyms and should show the same thing.
if you decide to use revloadedstacks
put revLoadedStacks("All") will return all stacks including ide stacks.
put revLoadedStacks("Application") will return only your application stacks.
put revLoadedStacks("Preference") will return stacks based on your preferences setting (whether or not to show ide stacks in lists.)
put revLoadedStacks() defaults to "application".
There is also the stacksinuse which will return library stacks (start using stack "stackname")
There is also the mousestack, which while not useful for what you're doing currently, might still be interesting to look at.
There may be more 'listers' that I'm unfamiliar with (being the perpetual newbie that I am)
As for why they all are showing the same thing for you, its a function of how switch/case work. From the dictionary:
if you decide to use revloadedstacks
put revLoadedStacks("All") will return all stacks including ide stacks.
put revLoadedStacks("Application") will return only your application stacks.
put revLoadedStacks("Preference") will return stacks based on your preferences setting (whether or not to show ide stacks in lists.)
put revLoadedStacks() defaults to "application".
There is also the stacksinuse which will return library stacks (start using stack "stackname")
There is also the mousestack, which while not useful for what you're doing currently, might still be interesting to look at.
There may be more 'listers' that I'm unfamiliar with (being the perpetual newbie that I am)
As for why they all are showing the same thing for you, its a function of how switch/case work. From the dictionary:
My understanding is that this sort of "fall through" behavior can be useful, but I personally have never had need of it. I always end each case section with a break statement to avoid the fall through.Comments:
Flow of control in a switch structure is less complicated than it looks. In general, when LiveCode enters a switch control structure, it looks for the first case section whose caseValue is equal to the switchExpression, or whose caseCondition is true. When a matching condition is found, all statements following it are executed--even statements in another case section--until either a break statement is encountered or the switch control structure ends.
Re: Multiple Screen Issue
Oh, one more thing you might be interested in adding is "the frontscripts" and "the backscripts" which will as i'm sure you surmised.. list the frontscripts and backscripts you currently have loaded.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Multiple Screen Issue
I'm sure I tranced that 100 times and it never traced thru another case.
I'm sure it was me.
Thanks for help with the break. grrrr
Only revLoadedStacks() worked for me.
I'm sure it was me.
Thanks for help with the break. grrrr
Only revLoadedStacks() worked for me.
Code: Select all
switch tStacks
case "Stacks"
put the Stacks into tWindows
put the Stacks
break
case "Windows"
put the Windows into tWindows
put the Windows
break
case "OpenStacks"
put the OpenStacks into tWindows
put the OpenStacks
break
case "mainStacks"
put the mainStacks into tWindows
put the mainStacks
case "revLoadedStacks()"
put revLoadedStacks() into tWindows -- NOT 'the'
put revLoadedStacks()
break
case "revLoadedStacks("All")"
put revLoadedStacks("all") into tWindows -- NOT 'the'
put revLoadedStacks("all")
break
case "revLoadedStacks("Application")"
put revLoadedStacks("application") into tWindows -- NOT 'the'
put revLoadedStacks("application")
break
case "revLoadedStacks("Preference")"
put revLoadedStacks("preference") into tWindows -- NOT 'the'
put revLoadedStacks("preference")
break
end switch
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.