#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@"  windowlab2/on preOpenStack repeat with N = 1 to 4 unhilite of btn N of group _brushgroup end repeat set the uWindowCount of me to 1 set loc of me to the screenLoc end preOpenStack on editScript? if the optionKey is "down" then edit script of the target exit to top end if end editScript? cwhiteffffff; uWindowCount1 WindowLab ULucida Grande UArialUArial U helvetica W helveticaU helvetica U helvetica ULucida Grande cREVGeneralscriptChecksum_8XPXZ'X bookmarks handlerListpreOpenStack editScript? tempScript prevHandler editScript?scriptSelectionchar 131 to 130script

on preOpenStack

repeat with N = 1 to 4

unhilite of btn N of group _brushgroup

end repeat

set the uWindowCount of me to 1

set loc of me to the screenLoc

end preOpenStack

on editScript?

if the optionKey is "down" then

edit script of the target

exit to top

end if

end editScript?

cREVGeometryCachestackID1056 Phon enterInField send "mouseUp" to btn _makemask end enterInField on returnInField enterInField end returnInField on openField select the text of the target end openField --on exitField -- send "mouseUp" to btn _makemask --end exitField -- --on closeField -- exitField --end closeField ########## on mouseEnter if short name of the topstack = "windowlab" then if short name of the target is in "_livearea,_mask" then set the uAllowPaint of me to true if the hilitedButtonName of group _btns = "paint" then if the hilite of btn _e then set the eraser to 3 choose eraser tool else choose brush tool -- set the uCurrTool of me to the tool -- trackMouse end if end if else pass mouseEnter end mouseEnter --on trackMouse -- if not the uAllowPaint of me then -- killTracking -- exit trackMouse -- end if -- if not within(grc _livearea,the mouseLoc) and not within(img _mask,the mouseLoc) then -- choose browse tool -- else choose (the uCurrTool of me) -- send "trackMouse" to me in 10 milliseconds --end trackMouse --on mouseUp -- if short name of the target is in "_livearea,_mask" then resetMouse --end mouseUp on mouseMove if the uAllowPaint of me and \ not within(grc _livearea,the mouseLoc) and not within(img _mask,the mouseLoc)then resetMouse else pass mouseMove end mouseMove on resetMouse set the uAllowPaint of me to false repeat for each line L in the pendingmessages if "trackMouse" is in L then cancel item 1 of L end repeat if the tool <> "browse tool" then choose browse tool end resetMouse  uAllowPaintfalse uCurrTool brush tool cREVGeneralscriptChecksumA^K{^e< bookmarks handlerListDenterInField returnInField openField mouseEnter mouseMove resetMouse tempScript prevHandler closeFieldscriptSelectionchar 732 to 731script

on enterInField

send "mouseUp" to btn _makemask

end enterInField

on returnInField

enterInField

end returnInField

on openField

select the text of the target

end openField

--on exitField

-- send "mouseUp" to btn _makemask

--end exitField

--

--on closeField

-- exitField

--end closeField

##########

on mouseEnter

if short name of the topstack = "windowlab" then

if short name of the target is in "_livearea,_mask" then

set the uAllowPaint of me to true

if the hilitedButtonName of group _btns = "paint" then

if the hilite of btn _e then

set the eraser to 3

choose eraser tool

else choose brush tool

-- set the uCurrTool of me to the tool

-- trackMouse

end if

end if

else pass mouseEnter

end mouseEnter

--on trackMouse

-- if not the uAllowPaint of me then

-- killTracking

-- exit trackMouse

-- end if

-- if not within(grc _livearea,the mouseLoc) and not within(img _mask,the mouseLoc) then

-- choose browse tool

-- else choose (the uCurrTool of me)

-- send "trackMouse" to me in 10 milliseconds

--end trackMouse

--on mouseUp

-- if short name of the target is in "_livearea,_mask" then resetMouse

--end mouseUp

on mouseMove

if the uAllowPaint of me and \

not within(grc _livearea,the mouseLoc) and not within(img _mask,the mouseLoc)then

resetMouse

else pass mouseMove

end mouseMove

on resetMouse

set the uAllowPaint of me to false

repeat for each line L in the pendingmessages

if "trackMouse" is in L then cancel item 1 of L

end repeat

if the tool <> "browse tool" then choose browse tool

end resetMouse

