home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1991-02-19 | 30.2 KB | 1,025 lines
-- stack: in -- format: 10 (HyperCard 2) -- flags: 0x1000 (none) -- protect password hash: 0 -- maximum user level: 5 (scripting) -- window: Rect(x1=64, y1=80, x2=576, y2=422) -- screen: Rect(x1=0, y1=0, x2=640, y2=480) -- card dimensions: w=512 h=342 -- scroll: x=0 y=0 -- background count: 1 -- first background id: 2751 -- card count: 1 -- first card id: 2961 -- list block id: 2273 -- print block id: 0 -- font table block id: 3420 -- style table block id: 3109 -- free block count: 0 -- free size: 0 bytes -- total size: 31584 bytes -- stack block size: 28672 bytes -- created by hypercard version: 0x02018000 -- compacted by hypercard version: 0x02018000 -- modified by hypercard version: 0x02018000 -- opened by hypercard version: 0x02018000 -- patterns[0]: 0x0000000000000000 -- patterns[1]: 0x8000000008000000 -- patterns[2]: 0x8800220088002200 -- patterns[3]: 0x8888222288882222 -- patterns[4]: 0x88AA22AA88AA22AA -- patterns[5]: 0xCCAA33AACCAA33AA -- patterns[6]: 0xEEAABBAAEEAABBAA -- patterns[7]: 0xEEBBBBEEEEBBBBEE -- patterns[8]: 0xFFBBFFEEFFBBFFEE -- patterns[9]: 0xFFBBFFFFFFBBFFFF -- patterns[10]: 0x8010022001084004 -- patterns[11]: 0xFFFFFFFFFFFFFFFF -- patterns[12]: 0x8822882288228822 -- patterns[13]: 0x1122448811224488 -- patterns[14]: 0xC4800C6843023026 -- patterns[15]: 0xB130031BD8C00C8D -- patterns[16]: 0xAA00AA00AA00AA00 -- patterns[17]: 0x8822552288225522 -- patterns[18]: 0x8855225588552255 -- patterns[19]: 0x77DD77DD77DD77DD -- patterns[20]: 0x8000000000000000 -- patterns[21]: 0xAA55AA55AA55AA55 -- patterns[22]: 0x038448300C020101 -- patterns[23]: 0x8244394482010101 -- patterns[24]: 0x8814224188412214 -- patterns[25]: 0x8080413E080814E3 -- patterns[26]: 0x22048C7422179810 -- patterns[27]: 0xBE808808EB088880 -- patterns[28]: 0x25C8328964244C92 -- patterns[29]: 0xA29C41BE2AC914EB -- patterns[30]: 0x40A00000040A0000 -- patterns[31]: 0x8040200002040800 -- patterns[32]: 0xAA00800088008000 -- patterns[33]: 0xFF80808080808080 -- patterns[34]: 0x081C22C180010204 -- patterns[35]: 0xFF808080FF080808 -- patterns[36]: 0xF87422478F172271 -- patterns[37]: 0xBF00BFBFB0B0B0B0 -- patterns[38]: 0xFF7FBE5DA2418000 -- patterns[39]: 0xFAF5FAF5A050A050 -- checksum: 0xDE17C2D2 ----- HyperTalk script ----- ----| Mouse function lineNo return selectclickLine() end lineNo function ClickLine -- clickline doesn't work with lines that run over (uses clickloc) return selectClickLine() end clickLine -- as suggested by KWA 9/27/88 and implemented by SJF function selectClickLine lock screen put the lockText of the target into oldLockText set the lockText of the target to false click at the clickLoc get word 2 of the selectedLine set the lockText of the target to oldLockText unlock screen return it end selectClickLine ----| Pop up menus function clickLocH --popMenu appears where user clicks return (item 1 of the clickLoc) + (item 1 of loc of card window) end clickLocH function clickLocV return (item 2 of the clickLoc) + (item 2 of loc of card window) end clickLocV function buttonLocH -- menu item in popMenu appears at loc of button return (item 1 of rect of target) + (item 1 of loc of card window) end buttonLocH function buttonLocV return (item 2 of rect of target) + (item 2 of loc of card window) end buttonLocV function menuLocH -- popMenu appears below, as in a pull down menu return (item 1 of rect of target+1) + (item 1 of loc of card window) end menuLocH function menuLocV return (item 4 of rect of target+1) + (item 2 of loc of card window) end menuLocV ----| VISUAL EFFECTS (from...) on fromYourRight global gVisualEffect put "wipe right" into gVisualEffect -- kvs reversed dir 8/29 end fromYourRight on fromYourLeft global gVisualEffect put "wipe left" into gVisualEffect -- kvs reversed dir 8/29 end fromYourLeft on fromAbove fromAboveTitle -- only come from above for goDown routines. end fromAbove on fromBelow global gVisualEffect put "iris close slow" into gVisualEffect end fromBelow on fromAboveTitle -- explicit visuals for entering title card -- NOTE: requires bg fld title global gVisualEffect hide fld title unlock screen with iris open slow lock screen show fld title put dissolve into gVisualEffect wait 6 end fromAboveTitle on fromYourLeftTitle -- explicit visuals for entering title card -- does nothing, should never be called end fromYourLeftTitle on fromYourIntro global gVisualEffect put "iris open slow" into gVisualEffect end fromYourIntro on fromZoomOut global gVisualEffect put "zoom open" into gVisualEffect end fromZoomOut on fromChallengeLeft global gVisualEffect put "scroll right " into gVisualEffect end fromChallengeLeft on fromChallengeRight global gVisualEffect put "scroll left " into gVisualEffect end fromChallengeRight on fromAni global gVisualEffect put empty into gVisualEffect end fromAni on fromAniEnd global gVisualEffect put "dissolve" into gVisualEffect end fromAniEnd on fromIndexList global gVisualEffect put "dissolve" into gVisualEffect end fromIndexList on fromSimulation global gVisualEffect put "zoom open" into gVisualEffect end fromSimulation on fromEffect effectName global gVisualEffect put effectName into gVisualEffect end fromEffect on fromSameCard global gVisualEffect put "dissolve" into gVisualEffect end fromSameCard on doVisualEffect global gVisualEffect do "visual" && gVisualEffect end doVisualEffect ----| Screen Display on HideTarg hide the target end HideTarg on ShowTarg show the target end ShowTarg on DragTarg get xDragreSizeRect( rect of target,"drag" ) if (item 1 of it && "," && item 2 of it is within "0,0,513,343") and (item 3 of it && "," && item 4 of it is within "0,0,513,343") then set rect of target to it else beep end DragTarg on ShiftDragTarg if the shiftkey is down then DragTarg end if end ShiftDragTarg on DragSizeTarg get xDragreSizeRect(rect of target) set rect of target to it end DragSizeTarg on ToggleTargHilite set the hilite of target to not the hilite of target end ToggleTargHilite function TargetIsLit return hilite of the target is true end TargetIsLit on UnhiliteButtons set lockScreen to true if the paramcount > 0 then repeat with x = 1 to the paramcount do "set hilite of bkgnd button" && kwote(param(x)) && "to false" end repeat end if set lockScreen to false end UnhiliteButtons on UnhiliteCardButtons set lockScreen to true if the paramcount > 0 then repeat with x = 1 to the paramcount do "set hilite of button" && kwote(param(x)) && "to false" end repeat end if set lockScreen to false end UnhiliteCardButtons on HiliteTarg set hilite of the target to true end HiliteTarg on UnHiliteTarg set hilite of the target to false end UnHiliteTarg ----| List, Menu, and Array on radio repeat with i = 1 to paramCount() set the hilite of btn param(i) to false end repeat set the hilite of the target to true end radio on RadioButton repeat with n = 2 to the paramcount do "put" && kwote(param(n)) && "into butName" do "set" && param(1) && "of btn" && kwote(butName) && "to false" end Repeat end RadioButton on RadioBkgndButton repeat with n = 2 to the paramcount do "put" && kwote(param(n)) && "into butName" do "set" && param(1) && "of bg btn" && kwote(butName) && "to false" end Repeat end RadioBkgndButton ----| NAVIGATION HANDLERS on goPanic if the number of this cd is 1 then goHome else global gCurNode --global gLastPlace -- put getCardName() into gLastPlace -- This causes last mark to return you to the place you did the -- gopanic, which testers found confusing. kvs 1/90 set cursor to watch lock screen go first card unlock screen with dissolve put the short name of this card into gCurNode end if end goPanic on goUp error "got goUp" end goUp on goUpTo cardName global gCurNode set cursor to watch doOpenCard cardName, "fromBelow" put the short name of this card into gCurNode exit to hypercard -- pch 7/25/90 clears mouseclick buffer end goUpTo on goDown cardName global gCurNode set cursor to watch doOpenCard cardName, "fromAbove" put the short name of this card into gCurNode exit to hypercard -- pch 7/25/90 clears mouseclick buffer end goDown on goDissolve cardName global gCurNode doOpenCard cardName, "fromSameCard" put the short name of this card into gCurNode exit to hypercard -- pch 7/25/90 clears mouseclick buffer end goDissolve on goPrev cardName -- kvs added parameter to specify the card if cardName is "" then put the number of prev card into cardName doOpenCard cardName,fromYourRight exit to hypercard -- pch 7/25/90 clears mouseclick buffer end goPrev on goNext cardName -- kvs added parameter to specify the card if cardName is "" then put number of next card into cardName -- if cardName is "" then put the id of next card into cardName doOpenCard cardName,fromYourLeft exit to hypercard -- pch 7/25/90 clears mouseclick buffer end goNext on GoHome --global gLastPlace,gCurNode --put getCardName() & "," & gCurNode into gLastPlace -- This causes last mark to return you to the place you did the -- goHome, which testers found confusing. kvs 1/90 lock screen set cursor to watch go cd "MFhome" of Home unlock screen with dissolve end GoHome on goSim cardName if cardName is empty then put number of next card into cardName doOpenCard cardName, fromSimulation end goSim on doOpenCard cardName, fromMsg global gVisualEffect if cardName is not empty then set cursor to watch lock screen if first word of cardName is not "card" then put "card" && kwote(cardName) into cardName go cardName do "send" && fromMsg && "to this card" if gVisualEffect is not empty then unlock screen with visual gVisualEffect else unlock screen end if end if set cursor to arrow if fromMsg is "fromYourLeft" or fromMsg is "fromAbove" then unlock screen with iris open -- extra one if needed for map send openAction to this cd end if end doOpenCard on openAction -- anything on opencard that needs to be visible goes in this routine end openAction ----| Text routines on putText str put str into fld "TextDisplay" end putText on addText str put str after fld "TextDisplay" end addText -- returns the text function getText num put (offset("["& num & "]", field "text")+4) into firstChar put (offset("[" & (Num + 1) & "]", field "text")-2) into lastChar if lastChar > 0 then return char firstChar to lastChar of field "text" else return "" end if end getText -- text currently displayed function getDisplayText return fld "textDisplay" end getDisplayText -- display a piece of text -- for double digit numbers, you don't want a space or return after "]" on DisplayText num lock screen put (offset("["& num & "]", field "text")+4) into firstChar put (offset("[" & (Num + 1) & "]", field "text")-2) into lastChar if lastChar > 0 then put char firstChar to lastChar of field "text" into field "textdisplay" show fld textdisplay unlock screen with wipe right end DisplayText on info1 -- display text when clicking on a click button lock screen put selectClickLine() into num -- make sure there's something in that line before you do anything if char 1 of line num of cd fld poplist is "Δí" then set cursor to watch repeat with x = 1 to the number of lines in cd fld popList if char 1 of line x of cd fld popList is "‚àÇ" then put "Δí" into char 1 of line x of cd fld popList -- pop out all buttons end if end repeat put "‚àÇ" into char 1 of line num of cd fld popList -- push in the one unlock screen displayText num end if end info1 on info2 --if the thing is already depressed, do nothing. end info2 on multiCardInfo cardlist lock screen put selectClickLine() into num if char 1 of line num of cd fld popList is "Δí" then repeat with x = 1 to the number of lines in cd fld popList if char 1 of line x of cd fld popList is "‚àÇ" then put "Δí" into char 1 of line x of cd fld popList -- pop out all buttons end if end repeat go cd item num of cardlist put "‚àÇ" into char 1 of line num of cd fld popList -- push in the one unlock screen with dissolve -- staying on the same card send openAction to this cd end if end multiCardInfo on resetSeen -- put all the click buttons back to unclicked state put "popList" into fldname repeat with x = 1 to the number of lines in cd fld fldname if char 1 of line x of cd fld fldname = "‚àÇ" then put "Δí" into char 1 of line x of cd fld fldname end if end repeat displayText 0 -- reset the text display as well end resetSeen -- allows a default message on displayTextDefault num, str get getText( num ) if it is not empty then putText it else putText str end displayTextDefault on HideLabels b,e lock screen repeat with n = b to e hide cd fld ("label." & n) end repeat unlock screen end HideLabels on hideLabel b,e lock screen repeat with n = b to e hide cd fld ("label" && n) end repeat unlock screen end hideLabel on WipeLabel labelName, pause, visualEffect if pause is empty then put 20 into pause if visualEffect is empty then put "wipe right" into visualEffect lock screen show cd fld labelName unlock screen with visual visualEffect wait pause end WipeLabel on checkDoubleClick send doubleClick to target end checkDoubleClick function findField fldname repeat with x = 1 to the number of flds if the short name of fld x = fldname then return the name of fld x end if end repeat repeat with x = 1 to the number of cd flds if the short name of cd fld x = fldname then return the name of cd fld x end if end repeat return "false" end findfield on playScene sceneNumber send "playScene sceneNumber" to card "VideoList" end playScene on introScene sceneNumber send "introScene sceneNumber" to card "VideoList" end introScene ---- STUDENT OPTIONS follow -- |-- the options button calls up a panel of services on newOptions set cursor to watch Options end newOptions on Options set cursor to watch -- refix pch 8/27/90 video getStatus -- XCMD call to voyager if the result contains "still" then -- do nothing else videoclosecard -- pch 7/24/90 end if -- end refix set cursor to arrow get SSPanel() set cursor to arrow if it is not "cancel" then do it -- palette "Student Services" end Options function SSpanel set cursor to watch setWindow 1 NewWindow 217,248,centered,0,2,"SS Dialog",visible NewItem picture,0,0,217,248,325 -- item 1 NewItem RectButton,20,83,72,133,Active, -1,"invert","Bookmark",noColor,"","" -- Bookmark, item 2 NewItem RectButton,82,83,134,133,Active, -1,"invert","Notebook",noColor,"","" -- Note, item 3 NewItem RectButton,144,83,196,133,Active, -1,"invert","Snapshot",noColor,"","" -- SnapShot, Item 4 NewItem RectButton,20,143,72,193,Active, -1,"invert","Glossary",noColor,"","" -- Glossary, Item 5 NewItem RectButton,82,143,134,193,Active, -1,"invert","Map",noColor,"","" -- Map, Item 6 NewItem RectButton,144,143,196,193,Active, -1,"invert","Help",noColor,"","" -- Help, Item 7 NewItem RectButton,19,204,110,230,Active, -1,"invert","quitMF",noColor,"","" -- Quit, item 8 NewItem RectButton,124,204,197,230,Active, -1,"invert","cancel",nocolor,"","" -- Cancel, item 9 set cursor to arrow get Display (15,1 ) if it = "timeout" then killWindow return "" -- do nothing end if killWindow -- clean up return item 4 of it end SSpanel -- this handler is called from all stacks on BookMark -- closeSSPanel -- stuff from MFB MarkPlace global gLastPlace,gPlaceNames, gPlaces,gCurNode setWindow 1 NewWindow 290,222,centered,0,1,"Bookmark Dialog",visible put "Student Services" & return & "Bookmark" into theText NewItem StaticText,59,6,192,48,theText,"B garamond bold",20,plain -- item 1 NewItem RectButton,17,8,61,45, "NotActive",1742,"dontinvert",empty,noColor,"","" -- bookmark graphic item 2 NewItem Rectangle,0,53,290,54,1 -- item 3, decorative rule NewItem StaticText,24,60,157,79, "Bookmark in:",Garamond,16,plain -- item 4 NewItem StaticText,24+3,79,260,95, makeStamp(),"Chicago",12,plain -- item 5 NewItem Rectangle,24,78,268,97,1 --Item 6 NewItem StaticText,24,103,268,123, "Bookmark name (optional):",Garamond,16,plain -- item 7 NewItem EditText,24,120,268,141, empty,"Chicago",12,plain,noScroll,hasCursor -- item 8 NewItem RoundButton,24,161,140,187, "Create mark",13,noCommand,"" -- item 8 NewItem RoundButton,152,164,268,184 , "Cancel",charToNum("."),Command,"" -- item 10 NewItem RoundButton,24,196,140,216, "Go to last mark",14,noCommand,"" -- item 11 NewItem RoundButton,152,196,268,216, "Select a mark",15,noCommand,"" -- item 12 set cursor to arrow get Display (180,1) -- Kill the window after a timeout if it = "timeout" then -- delete last item of whereWeCameFrom killWindow return "cancel" end if -- if it didn't time out, see what the user chose put item 4 of it into userPicked if userPicked is "Create mark" then -- create a new bookmark put item 2 of GetValue("Item",5) into placename-- the bookmark stamp get item 2 of getValue("Item",8) -- the optional title if it is not "" then put " ‚Ä¢ " & it after placeName if placeName is not empty then put placeName & return before gPlaceNames put getCardName() into gLastPlace put gLastPlace & "," & gCurNode & return before gPlaces end if killWindow else if userPicked is "Go to last mark" then -- go to last mark killWindow LastPlace else if userPicked is "Select a mark" then -- select mark frm bookmark killWindow goBookMark else -- must be Cancel killWindow end if end BookMark on LastPlace global gLastPlace, gCurNode,gPlaces put getCardName() & "," & gCurNode into lastPlace get item 1 of gLastPlace if it is not "" then -- begin pch fix 7/30/90 --go item 1 of gLastPlace --put lastPlace into gLastPlace go item 1 of line 1 of gPlaces -- end pch fix else answer "Sorry, you haven‚Äôt made any Bookmarks." with "OK" end if end LastPlace on goBookMark global gLastPlace,gPlaceNames, gPlaces, gRecentPlace,gCurNode push card put getCardName() & "," & gCurNode into gRecentPlace lock screen go to card "BookMark" of stack "MF BookMark" put gPlaceNames into field "PlaceList" unlock screen with visual effect iris open end goBookMark -- this handler is called from all stacks on NoteBook -- closeSSPanel global gStudentName setWindow 1 NewWindow 290,290,centered,0,1,"Note",visible put "Student Services" & return & "Note" into theText NewItem StaticText,59,6,192,48,theText,"B garamond bold",20,plain -- item 1 NewItem RectButton,17,8,61,45,NotActive, 17526,"dontinvert",empty,noColor,"","" -- Note icon, Item 2 NewItem Rectangle,0,53,290,54,1 -- item 3, decorative rule NewItem StaticText,24,60,157,79, "Note in:",Garamond,16,plain -- item 4 NewItem StaticText,24+3,79,260,95, makeStamp(),"Chicago",12,plain -- item 5 NewItem Rectangle,24,78,268,97,1 --Item 6 NewItem StaticText,24,103,268,123, "Type note here:",Garamond,16,plain -- Item 7 NewItem EditText,24,120,269,220, "",Geneva,12,plain,hasScroll,hasCursor -- Item 8 NewItem RoundButton,24,229,140,255, "Save note",13,noCommand,"" -- item 9 NewItem RoundButton,152,232,268,252 , "Tell Apple",10,noCommand,"" -- item 10 NewItem RoundButton,24,264,140,284, "Go to Notebook",11,noCommand,"" -- item 11 NewItem RoundButton,152,264,268,284 , "Cancel",charToNum("."),Command,"" -- item 12 set cursor to arrow get Display (3600,1) -- Kill the window after a timeout if it = "timeout" then -- delete last item of whereWeCameFrom killWindow return "cancel" end if -- if it didn't time out, see what the user chose put item 4 of it into userPicked if userPicked is "Save note" then -- create a new note set cursor to watch put item 2 of GetValue("Item",5) into placeName -- the note time/place stamp put GetValue("Item",8) into noteText -- the actual text delete item 1 of noteText -- do this because of text commas put stripReturns(noteText) into notetext killWindow set cursor to watch if goStudentStack("ask") is "true" then go cd "notebook" else exit notebook end if if the number of chars in fld "notes" > 29000 then answer "Sorry, your notebook is too full to save any more notes." else put placeName & return & noteText & return & return after fld "notes" end if pop card else if userPicked is "Tell Apple" then -- put the comment into Apple feedback stack (comments) -- as well as user notebook put item 2 of GetValue("Item",5) into placeName -- the note time/place stamp put GetValue("Item",8) into noteText -- the actual text delete item 1 of noteText -- do this because of text commas put stripReturns(noteText) into notetext put the short name of this stack && "*" && the id of this cd into cdname killWindow set cursor to watch beQuiet go cd "notebook" of stack "MF Apple Feedback" if the result is not "" then put "Sorry,the Apple Feedback stack is not available for "&& "taking your comments." into string answer string with "OK" exit notebook end if if the number of chars in fld "notes" > 29000 then answer "Sorry, the Apple Feedback stack is too full to save any more notes." else put gStudentName & return && cdname && return after fld "notes" put placeName & return & noteText & return & return after fld "notes" end if returnQuiet else if userPicked is "Go to notebook" then -- open the notebook set cursor to watch put GetValue("Item",8) into noteText -- the actual text if noteText is not "" then put item 2 of GetValue("Item",5) into placeName delete item 1 of noteText -- do this because of text commas put stripReturns(noteText) into notetext end if killWindow if goStudentStack("ask") is false then exit notebook go cd "notebook" if noteText is not "" then put placeName & return & noteText & return & return after fld "notes" end if unlock screen with iris open else -- must be Cancel killWindow end if end NoteBook function stripReturns string repeat get last char of string if it = return then delete last char of String else exit repeat end repeat return string end stripReturns -- this handler is called from all stacks on Snapshot -- closeSSPanel setWindow 1 NewWindow 290,222,centered,0,1,"Snapshot Dialog",visible put "Student Services" & return & "Snapshot" into theText NewItem StaticText,59,6,192,48,theText,"B garamond bold",20,plain -- item 1 NewItem RectButton,17,8,61,45, "NotActive",26475,"dontinvert",empty,noColor,"","" -- bookmark graphic item 2 NewItem Rectangle,0,53,290,54,1 -- item 3, decorative rule NewItem StaticText,24,60,157,79, "Snapshot in:",Garamond,16,plain -- item 4 NewItem StaticText,24+3,79,260,95, makeStamp(),"Chicago",12,plain -- item 5 NewItem Rectangle,24,78,268,97,1 --Item 6 NewItem StaticText,24,103,268,123, "Snapshot name (optional):",Garamond,16,plain -- item 7 NewItem EditText,24,120,268,141, empty,"Chicago",12,plain,noScroll,hasCursor -- item 8 NewItem RoundButton,24,161,140,187, "Take Snapshot",13,noCommand,"" -- item 8 NewItem RoundButton,152,164,268,184 , "Print Card",14,noCommand,"" -- item 9 -- pch fix 7/31/90 NewItem RoundButton,24,196,140,216, "View Snapshots",14,noCommand,"" -- item 10 NewItem RoundButton,152,196,268,216, "Cancel",charToNum("."),Command,"" -- item 11 set cursor to arrow get Display (180,1) -- Kill the window after a timeout if it = "timeout" then -- delete last item of whereWeCameFrom killWindow return "cancel" end if -- if it didn't time out, see what the user chose put item 4 of it into userPicked if userPicked is "Take snapshot" then -- take snapshot set cursor to watch put item 2 of GetValue("Item",5) into shotName get item 2 of getValue("Item",8) if it is not "" then put " ‚Ä¢ " & it after shotName killWindow makeSnapShot shotName else if userPicked is "Print Card" then -- pch fix 7/31/90 domenu "print card" -- print screen killWindow else if userPicked is "View Snapshots" then -- new snapshot disk killWindow bequiet get goSnapshot() else -- must be Cancel killWindow end if end Snapshot on makeSnapShot shotName set cursor to watch beQuiet unlock screen -- for refresh, since we're taking a picture of it lock screen CopyScreen if goSnapshot() is true then go last cd send "takeSnapShot shotName" to this bg end if end makeSnapshot function makeStamp -- make a module,date and time stack for bookmarks,snapshots and notes put the short name of this stack into stamp put the short date into today get the number of chars in today delete char (it-2) to it of today -- don't need the year put " ‚Ä¢" && today && "at " after stamp put the time into timeStamp get the number of chars in timeStamp put char (it-1) to it of timeStamp into tod if tod = "PM" then put "pm" into tod else if tod = "AM" then put "am" into tod put tod into char (it-1) to it of timeStamp put timeStamp after stamp return stamp end makeStamp on killWindow -- free memory (temporary, until killAll works) ** SetWindow 1 NewWindow 50,50,centered,0,1,"",invisible go this cd -- kvs added to refresh screen end killWindow -- MAP on Map -- closeSSPanel global gToTheMap set cursor to watch put getCardName() into gToTheMap lock screen go "MF Map" unlock screen with iris open end Map --- HELP on Help -- closeSSPanel push card lock screen go stack "MF Help" unlock screen with iris open send openAction to this cd end Help on Glossary -- closeSSPanel push card lock screen go to card "GlossaryBrowser" of stack "MF Glossary" unlock screen with iris open end Glossary on refresh put the lockscreen into saveL unlock screen go this Cd set the lockscreen to saveL end refresh -- end of student options --/ for selfassessments --/ All Sell-Assessment backgrounds should be named starting with "√ü√•" on closeBackground global gBackgroundName put the short name of this bg into gBackgroundName end closeBackground on openBackground global gBackgroundName,gStackName,SAEvalData,gNoDisk if gBackgroundName is not empty and SAEvalData is not empty then if char 1 to 2 of gBackgroundName is "√ü√•" and char 1 to 2 of the short name of this bg is not "√ü√•" then if gNoDisk is not "true" then put the short name of this cd into finalcardname put the short name of this stack into gStackName doWarning -- if they are using a student disk, put up msg refresh if goStudentStack() is "true" then go to cd report send listResults to this card go to cd finalCardname of gstackname end if killWarning end if end if end if end openBackground on doWarning if the number of cd flds > 0 then if findField("Warning") is not false then show cd fld "Warning" unlock screen exit doWarning end if end if lock screen put makeLines( "", "Saving the results of your Self-Assessment...", "please wait.") into menuList makeCardField name, "Warning", width, 320, height,82, topLeft, "92,78", lockText, true, textFont, "eras demi", textSize,14,style, "shadow", textalign, left, wideMargins,true put menuList into last cd fld put "on mouseUp" & return & "hide me" & return & "end mouseUp" into string set the script of last cd fld to string choose browse tool unlock screen end doWarning on killWarning if the short name of last cd fld is "Warning" then select cd fld "warning" domenu "clear field" choose browse tool end if end killWarning --/ end selfassessments function gostudentStack optAsk global gStudentStackName,gNoDisk,gStudentName -- optAsk will override the gNoDisk so they can add the disk at this tiem if optAsk is "" and gNoDisk is true then exit goStudentStack bequiet if gStudentStackName is "" then put "Student Disk:MF Student Stack" into gStudentStackName end if if fileExists(gStudentStackName) then go gStudentStackName return "true" else put "You need your Student Disk to save your work." && "If you want to use it, insert it into the drive then " & "click ‚ÄúOK.‚Äù" into string answer string with "No disk" or "OK" if it is "No disk" then put "true" into gNoDisk return "false" -- no student disk else if it is "OK" then go gStudentStackName -- just have to have a dialog box if the result is "" then get checkName() if it is true then put "false" into gNoDisk return "true" -- found it on the second try end if end if end if -- if you get here, it's due to a bad student disk or cancel. refresh put "true" into gNoDisk return "false" end if end gostudentStack function checkName global gStudentName if name of this bg is not "student stack" then go back ejectDisk 1 put "This is not a Student Disk." && "It won‚Äôt be possible to save your work." into string answer string with "OK" return "false" end if put fld "global" of cd "gStudentName" into savedName if savedName is "" then -- new stack put gStudentName into fld "global" of cd "gStudentName" return "true" end if if savedName is not gStudentName then answer "Is your name ‚Äú" & savedName & "?‚Äù" with "Wrong name" or "Yes" if it is "Wrong name" then ejectDisk 1 return false -- no match else put savedName into gStudentName -- change the global to match the disk return true end if end if return true -- they matched end checkName function goNotebook if goStudentStack("") is "true" then go cd "notebook" return true else return false end if end goNotebook function goSnapshot bequiet put "Student Disk:Snapshot" into snapName if fileExists(snapName) then go snapName return "true" else put "You need your Student Disk for snapshots. Please " && "insert it into the drive and click the ‚ÄúOK‚Äù button below." into string answer string with "No disk" or "OK" if it is "OK" then -- try again if fileExists(snapName) then go snapName return "true" else put "Sorry, can‚Äôt locate the Student Disk." into string answer string with "OK" return "false" end if else -- answered no disk return "false" end if end if end goSnapshot on closeSSPanel if there is a window "Student Services" then close window "Student Services" end closeSSPanel