[TIP] Multiple screen management

FlexibleLearning admin at FlexibleLearning.com
Wed Dec 7 09:15:23 EST 2011


A useful handler when working with multiple monitors...

on mouseUp
  --| Which monitor is this stack on?
  put activeScreen()
end mouseUp

function activeScreen
  --| Return the number of the monitor for the loc of the stack
  if num of lines of the screenRects = 1 then return 1
  put item 1 of the loc of this stack into xOff
  repeat with n = 1 to num of lines of the screenRects
    put line n of the screenRects into thisRect
    if (xOff >= item 1 of thisRect) AND (xOff <= item 3 of thisRect) then
return n
  end repeat
  --| Failsafe...
  return 1
end activeScreen


Hugh Senior
FLCo





More information about the use-livecode mailing list