cREVGeometryCacheIDs'107285403204410191072854032045102110728540320461022107285403204710231072854032048102410728540320501055107285403204910281072854032051103310728540320521035107285403205310361072854032054104210728540320551043107285403205610441072854032057104510728540320581056107285403206010471072854032059104610728540320611039107285403206210401072854032063104110728540320641048107285403206510491072854032066105010728540320671051107285403206810531072854032069105410728540320311006107285403203210071072854032033103010728540320341009107285403203510101072854032036102010728540320371029107285403203810131072854032039101410728540320401016107285403204110111072854032042101210728540320431015cREVGeometrycacheorder total39     _liveareaK@33EE cREVGeneral revUniqueID 1072854032031_mask Tlocal allowDrag on mouseDown if "windowlab" is in name of this stack then exit mouseDown put mouseH() & "," & mouseV() into allowDrag end mouseDown on mouseMove x,y if allowDrag is empty then exit mouseMove set topLeft of this stack to globalLoc(x-item 1 of allowDrag & "," & y-item 2 of allowDrag) end mouseMove on mouseUp put empty into allowDrag end mouseUp on mouseRelease mouseUp end mouseRelease O 1PNG  IHDR1ϋgAMA=-fPLTEٟtRNS0J~IDATxб 0 ð{d0tUSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSb************************************************************************************************************************************************************************************************************************************ :IENDB` cREVGeneral revUniqueID 1072854032032 _rectw)`3 cREVGeneral revUniqueID 1072854032041  250 @Black  _recth)`3 cREVGeneral revUniqueID 1072854032042  200 @Black   _circled)`3 cREVGeneral revUniqueID 1072854032043  250 @Black   Build WindowEp)local showLoc on mouseUp editScript? # if the hilitedButtonName of group _btns <> "paint" then send "mouseUp" to btn _makemask put width of img _mask into W put height of img _mask into H put globalLoc(loc of this cd) into showLoc add 100 to item 2 of showLoc # ESTABLISH PROPERTIES FOR THE TEST STACK VIA THE TEMPLATE STACK put the destroyStack of the templateStack into D put the vis of the templateStack into V put rect of the templateStack into R put item 3 of the screenRect & "," & item 4 of the screenRect & ",0,0" into tRect put item 1 of tRect + W into item 3 of tRect put item 2 of tRect + H into item 4 of tRect set rect of the templateStack to tRect set the destroyStack of the templateStack to true set the vis of the templateStack to false if "_testwd" is in the mainStacks then \ set the uWindowCount of me to the uWindowCount of me + 1 put the uWindowCount of me into N # CREATE TEST WINDOW create stack ("_testwd" & N) set the defaultStack to ("_testwd" & N) copy img _mask of stack windowlab to stack ("_testwd" & N) set topLeft of img _mask to 0,0 set title of this stack to "TestWindow" show this stack set the destroyStack of the templateStack to D set the vis of the templateStack to V set rect of the templateStack to R choose browse tool # APPLY THE MASK AFTER THE WINDOW IS VISIBLE send "applyMask" && N to me in 20 milliseconds end mouseUp on applyMask N set windowShape stack ("_testwd" & N) to id of img _mask set loc of stack ("_testwd" & N) to showLoc end applyMask Blackvk uWindowCount2 cREVGeneralscriptChecksum9&aI revUniqueID 1072854032044 bookmarks handlerListmouseUp applyMask tempScript prevHandler applyMaskscriptSelectionchar 1551 to 1550script

local showLoc

on mouseUp

editScript?

#

if the hilitedButtonName of group _btns <> "paint" then send "mouseUp" to btn _makemask

put width of img _mask into W

put height of img _mask into H

put globalLoc(loc of this cd) into showLoc

add 100 to item 2 of showLoc

# ESTABLISH PROPERTIES FOR THE TEST STACK VIA THE TEMPLATE STACK

put the destroyStack of the templateStack into D

put the vis of the templateStack into V

put rect of the templateStack into R

put item 3 of the screenRect & "," & item 4 of the screenRect & ",0,0" into tRect

put item 1 of tRect + W into item 3 of tRect

put item 2 of tRect + H into item 4 of tRect

set rect of the templateStack to tRect

set the destroyStack of the templateStack to true

set the vis of the templateStack to false

if "_testwd" is in the mainStacks then \

set the uWindowCount of me to the uWindowCount of me + 1

put the uWindowCount of me into N

