WNGZWZSC0110(gaab25gJ..@@in9$TFFiles/55+ TFFiles/55 Play.wkz>0/-@//-@/?9< g Show NotesI99 g Hide Notes?99??9< g Show Notesb9R g Hide Notes  ?99??9{ 61";`@?o@T@ g Show GraphZ9J " g Hide Graph?99?9?-?9@About Test FlightOK@ (@j!don mouseup if tf.scz:bMotifNotice quit dialog box else call tf.scz:motifnotice()end if end mouseup?6 Test Flight v1.1, Wingz Demoh@h H' Developed by:hfffff@ ? Steve Cloutier & Curtis Marsdenhgffff֦@@- Contributors:ȟ@̬@HB iego1h@ Doug Edwards, Jeannie O'Connell,h̬@ @HB iego2h< Mike McCamon, and Bill Voghth @fffff@HB iego3hA -Ported to the OSF/Motif graphical environmenthpHBB iego4h% by Curtis MarsdenhHBB iego5hT @Copyright 1988-90, Informix Software Inc. All Rights Reserved.hg9 iego6hQ =Informix and HyperScript are registered trademarks, and Wingzhg9 iego7hH 4and Test Flight are trademarks of Informix Software.hg9 iego8hB6!0on mouseup call tf.scz:motifnotice() end mouseupM 3The following resources must be defined as follows:ȟ@HBBjeffvi motiftxt0hB (Keyboard Focus Policy: h{@HBvUBi motiftxt1h' Mwm*focusAutoRaise:(@  HBBjeffvi motiftxt5h) Mwm*positionOnScreen:H@  HBBjeffvi motiftxt7h( Mwm*clientAutoPlace:h@  HBBjeffvi motiftxt9h( Mwm*positionIsFrame:@  HBBjeffvi motiftxt11h( Mwm*startupKeyFocus:@  HBBjeffvi motiftxt13h% Mwm*autoKeyFocus:@  HBBjeffvi motiftxt15h9 Pointer Explicitx {@HBvUBi motiftxt2h6 False TrueP@(  HBBjeffvi motiftxt6h7 False FalseP@H  HBBjeffvi motiftxt8h7 False FalseP@h  HBBjeffvi motiftxt10h6 True TrueP@  HBBjeffvi motiftxt12h6 False TrueP@  HBBjeffvi motiftxt14h6 False TrueP@  HBBjeffvi motiftxt16h1J19? @? @?.  ego5v0@?0@?.  motiftxt5w?1)@Quit Test Flight$OK@ \@!tf.scz:quitFlag = 1)Cancel@ @\@ % Quit Test Flight?h H?9?.??.?7@433333@.? @.?7@(\?.{Gz?HzG?.q= ףp?@Q@.{Gz?(\ @.q= ףp?@?.?@.?@?.?@.?@?.Q?@.?@@.Q? @.?@?.?333333@.433333??< (\???.Y@Q@??.l@ oAI Test Flight???.@@??.@9(" ???? ?9=:!4on repaint call tf.scz:drawtriangle(1) end repaint@9=:!4on repaint call tf.scz:drawtriangle(3) end repaint@9=:!4on repaint call tf.scz:drawtriangle(4) end repaint7@9>;!5on repaint call tf.scz:drawtriangle(23) end repaint $  $$$ $  $$ :P-A $)$ bAg99 helvetica H9! timesBHB9 helvetica HBB9% helvetica BHBBjeff9+ helvetica BNTB249! timesB" helveticaB Art1.wkz9) TFFiles/Art1.wkz5Art2.wkz9\ 9%inArt2.wkz?& TFFiles/Art2.wkz5@Art3.wkz9\ 9%inArt3.wkz?& TFFiles/Art3.wkz5Art4.wkz9\ 9%inArt4.wkz?& TFFiles/Art4.wkz5jArt5.wkz9Y 9%inArt5.wkz? & TFFiles/Art5.wkz5! out Blank.wkz ?9# outArt1.wkz ?9# outArt2.wkz ?9# outArt3.wkz ?9# outArt4.wkz ?9# outArt5.wkz TFFiles/Fun.wkz5!   TestFlgt.wkz5 TFFiles/Charts.wkz5  TestFlgt.wkz5  TestFlgt.wkz5! TFFiles/USA.wkz5 TFFiles/East.wkz5 TFFiles/Midwest.wkz5 TFFiles/West.wkz5 TFFiles/Europe.wkz5 TFFiles/Britain.wkz5 TFFiles/Germany.wkz5 TFFiles/France.wkz5 in Blank.wkzin WrldWide.wkz!   TFFiles/55 ! out Blank.wkz! TFFiles/WrldWide.wkz5 TFFiles/USA.wkz5 TFFiles/East.wkz5  TFFiles/Midwest.wkz5 TFFiles/West.wkz5 TFFiles/Europe.wkz5  TFFiles/Britain.wkz5  TFFiles/Germany.wkz5 TFFiles/France.wkz5! TFFiles/Business.wkz5! Cl?Cl@> ףp^@#5@55 5?)9(97   5@5  6@>ntf.scz:result = (55@5)5@9/55c@9/55C@9/55#@9/55@9*55c@9*55C@9*55#@9*55"    9 0 w   Enter amount of Loan in dollars: .@      9 0 ,Y@@&Enter annual interest rate in percent:@-Y@    9 0oEnter term of loan in months:@  9 0m@Enter monthly payment:$@  :*? :*?:*?:*?@SS6S6S6S6S6S6S6X96 OX9S6S6S6S6S6S6S6S6 OSX96S6S6S6S6S6S6S6 OSS6S6X96S6S6S6S6S6 OSS6S6S6X96S6S6S6S6 OSS6S6S6S6X96S6S6S6 OSS6S6S6S6S6X96S6S6 OSS6S6S6S6S6S6X96S6 OSS6X96S6S6S6S6S6S6 OSS6S6S6S6X96S6S6S6 OSS6S6S6S6S6S6X96S6 OSX96S6S6S6S6S6S6O96 O?/SS6S6S6X96S6S6S6O96 O?/SS6S6S6S6S6X96S6O96 O?/SS6S6X96S6S6S6S6O96 O?/X9S6S6S6S6S6S6X96O96 OSS6X96S6S6X96S6S6O96 OO9O9S6 OSO96 OO9S6 OSO96 OUO9S6 O*SO96 OO9UO9S6 O*SO96 OO9O9S6 OSO96 OO9S6 OUSO96 O*O9S6 OO9UO9S6 O*SO96 OO9*O9S6 OO9O9S6 OO9S6 OUSO96 O*O9S6 OO9*O9S6 OO9O9S6 OUO9S6 O*O9S6 OX9X9S6 OSX96 OX9S6 OSX96 OUX9S6 O*SX96 OX9USX96 O*SX96 OX9X9S6 OSX96 OX9S6 OSX96 OUX9S6 O*SX96 OX9UX9S6 O*SX96 OX9*X9S6 OX9X9S6 OSX96 OX9S6 OUX9S6 O*SX96 OX9*SX96 OX9SX96 OX9S6 OUX9S6 O*SX96 O.-?>-@>7@*@*@*@)  )*)*SOO )*    )*.4..?9    Helvetica$ Bious -9X9X96X96<#Congratulations! You won!?-UO9O96O96> #Sorry, Wingz won. Try again!?-X9X96X96<#Congratulations! You won!?-O9O96O96> #Sorry, Wingz won. Try again!?-CX9X96X96<#Congratulations! You won!?-O9O96O96> #Sorry, Wingz won. Try again!?-X9X96X96<#Congratulations! You won!?-3O9O96O96> #Sorry, Wingz won. Try again!?-X9X96X96<#Congratulations! You won!?-}O9O96O96> #Sorry, Wingz won. Try again!?-!X9X96X96<#Congratulations! You won!?-O9O96O96> #Sorry, Wingz won. Try again!?-kX9X96X96<#Congratulations! You won!?-O9O96O96> #Sorry, Wingz won. Try again!?-X9X96X96<#Congratulations! You won!?-[O9O96O96; #Sorry, Wingz won. Try again!?-S9S96S96S96S96S96S96S96S96@#Cat game. Play again.@-?.-?9-@97 ?0-  *?*?*?tf.sczdgwindowSettings tfbanneraboutFStextformat addcbwtri pathRoot windowMoveArt2Art3Art4Art5winScaleAndSizewinLocinputamountdgaskinttermpymnttotaldoit shownotewinclrywonwwoncatwonfrmt opentestHaitham toolstateexit artnotesb1 pathRoot loadFlag quitFlag currentSheetArt1 Art2 Art3 Art4 Art5 scrWidth scrHeight winWidth winHeightdmfrancyenpoundformularesultwasoplastcurinputamountintpymnttermtotaldoit str1!str2"ssn#spouse$str3% taxMenuFlag&player'go(c)r*c1+r1,won-rep.nmove/flag0 bMotifNotice1assignWindowValues windowMove5windowSettingswinScaleAndSizewinLoc ShowNote ShowNotePnt ShowGraph tooltoggle tfnoticeH motifnoticequitTF} tfbannerw addcbwtridrawtriangleaboutFStextformatrgoArtcloseArtSheetscloseChartSheetscloseTechGraphSheetscloseFunSheets,closeBusinessSheetsJloadLinkedSheetshgoLinkcloseLinkedSheetsclatorrates(recalc*doop+ putchar+ convert+amtv-intrst.trm.pymtA/ calculate/ getname/3 getaddr4 getcity66getssn7fundi9sfund;status< getinput@ taxmenu@compGfrmtYwin Zclr`catwon"aywonNawwonza{ OPEN TEST FOR LOADING SCRIPT TF.SCZ } function opentest() end function {opentest} { ******** OPEN TEST FOR LOADING SCRIPT TF.SCZ END ******** } { VARIABLES } DEFINE Haitham {A new variable added by Haitham to get around a temporary Wingz BUG} Haitham = TRUE(); {Initially set to FALSE, will be reset only once in the beginning.} define toolstate,exit,artnotes,b1,pathRoot,loadFlag, { Misc variables } quitFlag,currentSheet,Art1,Art2,Art3,Art4,Art5 define scrWidth,scrHeight,winWidth,winHeight { Window display variables } define dm,franc,yen,pound,formula,result,wasop,lastcur { Calculator variables } define input,amount,int,pymnt,term,total { Loan variables } define doit,str1,str2,ssn,spouse,str3,taxMenuFlag { Taxes variables } define player,go,c,r,c1,r1,won,rep,nmove,flag { Tic tac toe variables } define bMotifNotice {flag for Motif notice box} { ******** VARIABLES END ******** } { WINDOW DISPLAY SETTINGS } function assignWindowValues() scrWidth = deskleft() + deskright() scrHeight = desktop() + deskbottom() winWidth = 13292 winHeight = 8511 end function {assignWindowValues} { ******** WINDOW DISPLAY SETTINGS END ******** } { NAVIGATION } function windowMove(direction,whichSheet) if direction = "in" open pathRoot & "TFFiles/" & whichSheet call tf.scz:windowSettings() else go to window pathRoot & "TFFiles/" & whichSheet window location (-20 inches,-20 inches) close now end if IF (whichSheet <> "Play.wkz") unselect END IF end function {windowMove} { Following 3 functions do not perform the same commands as on the Mac platform, where more than 1 screen size is accounted for. Redundencies and non- functionality below are insignificant. This approach was much easier than eliminating them since they are called from various locations.} function windowSettings() REPAINT OFF; window size (winWidth,winHeight) window location ( (((scrWidth - winWidth)/2) - deskleft()), (((scrHeight - winHeight)/2) - desktop()) ) REPAINT ON; end function {windowSettings} function winScaleAndSize() end function {winScaleAndSize} function winLoc() call tf.scz:windowSettings() end function {winLoc} { ******** NAVIGATION END ******** } { SHOW & HIDE } function ShowNote(objnum,statenum) define n n = statenum if n = 1 repaint off hide notes select object objnum show control name "Show Notes" unselect repaint window repaint on elseif n = 0 repaint off show notes select object objnum show control name "Hide Notes" unselect repaint objects repaint on end if if statenum = 1 n = 0 elseif statenum = 0 n = 1 end if return n end function {ShowNote} function ShowNotePnt(buttonnum,fieldnum,statenum) define n n = statenum if n = 1 repaint off hide notes select object buttonnum show control name "Show Notes" unselect repaint window repaint on elseif n = 0 repaint off show notes select object buttonnum show control name "Hide Notes" unselect repaint object buttonnum repaint object fieldnum unselect repaint on end if if statenum = 1 n = 0 elseif statenum = 0 n = 1 end if return n end function {ShowNotePnt} function ShowGraph(objnum,statenum,chartnum,location) define n n = statenum if n = 1 repaint off select object chartnum object location frac(A35..I60,128,1,255,82) select object objnum show control name "Show Graph" unselect repaint window repaint on elseif n = 0 repaint off select object chartnum run location select object objnum show control name "Hide Graph" unselect repaint objects repaint on end if if statenum = 1 n = 0 elseif statenum = 0 n = 1 end if return n end function {Show Graph} { ******** SHOW & HIDE END ******** } { MISC } function tooltoggle() if toolstate = 0 toolstate = 1 elseif toolstate = 1 toolstate = 0 else toolstate = 0 end if end function {tooltoggle} { ******** MISC ******** } { DIALOGS/NOTICES } function tfnotice() new modal dialog box at (-1,-1)(5.2 inch,4.75 inch) name dialog box "About Test Flight" add push button "OK" at (2 inch,4.45 inch)(3 inch,4.65 inch) { dialog default push button } script "on mouseup"& " if tf.scz:bMotifNotice "& "quit dialog box "& " else "& " call tf.scz:motifnotice()"& "end if "& "end mouseup" call tf.scz:tfbanner(.5) add text "Test Flight v1.1, Wingz Demo" at (.25 inch,1.33 inch)(4.75 inch,1.85 inch) call tf.scz:aboutFStextformat("H") add text "Developed by:" at (.25 inch,1.78 inch)(4.75 inch,2.1 inch) call tf.scz:aboutFStextformat(0) add text "Steve Cloutier & Curtis Marsden" at (.25 inch,2.03 inch)(4.75 inch,2.3 inch) call tf.scz:aboutFStextformat(0) add text "Contributors:" at (.25 inch,2.36 inch)(4.75 inch,2.56 inch) call tf.scz:aboutFStextformat("HB") control name "ego1" hide control name add text "Doug Edwards, Jeannie O'Connell," at (.25 inch,2.56 inch)(4.75 inch,2.76 inch) call tf.scz:aboutFStextformat("HB") control name "ego2" hide control name add text "Mike McCamon, and Bill Voght" at (.25 inch,2.76 inch)(4.75 inch,2.96 inch) call tf.scz:aboutFStextformat("HB") control name "ego3" hide control name add text "Ported to the OSF/Motif graphical environment" at (.25 inch,3.1 inch)(4.75 inch,3.3 inch) call tf.scz:aboutFStextformat("HBB") control name "ego4" hide control name add text "by Curtis Marsden" at (.25 inch,3.3 inch)(4.75 inch,3.5 inch) call tf.scz:aboutFStextformat("HBB") control name "ego5" hide control name add text "Copyright 1988-90, Informix Software Inc. "& "All Rights Reserved." at (.25 inch,3.65 inch)(4.75 inch,3.85 inch) call tf.scz:aboutFStextformat("g9") control name "ego6" hide control name add text "Informix and HyperScript are registered trademarks, and Wingz" at (.25 inch,3.85 inch)(4.75 inch,4.05 inch) call tf.scz:aboutFStextformat("g9") control name "ego7" hide control name add text "and Test Flight are trademarks of Informix Software." at (.25 inch,4.05 inch)(4.75inch,4.25 inch) call tf.scz:aboutFStextformat("g9") control name "ego8" hide control name add push button "" at (0inch, 0 inch) (0inch ,0inch) {fill bg red() } text style "B" script "on mouseup call tf.scz:motifnotice() end mouseup" add text "The following resources must be defined as follows:" at (.25 inch,2.36 inch)(4.75 inch,4.25 inch) call tf.scz:aboutFStextformat("HBBjeff") hide control control name "motiftxt0" hide control name add text "Keyboard Focus Policy: " at (.25 inch, 2.65 inch)+(2.5 inch, .3 inch); call tf.scz:aboutFStextformat("HB") hide control; align left; TEXT SIZE 14; text style "UB"; control name "motiftxt1" hide control name add text "Mwm*focusAutoRaise:" at (.5 inch, 3.05 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt5" hide control name add text "Mwm*positionOnScreen:" at (.5 inch, 3.25 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt7" hide control name add text "Mwm*clientAutoPlace:" at (.5 inch, 3.45 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt9" hide control name add text "Mwm*positionIsFrame:" at (.5 inch, 3.65 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt11" hide control name add text "Mwm*startupKeyFocus:" at (.5 inch, 3.85 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt13" hide control name add text "Mwm*autoKeyFocus:" at (.5 inch, 4.05 inch)+(2 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt15" hide control name; add text "Pointer Explicit" at (2.75 inch, 2.65 inch)+(2.25 inch, .3 inch); call tf.scz:aboutFStextformat("HB") hide control; TEXT SIZE 14; text style "UB"; align left; control name "motiftxt2" hide control name { add text "False True" at (2.9 inch, 2.85 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt4" hide control name} add text "False True" at (2.9 inch, 3.05 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt6" hide control name add text "False False" at (2.9 inch, 3.25 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt8" hide control name add text "False False" at (2.9 inch, 3.45 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt10" hide control name add text "True True" at (2.9 inch, 3.65 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt12" hide control name add text "False True" at (2.9 inch, 3.85 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt14" hide control name add text "False True" at (2.9 inch, 4.05 inch)+(2.25 inch, .2 inch); call tf.scz:aboutFStextformat("HBBjeff"); hide control; align left; control name "motiftxt16" hide control name bMotifNotice = 0 use dialog box; return (TRUE()) end function {tfnotice} function motifnotice() define i; if bMotifNotice = 0 { select control "Press Here For Important Note To Motif Users" control name "Hide Note" } for i = 1 to 8 select control "ego"&i; hide control end for; for i = 0 to 16 select control "motiftxt"&i; show control end for end if bMotifNotice = 1 end function {motifnotice} function quitTF() new modal dialog box at (-1,-1)(4 inch,2.77 inch) name dialog box "Quit Test Flight" add push button "OK" at (.875 inch,2.31 inch)(1.875 inch,2.61 inch) dialog default push button script "tf.scz:quitFlag = 1" add push button "Cancel@" at (2.125 inch,2.31 inch)(3.125 inch,2.61 inch) dialog cancel push button call tf.scz:tfbanner(0) add text "Quit Test Flight?" at (.25 inch,1.55 inch)(3.75 inch,1.95 inch) call tf.scz:aboutFStextformat("H") use dialog box if quitFlag = 1 quit now end if end function {quitTF} function tfbanner(x) call tf.scz:addcbwtri(0,.55 + x,.5,1.1 + x,.9,23) call tf.scz:addcbwtri(0,2.9 + x,.5,3.45 + x,.9,23) call tf.scz:addcbwtri(0,.78 + x,.32,1.33 + x,1.09,4) call tf.scz:addcbwtri(0,2.69 + x,.32,3.22 + x,1.09,4) call tf.scz:addcbwtri(0,1.05 + x,.4,2.25 + x,1.05,4) call tf.scz:addcbwtri(0,1.75 + x,.4,2.95 + x,1.05,4) call tf.scz:addcbwtri(0,.75 + x,.33,2 + x,1.1,3) call tf.scz:addcbwtri(0,2 + x,.33,3.25 + x,1.1,3) call tf.scz:addcbwtri(0,1.35 + x,.2,2.65 + x,1.2,1) add custom button at (1.285 inch + x inch,.43 inch)(2.715 inch + x inch,.73 inch) fill bg rgb(255,255,255) add text "Test Flight" at (1.3 inch + x inch,.48 inch)(2.7 inch + x inch,.7 inch) fill pattern 0 call tf.scz:aboutFStextformat(0) end function {tfbanner} function addcbwtri(R,a,b,c,d,e) if R = 0 add custom button at (a inch,b inch)(c inch,d inch) else add custom button range frac(R,a,b,c,d) end if no line border fill pattern 0 if e = 1 script "on repaint call tf.scz:drawtriangle(1) end repaint" end if if e = 3 script "on repaint call tf.scz:drawtriangle(3) end repaint" end if if e = 4 script "on repaint call tf.scz:drawtriangle(4) end repaint" end if if e = 23 script "on repaint call tf.scz:drawtriangle(23) end repaint" end if end function {addcbwtri} function drawtriangle(x) square window (0,0)(10,10) open polygon move (5,0) draw (0,10) draw (10,10) draw (5,0) close polygon fill fg 960541 fill pattern x fill polygon kill polygon end function {drawtriangle} function aboutFStextformat(x) align center no line border text color rgb(53,12,149) if x = "g9" text font "helvetica" text size 10 elseif x = "H" text font "times" text size 24 text style "B" elseif x = "HB" text font "helvetica" text size 12 elseif x = "HBB" text font "helvetica" text size 12 text style "B" elseif x = "HBBjeff" text font "helvetica" text size 12 text style "B" text color black() elseif x = "TB24" text font "times" text size 24 text style "B" else text font "helvetica" text size 14 text style "B" end if end function {aboutFStextformat} { ******** DIALOGS/NOTICES END ******** } { LOAD/UNLOAD SHEETS } { Most of these functions are leftovers from the NeXT platform where group loads and unloads of sheets were employed. The once present "loadSheets" functions have been removed since they were called relatively few times and the hard code has been changed in the appropriate Test Flight buttons. The "closeSheets" functions, however, were called from within many buttons, so it was easier to redefine what these functions do rather than changing the code within all the buttons. The exception here is for the linked worksheets from the "We're in Business" section, which must all be open simultaneously.} function goArt(artSheet) window location (-20 inches,-20 inches) if artSheet = "Art1.wkz" go to window tf.scz:pathRoot & "TFFiles/Art1.wkz" call tf.scz:windowSettings() elseif artSheet = "Art2.wkz" if Art2 = 0 call tf.scz:windowMove("in","Art2.wkz") tf.scz:Art2 = 1 else go to window tf.scz:pathRoot & "TFFiles/Art2.wkz" call tf.scz:windowSettings() end if elseif artSheet = "Art3.wkz" if Art3 = 0 call tf.scz:windowMove("in","Art3.wkz") tf.scz:Art3 = 1 else go to window tf.scz:pathRoot & "TFFiles/Art3.wkz" call tf.scz:windowSettings() end if elseif artSheet = "Art4.wkz" if Art4 = 0 call tf.scz:windowMove("in","Art4.wkz") tf.scz:Art4 = 1 else go to window tf.scz:pathRoot & "TFFiles/Art4.wkz" call tf.scz:windowSettings() end if elseif artSheet = "Art5.wkz" if Art5 = 0 call tf.scz:windowMove("in","Art5.wkz") tf.scz:Art5 = 1 else go to window tf.scz:pathRoot & "TFFiles/Art5.wkz" call tf.scz:windowSettings() end if end if end function {goArt} function closeArtSheets() break off window location (-20 inches,-20 inches) call tf.scz:windowMove("out","Blank.wkz") if Art1 = 1 Art1 = 0 call tf.scz:windowMove("out","Art1.wkz") end if if Art2 = 1 Art2 = 0 call tf.scz:windowMove("out","Art2.wkz") end if if Art3 = 1 Art3 = 0 call tf.scz:windowMove("out","Art3.wkz") end if if Art4 = 1 Art4 = 0 call tf.scz:windowMove("out","Art4.wkz") end if if Art5 = 1 Art5 = 0 call tf.scz:windowMove("out","Art5.wkz") end if go to window tf.scz:pathRoot & "TFFiles/Fun.wkz" break on end function {closeArtSheets} function closeChartSheets() go to window tf.scz:pathRoot & "TestFlgt.wkz" end function {closeChartSheets} function closeTechGraphSheets() go to window tf.scz:pathRoot & "TFFiles/Charts.wkz" end function {closeTechGraphSheets} function closeFunSheets() go to window tf.scz:pathRoot & "TestFlgt.wkz" end function {closeFunSheets} function closeBusinessSheets() go to window tf.scz:pathRoot & "TestFlgt.wkz" end function {closeBusinessSheets} function loadLinkedSheets() break off open tf.scz:pathRoot & "TFFiles/USA.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/East.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/Midwest.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/West.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/Europe.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/Britain.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/Germany.wkz" call tf.scz:winScaleAndSize() open tf.scz:pathRoot & "TFFiles/France.wkz" call tf.scz:winScaleAndSize() call tf.scz:windowMove("in","Blank.wkz") call tf.scz:windowMove("in","WrldWide.wkz") break on end function {loadLinkedSheets} function goLink(linkedSheet) window location (-20 inches,-20 inches) go to window tf.scz:pathRoot & "TFFiles/" & linkedSheet call tf.scz:winLoc() end function {goLink} function closeLinkedSheets() break off window location (-20 inches,-20 inches) call tf.scz:windowMove("out","Blank.wkz") go to window tf.scz:pathRoot & "TFFiles/WrldWide.wkz" close now go to window tf.scz:pathRoot & "TFFiles/USA.wkz" close now go to window tf.scz:pathRoot & "TFFiles/East.wkz" close now go to window tf.scz:pathRoot & "TFFiles/Midwest.wkz" close now go to window tf.scz:pathRoot & "TFFiles/West.wkz" close now go to window tf.scz:pathRoot & "TFFiles/Europe.wkz" close now go to window tf.scz:pathRoot & "TFFiles/Britain.wkz" close now go to window tf.scz:pathRoot & "TFFiles/Germany.wkz" close now go to window tf.scz:pathRoot & "TFFiles/France.wkz" close now go to window tf.scz:pathRoot & "TFFiles/Business.wkz" break on end function {closeLinkedSheets} { ******** LOAD/UNLOAD SHEETS END ******** } { CALCULATOR } function clator() define xoff, yoff dm = 1.749 franc = 5.976 yen = 123.21 pound = 0.5486 formula = "" wasop = 1 lastcur = 1 xoff = 0 yoff = 200 new modal dialog box at (-1,-1) (4800,5400) name dialog box "Int'l Calculator" add push button "1" at (1700+xoff,3000+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""1"") end mousedown" add push button "2" at (2450+xoff,3000+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""2"") end mousedown" add push button "3" at (3200+xoff,3000+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""3"") end mousedown" add push button "4" at (1700+xoff,2300+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""4"") end mousedown" add push button "5" at (2450+xoff,2300+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""5"") end mousedown" add push button "6" at (3200+xoff,2300+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""6"") end mousedown" add push button "7" at (1700+xoff,1600+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""7"") end mousedown" add push button "8" at (2450+xoff,1600+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""8"") end mousedown" add push button "9" at (3200+xoff,1600+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""9"") end mousedown" add push button " 0 " at (1700+xoff,3700+yoff)+(1400,600) script "on mousedown call tf.scz:putchar(""0"") end mousedown" add push button "." at (3200+xoff,3700+yoff)+(650,600) script "on mousedown call tf.scz:putchar(""."") end mousedown" add push button "C" at (1700+xoff,900+yoff)+(650,600) script "on mousedown tf.scz:formula = """" field text ""0"" select field text from 32767 to 32767 tf.scz:wasop = 1 end mousedown" add push button "^" at (2450+xoff,900+yoff)+(650,600) script "on mousedown call tf.scz:doop(""^"") end mousedown" add push button "/" at (3200+xoff,900+yoff)+(650,600) script "on mousedown call tf.scz:doop(""/"") end mousedown" add push button "*" at (3950+xoff,900+yoff)+(650,600) script "on mousedown call tf.scz:doop(""*"") end mousedown" add push button "-" at (3950+xoff,1600+yoff)+(650,600) script "on mousedown call tf.scz:doop(""-"") end mousedown" add push button "+" at (3950+xoff,2300+yoff)+(650,600) script "on mousedown call tf.scz:doop(""+"") end mousedown" add push button "=" at (3950+xoff,3000+yoff)+(650,1300) script "on mousedown call tf.scz:recalc() end mousedown" add push button "(" at (200+xoff,900+yoff)+(650,600) script "on mousedown call tf.scz:doop(""("") end mousedown" add push button ")" at (950+xoff,900+yoff)+(650,600) script "on mousedown call tf.scz:doop("")"") end mousedown" add field at (200+xoff,300+yoff)+(4400,400) field justification right field text "0" select field text from 32767 to 32767 add radio button "Dollar","DM","Franc","Yen","Pound" at (200+xoff,2300+yoff)+(1400,2000) no line border script "on mousedown call tf.scz:convert() end mousedown" add push button "Ex.Rate..." at (200+xoff,1600+yoff)+(1400,600) script "on mousedown call tf.scz:rates() end mousedown" add push button "Quit Calculator" at (200+xoff,4550+yoff) +(4400, .35 inch) dialog default push button add text "International Calculator" at (0,80)+(4800,400) align center no line border use dialog box end function function rates() new modal dialog box at (-1,-1) (4050,4500) name dialog box "Exchange Rates" { ** CONTROL 1 **} add text "Exchange Rates: $1.0 U.S. =" at (0,200)(4050,800) no line border align center { ** CONTROL 2 **} add text "DM:" at (0,950)(1000,1350) no line border align right { ** CONTROL 3 **} add field at (1200,900) (3700,1300) field text dm { ** CONTROL 4 **} add text "Franc:" at (0,1650)(1000,2050) no line border align right { ** CONTROL 5 **} add field at (1200,1600) (3700,2000) field text franc { ** CONTROL 6 **} add text "Yen:" at (0,2350)(1000,2750) no line border align right { ** CONTROL 7 **} add field at (1200,2300) (3700,2700) field text yen { ** CONTROL 8 **} add text ":" at (0,3050)(1000,3450) no line border align right { ** CONTROL 9 **} add field at (1200,3000) (3700,3400) field text pound { ** CONTROL 10 **} add push button "OK" at (450, 3850) (1900, 4300) dialog default push button script "tf.scz:dm = ctstring(3,0) tf.scz:franc = ctstring(5,0) tf.scz:yen = ctstring(7,0) tf.scz:pound = ctstring(9,0)" { ** CONTROL 11 **} add push button "Cancel@" at (2250, 3850) (3700, 4300) dialog cancel push button use dialog box end function function recalc() invalidate on formula = "tf.scz:result =" & formula & ctstring(21,0) run formula select control 21 field text result select field text from 32767 to 32767 formula = "" invalidate off end function function doop(character) if character <> "(" formula = formula & ctstring(21,0) & character else formula = formula & character end if wasop = 1 if (character = ")" or character = "(") select control 21 field text "" select field text from 32767 to 32767 end if end function function putchar(character) define string invalidate on select control 21 if wasop string = character wasop = 0 else string = ctstring(21,0) & character end if field text string select field text from 32767 to 32767 invalidate off end function function convert() define cur cur = ctvalue(22,0) if cur <> lastcur formula = "tf.scz:result = (" & formula & ctstring(21,0) & ")" case lastcur when 2 formula = formula & "/" & dm when 3 formula = formula & "/" & franc when 4 formula = formula & "/" & yen when 5 formula = formula & "/" & pound end case case cur when 2 formula = formula & "*" & dm when 3 formula = formula & "*" & franc when 4 formula = formula & "*" & yen when 5 formula = formula & "*" & pound end case run formula select control 21 field text result select field text from 32767 to 32767 formula = "" lastcur = cur end if end function { ******** CALCULATOR END ******** } { LOAN } function amt() if tf.scz:input = 0 tf.scz:amount = "0" else tf.scz:amount = round(c11,0) tf.scz:amount = dg:dgask("Enter amount of Loan in dollars:",tf.scz:amount,15) repaint off put value(tf.scz:amount) into c11 repaint on repaint range c11 unselect end if end function function intrst() if tf.scz:input = 0 tf.scz:int = "0" else tf.scz:int = string(c13*100.0,3) tf.scz:int = dg:dgask("Enter annual interest rate in percent:",tf.scz:int,6) repaint off put value(tf.scz:int)/100.0 into c13 repaint on repaint range c13 unselect end if end function function trm() if tf.scz:input = 0 tf.scz:term = "0" else tf.scz:term = string(c15,0) tf.scz:term = dg:dgask("Enter term of loan in months:",tf.scz:term,6) repaint off put value(tf.scz:term) into c15 repaint on repaint range c15 end if unselect end function function pymt() if tf.scz:input = 0 tf.scz:pymnt = "0" else tf.scz:pymnt = string(c17,2) tf.scz:pymnt = dg:dgask("Enter monthly payment:",tf.scz:pymnt,10) repaint off put value(tf.scz:pymnt) into c17 repaint on repaint range c17 unselect end if end function function calculate() define n tf.scz:total = 0 if c11 > 0 tf.scz:total = tf.scz:total + 1 end if if c13 > 0 tf.scz:total = tf.scz:total + 1 end if if c15 > 0 tf.scz:total = tf.scz:total + 1 end if if c17 > 0 tf.scz:total = tf.scz:total + 1 end if if tf.scz:total < 3 message "You must enter at least 3 numbers to calculate a fourth number!" elseif (c11>0) and (c13>0) and (c15>0) and (isnumber(c17)=0 or c17 =0) repaint off put pmt(c11,c13/12,c15) into c17 select range c17 repaint on repaint range c17 unselect elseif (c11>0) and (c13>0) and (c17>0) and (isnumber(c15)=0 or c15=0) repaint off put loanterm(c11,c17,c13/12) into c15 select range c15 repaint on repaint range c15 unselect elseif (c11>0) and (c15>0) and (c17>0) and (isnumber(c13)=0 or c13=0) repaint off put interest(c11,c17,c15)*12 into c13 repaint on repaint range c13 unselect elseif (c13>0) and (c15>0) and (c17>0) and (isnumber(c11)=0 or c11=0) repaint off put principal(c17,c13/12,c15) into c11 repaint on repaint range c11 unselect end if end function {calculate} { ******** LOAN ******** } { TAXES } function getname(n) new modal dialog box at (-1,-1) +(5.2 inch, 1.95 inch) name dialog box "Enter Name" add push button "OK" at (1.475 inch,1.45 inch)(2.475 inch,1.75 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctstring(4,0)" add push button "Cancel@" at (2.725 inch,1.45 inch)(3.725 inch,1.75 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "Enter first name & initial. If joint return, also give spouse's name & initial. Follow with last name." at (.25 inch, .1 inch) (4.95 inch, .75 inch) no line border add field at (.25 inch, .85 inch) (4.95 inch, 1.15 inch) field text n doit = 0; use dialog box if doit put " "&str1 into b8 end if end function function getaddr(n) new modal dialog box at (-1,-1) +(5 inch, 1.8 inch) name dialog box "Enter Address" add push button "OK" at (1.375 inch,1.3 inch)(2.375 inch,1.6 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctstring(4,0)" add push button "Cancel@" at (2.625 inch,1.3 inch)(3.625 inch,1.6 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "Present home address (# and street). If a P.O. Box, see page 9 of instructions." at (.25 inch, .1 inch) (4.75 inch, .6 inch) no line border add field at (.25 inch, .7 inch) (4.75 inch, 1 inch) field text n doit = 0; use dialog box if doit put " "&str1 into b10 end if end function function getcity(n) new modal dialog box at (-1,-1) +(5 inch, 1.8 inch) name dialog box "Enter City, State & Zip" add push button "OK" at (1.375 inch,1.3 inch)(2.375 inch,1.6 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctstring(4,0)" add push button "Cancel@" at (2.625 inch,1.3 inch)(3.625 inch,1.6 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "City, town or post office, state, and ZIP code." at (.25 inch, .25 inch) (4.75 inch, .6 inch) no line border add field at (.25 inch, .7 inch) (4.75 inch, 1 inch) field text n doit = 0; use dialog box if doit put " "&str1 into b12 end if end function function getssn(n,ssn) new modal dialog box at (-1,-1) +(5 inch, 2.3 inch) name dialog box "Enter SSN" add push button "OK" at (1.375 inch,1.8 inch)(2.375 inch,2.1 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctstring(4,0) tf.scz:str2=ctstring(5,0)" add push button "Cancel@" at (2.625 inch,1.8 inch)(3.625 inch,2.1 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "Enter your social security number. (Spouse's also, if applicable)." at (.25 inch, .1 inch) (4.75 inch, .6 inch) no line border add field at (.25 inch, .7 inch) (4.75 inch, 1 inch) field text n add field at (.25 inch, 1.2 inch) (4.75 inch, 1.5 inch) field text ssn doit = 0; use dialog box if doit put str1 into h8 if length(str2) >= 9 put str2 into h10 end if end if end function function fund() new modal dialog box at (-1,-1) +(5 inch, 2 inch) name dialog box "Election Fund" add push button "OK" at (1.375 inch,1.5 inch)(2.375 inch,1.8 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctvalue(4,0)" add push button "Cancel@" at (2.625 inch,1.5 inch)(3.625 inch,1.8 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "Do you want $1 to go to the Presidential Election Campaign Fund?" at (.25 inch, .1 inch) (4.75 inch, .6 inch) no line border add radio button "Yes", "No" at (1.7 inch, .75 inch) (3.3 inch, 1.15 inch) outline 2 border doit = 0; use dialog box if doit if str1=1 put "X" into f15 put " " into g15 else put "X" into g15 put " " into f15 end if end if end function function sfund() new modal dialog box at (-1,-1) +(5 inch, 2 inch) name dialog box "Election Fund" add push button "OK" at (1.375 inch,1.5 inch)(2.375 inch,1.8 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctvalue(4,0)" add push button "Cancel@" at (2.625 inch,1.5 inch)(3.625 inch,1.8 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add text "If joint return, does your spouse want $1 to go to the Presidential Election Campaign Fund?" at (.25 inch, .1 inch) (4.75 inch, .6 inch) no line border add radio button "Yes", "No" at (1.7 inch, .75 inch) (3.3 inch, 1.15 inch) outline 2 border doit = 0; use dialog box if doit if str1=1 put "X" into f16 put " " into g16 else put "X" into g16 put " " into f16 end if end if end function function status() new modal dialog box at (-1,-1) +(5 inch, 3.5 inch) name dialog box " " add push button "OK" at (1.375 inch,3 inch)(2.375 inch,3.3 inch) dialog default push button script "tf.scz:doit=1 tf.scz:str1=ctvalue(3,0)" add push button "Cancel@" at (2.625 inch,3 inch)(3.625 inch,3.3 inch) dialog cancel push button script "tf.scz:doit = 0 quit dialog box" add radio button "Single return","Married filing jointly","Married filing separate return", "Head of Household (with qualifying person)" at (.25 inch, .2 inch) (4.75 inch, 2.7 inch) show control title "Check your filing status" outline 2 border doit = 0; use dialog box if doit case str1 when 1 put "X " into b18 put " " into b20 put " " into b22 put " " into b24 when 2 put " " into b18 put "X " into b20 put " " into b22 put " " into b24 when 3 spouse = dg:dgask("Spouse's full name","",25) put " " into b18 put " " into b20 put "X " into b22 put " " into b24 put spouse into e23 when 4 spouse = dg:dgask("Child's full name","",25) put " " into b18 put " " into b20 put " " into b22 put "X " into b24 put spouse into g25 end case end if end function function getinput() tf.scz:doit = 0 define ans ans = 0 call tf.scz:shownote(37,1) ans = getname("") if tf.scz:doit = 1 ans = getaddr("") end if if tf.scz:doit = 1 ans = getcity("") end if if tf.scz:doit = 1 ans = getssn("","") end if if tf.scz:doit = 1 ans = fund() end if if tf.scz:doit = 1 ans = sfund() end if if tf.scz:doit = 1 ans = status() end if end function {getinput()} function taxmenu() debug 0 repaint off date 1 "d-mon-yyyy" date 2 "d-mon" date 3 "mon-yy" date 4 "mm-dd-yy" date 5 "mm-dd" time 1 "hr/mn/scam" time 2 "hr/mnam" time 3 "hh/mn/sc" time 4 "hh/mn" add menubar "tax" add submenu "1987forms" add menuitem "1040EZ" command "message ""1040EZ Form Can Be Installed Here.""" add menuitem "1040A" command "message ""1040A Form Can Be Installed Here.""" add menuitem "1040" command "message ""1040 Form Can Be Installed Here.""" add menuitem "W2" command "message ""W2 Form Can Be Installed Here.""" add menuitem "Tax Tables" command "message ""TAX TABLES Can Be Installed Here.""" add submenu "1988forms" add menuitem "1040EZ" command "message ""1040EZ Form Can Be Installed Here.""" add menuitem "1040A" command "message ""1040A Form Can Be Installed Here.""" add menuitem "1040" command "message ""1040 Form Can Be Installed Here.""" add menuitem "W2" command "message ""W2 Form Can Be Installed Here.""" add menuitem "Tax Tables" command "message ""TAX TABLES Can Be Installed Here.""" add submenu "1989forms" add menuitem "1040EZ" command "message ""1040EZ Form Can Be Installed Here.""" add menuitem "1040A" command "message ""1040A Form Can Be Installed Here.""" add menuitem "1040" command "message ""1040 Form Can Be Installed Here.""" add menuitem "W2" command "message ""W2 Form Can Be Installed Here.""" add menuitem "Tax Tables" command "message ""TAX TABLES Can Be Installed Here.""" add menu "File" add menuitem "Open..." key "O" command "open dialog" add menu separator add menuitem "Close" type 4 key "W" add menu separator add menuitem "Page Setup..." type 4 command "Page Setup" add menuitem "Page Preview..." type 4 command "Page Preview" add menuitem "Print..." type 4 key "P" command "hide controls Print Dialog show controls" add menu separator add menuitem "Quit" key "Q" add menu "Edit" add menuitem "Cant Undo" type 27 key "Z" command "undo" add menu separator add menuitem "Cut" key "X" add menuitem "Copy" key "C" add menuitem "Paste" key "V" add menuitem "Clear" add menu "Tax Forms" add menuitem "1987" submenu "1987forms" add menuitem "1988" submenu "1988forms" add menuitem "1989" submenu "1989forms" add menu "Process Form" add menuitem "Enter Data" command "call tf.scz:getinput()" add menuitem "Figure Tax" command "message ""Tax Computation Routines Can Be Installed Here.""" add menuitem "Print Return" command "hide controls print now show controls" show menubar "tax" repaint on end function {TaxMenu} { ******** TAXES END ******** } { TIC TAC TOE GAME } function comp() won = 0 if player = 0 wait for 2 seconds put "O" into c7 player = 3 exit function end if { end of player = 0 } if nmove = 1 if b6="O" and isblank(c6) and isblank(d6) and b7="X" and c7="O" and isblank(d7) and isblank(b8) and isblank(c8) and d8="X" put "O" into d6 nmove = 0 exit function end if if isblank(b6) and c6="X" and d6="O" and isblank(b7) and c7="O" and isblank(d7) and b8="X" and isblank(c8) and isblank(d8) put "O" into d8 nmove = 0 exit function end if if b6="X" and isblank(c6) and isblank(d6) and isblank(b7) and c7="O" and d7="X" and isblank(b8) and isblank(c8) and d8="O" put "O" into b8 nmove = 0 exit function end if if isblank(b6) and isblank(c6) and d6="X" and isblank(b7) and c7="O" and isblank(d7) and b8="O" and c8="X" and isblank(d8) put "O" into b6 nmove = 0 exit function end if end if { end of nmove = 1 } if player <> 0 if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and c7="X" put "O" into b6 exit function end if if b6="X" and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and c6="X" and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and b7="X" and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and d7="X" and isblank(b8) and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and b8="X" and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and c8="X" and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and d8="X" and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and d6="X" and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and b8="X" and isblank(c8) and isblank(d8) and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and d8="X" and isblank(c7) put "O" into c7 exit function end if if isblank(b6) and c6="X" and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and c7="O" put "O" into d6 nmove = 1 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and d7="X" and isblank(b8) and isblank(c8) and isblank(d8) and c7="O" put "O" into d8 nmove = 1 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and c8="X" and isblank(d8) and c7="O" put "O" into b8 nmove = 1 exit function end if if isblank(b6) and isblank(c6) and isblank(d6) and b7="X" and isblank(d7) and isblank(b8) and isblank(c8) and isblank(d8) and c7="O" put "O" into b6 nmove = 1 exit function end if if b6="X" and isblank(c6) and isblank(d6) and isblank(b7) and isblank(d7) and isblank(b8) and isblank(c8) and d8="X" and c7="O" put "O" into b7 exit function end if if isblank(b6) and isblank(c6) and d6="X" and isblank(b7) and isblank(d7) and b8="X" and isblank(c8) and isblank(d8) and c7="O" put "O" into d7 exit function end if if b6="O" if c6="O" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif isblank(c6) and d6="O" put "O" into c6 call tf.scz:win() exit function elseif c7="O" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(c7) and d8="O" put "O" into c7 call tf.scz:win() exit function elseif b7="O" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif isblank(b7) and b8="O" put "O" into b7 call tf.scz:win() exit function end if end if if c6="O" if c7="O" and isblank(c8) put "O" into c8 call tf.scz:win() exit function elseif isblank(c7) and c8="O" put "O" into c7 call tf.scz:win() exit function end if end if if d6="O" if c7="O" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif isblank(c7) and b8="O" put "O" into c7 call tf.scz:win() exit function elseif d7="O" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(d7) and d8="O" put "O" into d7 call tf.scz:win() exit function elseif c6="O" and isblank(b6) put "O" into b6 call tf.scz:win() exit function end if end if if b7="O" if c7="O" and isblank(d7) put "O" into d7 call tf.scz:win() exit function elseif isblank(c7) and d7="O" put "O" into c7 call tf.scz:win() exit function end if end if if d7="O" if c7="O" and isblank(b7) put "O" into b7 call tf.scz:win() exit function end if end if if b8="O" if c7="O" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif c8="O" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(c8) and d8="O" put "O" into c8 call tf.scz:win() exit function elseif b7="O" and isblank(b6) put "O" into b6 call tf.scz:win() exit function end if end if if c8="O" if c7="O" and isblank(c6) put "O" into c6 call tf.scz:win() exit function end if end if if d8="O" if d7="O" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif c8="O" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif c7="O" and isblank(b6) put "O" into b6 call tf.scz:win() exit function end if end if if b6 = "X" if c6="X" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif isblank(c6) and d6="X" put "O" into c6 call tf.scz:win() exit function elseif b7="X" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif isblank(b7) and b8="X" put "O" into b7 call tf.scz:win() exit function elseif c7="X" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(c7) and d8="X" put "O" into c7 call tf.scz:win() exit function end if end if if c6 = "X" if isblank(c7) and c8="X" put "O" into c7 call tf.scz:win() exit function elseif isblank(c8) and c7="X" put "O" into c8 call tf.scz:win() exit function end if end if if d6="X" if d7="X" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(d7) and d8="X" put "O" into d7 call tf.scz:win() exit function elseif c7="X" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif isblank(c7) and b8="X" put "O" into c7 call tf.scz:win() exit function elseif c6="X" and isblank(b6) put "O" into b6 call tf.scz:win() exit function elseif isblank(c6) and b6="X" put "O" into c6 call tf.scz:win() exit function end if end if if b7="X" if c7="X" and isblank(d7) put "O" into d7 call tf.scz:win() exit function elseif isblank(c7) and d7="X" put "O" into c7 call tf.scz:win() exit function end if end if if d7="X" if c7="X" and isblank(b7) put "O" into b7 call tf.scz:win() exit function end if end if if b8="X" if c8="X" and isblank(d8) put "O" into d8 call tf.scz:win() exit function elseif isblank(c8) and d8="X" put "O" into c8 call tf.scz:win() exit function elseif c7="X" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif b7="X" and isblank(b6) put "O" into b6 call tf.scz:win() exit function elseif isblank(b7) and b6="X" put "O" into b7 call tf.scz:win() exit function end if end if if c8="X" if isblank(c6) and c7="X" put "O" into c6 call tf.scz:win() exit function end if end if if d8="X" if isblank(b6) and c7="X" put "O" into b6 call tf.scz:win() exit function elseif d7="X" and isblank(d6) put "O" into d6 call tf.scz:win() exit function elseif c8="X" and isblank(b8) put "O" into b8 call tf.scz:win() exit function elseif isblank(c8) and b8="X" put "O" into c8 call tf.scz:win() exit function end if end if rep = 0 repaint off while won <> 1 or won <> 2 r = int(uniform(3)+6) c = int(uniform(3)+2) go to cell makecell(c,r) if isblank(range(makecell(c,r))) put "O" into makecell(c,r) go to cell a1 unselect repaint on repaint range makecell(c,r) rep = 0 call tf.scz:win() exit while else call tf.scz:win() if rep = 1 go to cell a1 repaint on repaint window end if end if end while end if end function function frmt() repaint off select range b6..d8 text font "Helvetica" text size 36 text style "Bious" align center unselect repaint on repaint range b6..d8 end function function win() unselect if won=0 if (b6="X" and c6="X" and d6="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (b6="O" and c6="O" and d6="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (b7="X" and c7="X" and d7="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (b7="O" and c7="O" and d7="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (b8="X" and c8="X" and d8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (b8="O" and c8="O" and d8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (b6="X" and b7="X" and b8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (b6="O" and b7="O" and b8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (c6="X" and c7="X" and c8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (c6="O" and c7="O" and c8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (d6="X" and d7="X" and d8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (d6="O" and d7="O" and d8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (b6="X" and c7="X" and d8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (b6="O" and c7="O" and d8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() elseif (d6="X" and c7="X" and b8="X") message "Congratulations! You won!" won = 1 call tf.scz:clr() call tf.scz:ywon() elseif (d6="O" and c7="O" and b8="O") message "Sorry, Wingz won. Try again!" won = 1 call tf.scz:clr() call tf.scz:wwon() end if if isblank(b6)=0 and isblank(b7)=0 and isblank(b8)=0 and isblank(c6)=0 and isblank(c7)=0 and isblank(c8)=0 and isblank(d6)=0 and isblank(d7)=0 and isblank(d8) = 0 message "Cat game. Play again." call tf.scz:catwon() won = 2 rep = 1 call tf.scz:clr() end if if won = 1 or won = 2 call tf.scz:frmt() flag = 1 won = 0 end if end if end function function clr() repaint off select range b6..d8 clear unselect repaint on repaint range b6..d8 end function function catwon() define scr scr = d2 scr = scr + 1 put scr into d2 end function function ywon() define scr scr = b2 scr = scr + 1 put scr into b2 end function function wwon() define scr scr = c2 scr = scr + 1 put scr into c2 end function { ******** TIC TAC TOE GAME END ******** }