# CREATE TEST WINDOW

create stack ("_testwd" & N)

set the defaultStack to ("_testwd" & N)

copy img _mask of stack windowlab to stack ("_testwd" & N)

set topLeft of img _mask to 0,0

set title of this stack to "TestWindow"

show this stack

set the destroyStack of the templateStack to D

set the vis of the templateStack to V

set rect of the templateStack to R

choose browse tool

# APPLY THE MASK AFTER THE WINDOW IS VISIBLE

send "applyMask" && N to me in 20 milliseconds

end mouseUp

on applyMask N

set windowShape stack ("_testwd" & N) to id of img _mask

set loc of stack ("_testwd" & N) to showLoc

end applyMask

 cREVGeneral revUniqueID 1072854032038  W:   cREVGeneral revUniqueID 1072854032039  H:  hN cREVGeneral revUniqueID 1072854032040  Diameter:   cREVGeneral revUniqueID 1072854032045  W:   cREVGeneral revUniqueID 1072854032046  H:   _elipsew)`3 cREVGeneral revUniqueID 1072854032047  300 @Black   _elipseh)`3 cREVGeneral revUniqueID 1072854032048  150 @Black  _clearepon mouseUp editScript? lock screen select empty lock messages choose select tool drag from topLeft of img _mask to bottomright of img _mask delete choose browse tool end mouseUp Blackv9Clear cREVGeneralscriptChecksumʹ;5% VRV bookmarks revUniqueID 1072854032049 handlerListmouseUp tempScriptscriptSelection char 11 to 10 prevHandlermouseUpscript

on mouseUp

editScript?

lock screen

select empty

lock messages

choose select tool

drag from topLeft of img _mask to bottomright of img _mask

delete

choose browse tool

end mouseUp

 _makemaskepon mouseUp editScript? send "mouseUp" to btn _clear set the filled to true set the brushColor to black set the lineSize to 0 put rect of img _mask into tRect switch the hilitedButtonName of group _btns case "rectangle" # DRAW FROM RIGHT TO LEFT TO ACCOUNT FOR 1 PIXEL BUG put item 1 of tRect + fld _rectw into R put item 1 of tRect into L subtract 1 from L put R into item 1 of tRect put L into item 3 of tRect put item 2 of tRect + fld _recth into item 4 of tRect if the thumbPos of scrollbar _radius > 0 then set the roundRadius to the thumbPos of scrollbar _radius choose round rect else choose rectangle tool break case "circle" put item 1 of tRect + fld _circled into item 3 of tRect put item 2 of tRect + fld _circled into item 4 of tRect choose oval tool break case "elipse" put item 1 of tRect + fld _elipsew into item 3 of tRect put item 2 of tRect + fld _elipseh into item 4 of tRect choose oval tool end switch drag from (item 1 of tRect,item 2 of tRect) to (item 3 of tRect,item 4 of tRect) # REMOVE EXTRANEOUS PIXEL ADDED TO ANY ROUNDED MASK if the hilitedButtonName of group _btns is in "circle,elipse" or \ the thumbPos of scrollbar _radius > 0 then fixCorner (item 1 of tRect & "," & item 2 of tRect) end if choose browse tool end mouseUp on fixCorner tRect set the eraser to 32 choose eraser tool click at item 1 of tRect,item 2 of tRect end fixCorner BlackSvk Preview Mask cREVGeneralscriptChecksumy.U+{MyS bookmarks revUniqueID 1072854032051 handlerListmouseUp fixCorner tempScript prevHandler fixCornerscriptSelectionchar 1421 to 1420scriptn

on mouseUp

editScript?

send "mouseUp" to btn _clear

set the filled to true

set the brushColor to black

set the lineSize to 0

put rect of img _mask into tRect

switch the hilitedButtonName of group _btns

case "rectangle"

# DRAW FROM RIGHT TO LEFT TO ACCOUNT FOR 1 PIXEL BUG

put item 1 of tRect + fld _rectw into R

put item 1 of tRect into L

subtract 1 from L

put R into item 1 of tRect

put L into item 3 of tRect

put item 2 of tRect + fld _recth into item 4 of tRect

if the thumbPos of scrollbar _radius > 0 then

set the roundRadius to the thumbPos of scrollbar _radius

choose round rect

else choose rectangle tool

break

case "circle"

put item 1 of tRect + fld _circled into item 3 of tRect

put item 2 of tRect + fld _circled into item 4 of tRect

choose oval tool

break

case "elipse"

put item 1 of tRect + fld _elipsew into item 3 of tRect

put item 2 of tRect + fld _elipseh into item 4 of tRect

choose oval tool

end switch

drag from (item 1 of tRect,item 2 of tRect) to (item 3 of tRect,item 4 of tRect)

# REMOVE EXTRANEOUS PIXEL ADDED TO ANY ROUNDED MASK

if the hilitedButtonName of group _btns is in "circle,elipse" or \

the thumbPos of scrollbar _radius > 0 then

fixCorner (item 1 of tRect & "," & item 2 of tRect)

end if

choose browse tool

end mouseUp

on fixCorner tRect

set the eraser to 32

choose eraser tool

click at item 1 of tRect,item 2 of tRect

end fixCorner

 copyright WhiteC* cREVGeneral revUniqueID 1072854032052  (WindowLab was built by Tactile Media -- www.tactilemedia.com  instructionsWhite=j cREVGeneral revUniqueID 1072854032053  )Click a Shape Profile button to create a *custom window mask. Click Build Window to +display a test window that uses your mask. +Drag your test window around the screen... +(Use command + W to close the test window) x.9 cREVGeneral revUniqueID 1072854032054  Brush:   brush1.gif@S=FGIF89a!, ǡP.t}yjMXS; cREVGeneral revUniqueID 1072854032055 brush2.gif@h@ 9GIF89a !, `͍Z(˙; cREVGeneral revUniqueID 1072854032056 brush3.gif@yC0GIF89a!, n Q; cREVGeneral revUniqueID 1072854032057 un cREVGeneral revUniqueID 1072854032059  Shape Profile   _brushgroup on mouseUp editScript? hilite the target put short name of the target into B if last char of B is a number then set the brush to last char of B repeat with N = 1 to 4 if short name of btn N of me <> B then unhilite btn N of me end repeat end mouseUp /( cREVGeneral revUniqueID 1072854032060_6B `3  cREVGeneral revUniqueID 1072854032061  _7B `3  cREVGeneral revUniqueID 1072854032062  _8B `3  cREVGeneral revUniqueID 1072854032063  _eB `3   cREVGeneral revUniqueID 1072854032064  K cREVGeneral revUniqueID 1072854032065Kh cREVGeneral revUniqueID 1072854032066K  h cREVGeneral revUniqueID 1072854032067 D**!~>1 ~>1  cREVGeneral revUniqueID 1072854032068_radiusy Mon mouseUp send "mouseUp" to btn _makemask in 10 milliseconds end mouseUp #50 cREVGeneral revUniqueID 1072854032069 brush4.gif@A CGIF89a !, ˡМrQ ms[}ۥEMZ; cREVGeneral revUniqueID 1072854032058 )i cREVGeneral revUniqueID 1072854032050  Corner Radius:  _btnsiQon mouseUp enable btn _makemask send "mouseUp" to btn _makemask end mouseUp ,j cREVGeneral revUniqueID 1072854032033 Rectangle@D 0b cREVGeneral revUniqueID 1072854032034  Circle@D 0b cREVGeneral bookmarks revUniqueID 1072854032035 handlerList tempScript prevHandlerscriptSelection char 1 to 0script  Elipse@D 0F cREVGeneral revUniqueID 1072854032036  Paint@Don mouseUp send "mouseUp" to btn _clear disable btn _makemask answer "Paint your own mask using the brushes & eraser!" & cr & cr &\ "Choose a brush and paint in the magenta space to create an irregular window mask..." put true into noHilites repeat with N = 1 to 4 if the hilite of btn N of group _brushgroup then put false into noHilites end repeat if noHilites then send "mouseUp" to btn 1 of group _brushgroup end mouseUp 01F cREVGeneralscriptChecksum ЗH@ revUniqueID 1072854032037 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 394 to 393scriptN

on mouseUp

send "mouseUp" to btn _clear

disable btn _makemask

answer "Paint your own mask using the brushes & eraser!" & cr & cr &\

"Choose a brush and paint in the magenta space to create an irregular window mask..."

put true into noHilites

repeat with N = 1 to 4

if the hilite of btn N of group _brushgroup then put false into noHilites

end repeat

if noHilites then send "mouseUp" to btn 1 of group _brushgroup

end mouseUp