Computer Science Canada

GUI Questionaire (2nd turing project)

Author:  nate [ Mon Apr 07, 2003 2:39 pm ]
Post subject:  GUI Questionaire (2nd turing project)

THIS IS MY SECOND TURING PROJECT BUT ONLY THE FIRST PART OF IT. I HAVE ONLY BEEN DOING TURING FOR 3 WEEKS SO IF ITS NOT VERY GOOD,
HAVE PITTY ON ME

code:

import GUI in "%oot/lib/GUI" %Suts up Turing for GUI commands/code
View.Set ("graphics,nobuttonbar")
View.Set ("noecho")
Window.Set (defWinID, "title:!~SECRET TRAINING~!")%Makes title at top of run screen

var score : int := 0 %Score in game
var agentname : string %Name of Agent running program
var questionfont : int := Font.New ("Arial:18:Underline")
var scorefont : int := Font.New ("Arial:14")
var titleFont :int := Font.New ("Arial:26:underline")
var headerFont :int := Font.New ("Arial:16")
var exdentframe, lineframe : int
var author : string := "By: NATE"
var authorFont : array 1 .. 30 of int
var collor :int := 0 %This is the color for the 3d text
var winID : int := 0 %This windows ID
%#1 Your height (4 ranges)
var heightcb1, heightcb2, heightcb3, heightcb4 : int %4 height checkboxes
var heightOptionS, heightOptionM, heightOptionL, heightOptionXL : boolean % Four height options
%S= <5', M = 5'1'' - 5'6'', L = 5'7'' - 6'2'' XL = > 6'2''
%#2 Your weight (4 ranges)
var weightcb1, weightcb2, weightcb3, weightcb4 : int %4 weight checkboxes
var weightOption1, weightOption2, weightOption3, weightOption4 : boolean %4 diff. weight options
%#3 Country of Origin
var origincb1, origincb2, origincb3, origincb4 : int
var originOption1, originOption2, originOption3, originOption4 : boolean
%#4 Glasses
var glassescb1, glassescb2 : int
var glassesOption1, glassesOption2 : boolean
%#5 Left or Right Handed (2 options)
var lefthandcb, righthandcb : int
var lefthandOption, righthandOption : boolean
%#6 Gun Experience
var gunexpcb1, gunexpcb2, gunexpcb3, gunexpcb4 : int
var gunexpOption1, gunexpOption2, gunexpOption3, gunexpOption4 : boolean
%#7 Military Training (2 options)
var miltrcb1, miltrcb2 : int
var miltrOption1, miltrOption2 : boolean
%#8 Shot Positioning Question (4 options)
var shotqueOption1, shotqueOption2, shotqueOption3, shotqueOption4 : boolean
var shotquecb1, shotquecb2, shotquecb3, shotquecb4 : int
%#9 Gun Question (4 options)
var gunqueOption1, gunqueOption2, gunqueOption3, gunqueOption4 : boolean
var gunquecb1, gunquecb2, gunquecb3, gunquecb4 : int
%#10 Gender (3 options)
var gendercb1, gendercb2, gendercb3 : int %3 Gender checkboxes
var genderOption1, genderOption2, genderOption3 : boolean % 3 Gender options


procedure Frames

    exdentframe := GUI.CreateFrame (0, 370, 130, 400, GUI.INDENT)
    lineframe := GUI.CreateFrame (0, 370, 130, 400, 0)
    exdentframe := GUI.CreateFrame (0, 0, 340, 140, GUI.EXDENT)
    lineframe := GUI.CreateFrame (0, 0, 340, 140, 0)

end Frames

%=============================================================
%Purpose: To have 3D Text                                    |
%=============================================================
procedure Text3D(author:string)

for i:30 div 2 .. 30
authorFont(i):=Font.New("Arial:"+intstr(i))
end for

loop

for t:1..length(author)

for i:30 div 2 .. 30
Font.Draw((author(t)), t*30, 100, authorFont(i),collor + floor(i/30*10))
end for

end for
delay (100)

collor += 5

exit when collor = 250

end loop

delay (500)
cls

end Text3D

%=============================================================
%End the Process                                             |
%=============================================================

%Main Page (title page)
colorback (black)
cls
Font.Draw("Agent Qestions ", 200,300, titleFont, red)
Font.Draw("Ver. 1.0", 270, 250, headerFont, red)
Text3D(author)

%End of Main Page

Font.Draw ("STARTING QUESTIONAIRE", 200, 200, headerFont, brightblue)
delay (3000)
cls

GUI.SetBackgroundColor (brightred)
colorback (grey)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Height Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


procedure checkboxheight1 (status : boolean) %Procedure for height checkboxes
    heightOptionS := GUI.GetCheckBox (heightcb1)
    GUI.Dispose (heightcb1)
    GUI.Dispose (heightcb2)
    GUI.Dispose (heightcb3)
    GUI.Dispose (heightcb4)
    Font.Draw ("Sorry, You are to Small to play!!", 20, 200, questionfont, blue)
    delay (1000)
    Window.Close (winID + 1)
end checkboxheight1

procedure checkboxheight2 (status : boolean)
    heightOptionM := GUI.GetCheckBox (heightcb2)
    GUI.Dispose (heightcb1)
    GUI.Dispose (heightcb2)
    GUI.Dispose (heightcb3)
    GUI.Dispose (heightcb4)
    Font.Draw ("A little short (-10 points)", 20, 200, questionfont, blue)
    score -= 10
    locate (15, 1)
    put "Your Score is ", score
    delay (1000)
end checkboxheight2

procedure checkboxheight3 (status : boolean)
    heightOptionL := GUI.GetCheckBox (heightcb3)
    GUI.Dispose (heightcb1)
    GUI.Dispose (heightcb2)
    GUI.Dispose (heightcb3)
    GUI.Dispose (heightcb4)
    Font.Draw ("Perfect height soldier!! (+10 points)", 20, 200, questionfont, blue)
    score += 10
    locate (15, 1)
    put "Your Score is ", score
    delay (1000)
end checkboxheight3

procedure checkboxheight4 (status : boolean)
    heightOptionXL := GUI.GetCheckBox (heightcb4)
    GUI.Dispose (heightcb1)
    GUI.Dispose (heightcb2)
    GUI.Dispose (heightcb3)
    GUI.Dispose (heightcb4)
    Font.Draw ("Your a little to tall (-10 points)", 20, 200, questionfont, blue)
    score -= 10
    locate (15, 1)
    put "Your Score is ", score
    delay (1000)
end checkboxheight4


Font.Draw ("Question 1/10", 5, 380, scorefont, black)
Font.Draw ("What is your height range?", 20, 100, questionfont, red)

Frames

heightcb1 := GUI.CreateCheckBox (10, 50, "Under 5'", checkboxheight1)
heightcb2 := GUI.CreateCheckBox (150, 50, "5'-5'6''", checkboxheight2)
heightcb3 := GUI.CreateCheckBox (10, 10, "5'7'' - 6'2''", checkboxheight3)
heightcb4 := GUI.CreateCheckBox (150, 10, "Over 6'2''", checkboxheight4)

heightOptionS := GUI.GetCheckBox (heightcb1)
heightOptionM := GUI.GetCheckBox (heightcb2)
heightOptionL := GUI.GetCheckBox (heightcb3)
heightOptionXL := GUI.GetCheckBox (heightcb4)

loop
    exit when GUI.ProcessEvent
    exit when heightOptionS = true or heightOptionM = true or heightOptionL = true or heightOptionXL = true
end loop

delay (3000)
cls


%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Height) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Weight Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxweight1 (status : boolean)
    weightOption1 := GUI.GetCheckBox (weightcb1)
    GUI.Dispose (weightcb1)
    GUI.Dispose (weightcb2)
    GUI.Dispose (weightcb3)
    GUI.Dispose (weightcb4)
    Font.Draw ("Your a needle!, start eating some food and maybe you can come back", 20, 200, questionfont, blue)
    GUI.Quit
    delay (1000)
    Window.Close (winID + 1)
end checkboxweight1

procedure checkboxweight2 (status : boolean)
    weightOption2 := GUI.GetCheckBox (weightcb2)
    GUI.Dispose (weightcb1)
    GUI.Dispose (weightcb2)
    GUI.Dispose (weightcb3)
    GUI.Dispose (weightcb4)
    Font.Draw ("You're a lightweight! (-10 points)", 20, 200, questionfont, blue)
    score -= 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxweight2

procedure checkboxweight3 (status : boolean)
    weightOption3 := GUI.GetCheckBox (weightcb3)
    GUI.Dispose (weightcb1)
    GUI.Dispose (weightcb2)
    GUI.Dispose (weightcb3)
    GUI.Dispose (weightcb4)
    Font.Draw ("Your just fine!! (+ 10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxweight3

procedure checkboxweight4 (status : boolean)
    weightOption4 := GUI.GetCheckBox (weightcb4)
    GUI.Dispose (weightcb1)
    GUI.Dispose (weightcb2)
    GUI.Dispose (weightcb3)
    GUI.Dispose (weightcb4)
    Font.Draw ("What do you think this is!!! the camp for the fat!! (- 10 points)", 20, 200, questionfont, blue)
    score -= 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxweight4

Font.Draw ("Question 2/10", 5, 380, scorefont, black)
Font.Draw ("How heavy are you?", 20, 100, questionfont, red)

Frames

weightcb1 := GUI.CreateCheckBox (10, 50, "< 100 pounds", checkboxweight1)
weightcb2 := GUI.CreateCheckBox (150, 50, "100 - 150 pounds", checkboxweight2)
weightcb3 := GUI.CreateCheckBox (10, 10, "151 - 250 pounds", checkboxweight3)
weightcb4 := GUI.CreateCheckBox (150, 10, "250+", checkboxweight4)

weightOption1 := GUI.GetCheckBox (weightcb1)
weightOption2 := GUI.GetCheckBox (weightcb2)
weightOption3 := GUI.GetCheckBox (weightcb3)
weightOption4 := GUI.GetCheckBox (weightcb4)

loop
    exit when GUI.ProcessEvent
    exit when weightOption1 = true or weightOption2 = true or weightOption3 = true or weightOption4 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Weight) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Country of Origin Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxorigin1 (status : boolean)
    originOption1 := GUI.GetCheckBox (origincb1)
    GUI.Dispose (origincb1)
    GUI.Dispose (origincb2)
    GUI.Dispose (origincb3)
    GUI.Dispose (origincb4)
    Font.Draw ("Canadian!! Thats an automatic (+15 points)", 20, 200, questionfont, blue)
    score += 15
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxorigin1

procedure checkboxorigin2 (status : boolean)
    originOption2 := GUI.GetCheckBox (origincb2)
    GUI.Dispose (origincb1)
    GUI.Dispose (origincb2)
    GUI.Dispose (origincb3)
    GUI.Dispose (origincb4)
    Font.Draw ("USA, you must be well trained (+10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxorigin2

procedure checkboxorigin3 (status : boolean)
    originOption3 := GUI.GetCheckBox (origincb3)
    GUI.Dispose (origincb1)
    GUI.Dispose (origincb2)
    GUI.Dispose (origincb3)
    GUI.Dispose (origincb4)
    Font.Draw ("We have enough European's (-5 points)", 20, 200, questionfont, blue)
    score -= 5
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxorigin3

procedure checkboxorigin4 (status : boolean)
    originOption4 := GUI.GetCheckBox (origincb4)
    GUI.Dispose (origincb1)
    GUI.Dispose (origincb2)
    GUI.Dispose (origincb3)
    GUI.Dispose (origincb4)
    Font.Draw ("We like diversity (+10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxorigin4

Font.Draw ("Question 3/10", 5, 380, scorefont, black)
Font.Draw ("Your country of Origin is:?", 20, 100, questionfont, red)

Frames

origincb1 := GUI.CreateCheckBox (10, 50, "Canada", checkboxorigin1)
origincb2 := GUI.CreateCheckBox (150, 50, "USA", checkboxorigin2)
origincb3 := GUI.CreateCheckBox (10, 10, "Europe", checkboxorigin3)
origincb4 := GUI.CreateCheckBox (150, 10, "Other", checkboxorigin4)

originOption1 := GUI.GetCheckBox (origincb1)
originOption2 := GUI.GetCheckBox (origincb2)
originOption3 := GUI.GetCheckBox (origincb3)
originOption4 := GUI.GetCheckBox (origincb4)

loop
    exit when GUI.ProcessEvent
    exit when originOption1 = true or originOption2 = true or originOption3 = true or originOption4 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Country of Origin) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Left or Right Handed Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxrighthand (status : boolean)
    righthandOption := GUI.GetCheckBox (righthandcb)
    GUI.Dispose (righthandcb)
    GUI.Dispose (lefthandcb)
    Font.Draw ("Being Right handed will come in handy (+10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxrighthand

procedure checkboxlefthand (status : boolean)
    lefthandOption := GUI.GetCheckBox (lefthandcb)
    GUI.Dispose (righthandcb)
    GUI.Dispose (lefthandcb)
    Font.Draw ("We'll have to get more left handed guns (-10 points)", 20, 200, questionfont, blue)
    score -= 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxlefthand

Font.Draw ("Question 4/10", 5, 380, scorefont, black)
Font.Draw ("Are you Left or Right handed?", 8, 100, questionfont, red)

Frames

righthandcb := GUI.CreateCheckBox (10, 50, "Right", checkboxrighthand)
lefthandcb := GUI.CreateCheckBox (150, 50, "Left", checkboxlefthand)

righthandOption := GUI.GetCheckBox (righthandcb)
lefthandOption := GUI.GetCheckBox (lefthandcb)


loop
    exit when GUI.ProcessEvent
    exit when righthandOption = true or lefthandOption = true
end loop
delay (3000)
cls


%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Left or Right Handed) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Do you wear Glasses Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxglassesyes (status : boolean)
    glassesOption1 := GUI.GetCheckBox (glassescb1)
    GUI.Dispose (glassescb1)
    GUI.Dispose (glassescb2)
    Font.Draw ("Glasses might affecte your shooting (-5 points)", 20, 200, questionfont, blue)
    score -= 5
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxglassesyes

procedure checkboxglassesno (status : boolean)
    glassesOption2 := GUI.GetCheckBox (glassescb2)
    GUI.Dispose (glassescb1)
    GUI.Dispose (glassescb2)
    Font.Draw ("No, glasses that good!( +5 points)", 20, 200, questionfont, blue)
    score += 5
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxglassesno

Font.Draw ("Question 5/10", 5, 380, scorefont, black)
Font.Draw ("Do you wear glasses?", 20, 100, questionfont, red)

Frames

glassescb1 := GUI.CreateCheckBox (10, 50, "Yes", checkboxglassesyes)
glassescb2 := GUI.CreateCheckBox (150, 50, "No", checkboxglassesno)

glassesOption1 := GUI.GetCheckBox (glassescb1)
glassesOption2 := GUI.GetCheckBox (glassescb2)


loop
    exit when GUI.ProcessEvent
    exit when glassesOption1 = true or glassesOption2 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Glasses) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Gun Experience Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxgunexp1 (status : boolean)
    gunexpOption1 := GUI.GetCheckBox (gunexpcb1)
    GUI.Dispose (gunexpcb1)
    GUI.Dispose (gunexpcb2)
    GUI.Dispose (gunexpcb3)
    GUI.Dispose (gunexpcb4)
    Font.Draw ("WHY DID YOU SIGN UP THEN!!", 20, 200, questionfont, blue)
    GUI.Quit
    delay (1000)
    Window.Close (winID + 1)
end checkboxgunexp1

procedure checkboxgunexp2 (status : boolean)
    gunexpOption2 := GUI.GetCheckBox (gunexpcb2)
    GUI.Dispose (gunexpcb1)
    GUI.Dispose (gunexpcb2)
    GUI.Dispose (gunexpcb3)
    GUI.Dispose (gunexpcb4)
    Font.Draw ("Only once! I would have expected more (-10 points)", 20, 200, questionfont, blue)
    score -= 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunexp2

procedure checkboxgunexp3 (status : boolean)
    gunexpOption3 := GUI.GetCheckBox (gunexpcb3)
    GUI.Dispose (gunexpcb1)
    GUI.Dispose (gunexpcb2)
    GUI.Dispose (gunexpcb3)
    GUI.Dispose (gunexpcb4)
    Font.Draw ("Continue practicing with your gun (+2 points)", 20, 200, questionfont, blue)
    score += 2
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunexp3

procedure checkboxgunexp4 (status : boolean)
    gunexpOption4 := GUI.GetCheckBox (gunexpcb4)
    GUI.Dispose (gunexpcb1)
    GUI.Dispose (gunexpcb2)
    GUI.Dispose (gunexpcb3)
    GUI.Dispose (gunexpcb4)
    Font.Draw ("WOW, Don't shot me! (+20 points)", 20, 200, questionfont, blue)
    score += 20
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunexp4

Font.Draw ("Question 6/10", 5, 380, scorefont, black)
Font.Draw ("How many times have you used a gun?", 5, 100, questionfont, red)

exdentframe := GUI.CreateFrame (0, 370, 130, 400, GUI.INDENT)     %Questions Exdent Frame
lineframe := GUI.CreateFrame (0, 370, 130, 400, 0)    %Questions Line Frame
exdentframe := GUI.CreateFrame (0, 0, 440, 140, GUI.EXDENT)    % CheckBoxes Exdent Frame
lineframe := GUI.CreateFrame (0, 0, 440, 140, 0)    %CheckBoxes Line Frame

gunexpcb1 := GUI.CreateCheckBox (10, 50, "Never", checkboxgunexp1)
gunexpcb2 := GUI.CreateCheckBox (150, 50, "Once", checkboxgunexp2)
gunexpcb3 := GUI.CreateCheckBox (10, 10, "20+ times", checkboxgunexp3)
gunexpcb4 := GUI.CreateCheckBox (150, 10, "I'm holding one!", checkboxgunexp4)

gunexpOption1 := GUI.GetCheckBox (gunexpcb1)
gunexpOption2 := GUI.GetCheckBox (gunexpcb2)
gunexpOption3 := GUI.GetCheckBox (gunexpcb3)
gunexpOption4 := GUI.GetCheckBox (gunexpcb4)

loop
    exit when GUI.ProcessEvent
    exit when gunexpOption1 = true or gunexpOption2 = true or gunexpOption3 = true or gunexpOption4 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Gun Experience) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Military Training/Experience Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxmiltryes (status : boolean)
    miltrOption1 := GUI.GetCheckBox (miltrcb1)
    GUI.Dispose (miltrcb1)
    GUI.Dispose (miltrcb2)
    Font.Draw ("Thats good, Your training will come in handy (+10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxmiltryes

procedure checkboxmiltrno (status : boolean)
    miltrOption2 := GUI.GetCheckBox (miltrcb2)
    GUI.Dispose (miltrcb1)
    GUI.Dispose (miltrcb2)
    Font.Draw ("Oh Well, you will get plenty of training here (+0 points)", 20, 200, questionfont, blue)
    score += 0
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxmiltrno

Font.Draw ("Question 7/10", 5, 380, scorefont, black)
Font.Draw ("Have you had any Military Training?", 5, 100, questionfont, red)

exdentframe := GUI.CreateFrame (0, 370, 130, 400, GUI.INDENT)     %Questions Exdent Frame
lineframe := GUI.CreateFrame (0, 370, 130, 400, 0)    %Questions Line Frame
exdentframe := GUI.CreateFrame (0, 0, 400, 140, GUI.EXDENT)    % CheckBoxes Exdent Frame
lineframe := GUI.CreateFrame (0, 0, 400, 140, 0)    %CheckBoxes Line Frame

miltrcb1 := GUI.CreateCheckBox (10, 50, "Yes", checkboxmiltryes)
miltrcb2 := GUI.CreateCheckBox (150, 50, "No", checkboxmiltrno)

miltrOption1 := GUI.GetCheckBox (miltrcb1)
miltrOption2 := GUI.GetCheckBox (miltrcb2)

loop
    exit when GUI.ProcessEvent
    exit when miltrOption1 = true or miltrOption2 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Military Training/Experience) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Shot Positioning Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxshotque1 (status : boolean)
    shotqueOption1 := GUI.GetCheckBox (shotquecb1)
    GUI.Dispose (shotquecb1)
    GUI.Dispose (shotquecb2)
    GUI.Dispose (shotquecb3)
    GUI.Dispose (shotquecb4)
    Font.Draw ("WRONG!,The correct answer is 'The Head' (- 25 points)", 20, 200, questionfont, blue)
    score -= 25
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxshotque1

procedure checkboxshotque2 (status : boolean)
    shotqueOption2 := GUI.GetCheckBox (shotquecb2)
    GUI.Dispose (shotquecb1)
    GUI.Dispose (shotquecb2)
    GUI.Dispose (shotquecb3)
    GUI.Dispose (shotquecb4)
    Font.Draw ("Yep, you're right (+5 points)", 20, 200, questionfont, blue)
    score += 5
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxshotque2

procedure checkboxshotque3 (status : boolean)
    shotqueOption3 := GUI.GetCheckBox (shotquecb3)
    GUI.Dispose (shotquecb1)
    GUI.Dispose (shotquecb2)
    GUI.Dispose (shotquecb3)
    GUI.Dispose (shotquecb4)
    Font.Draw ("WRONG!,The correct answer is 'The Head' (- 25 points)", 20, 200, questionfont, blue)
    score -= 25
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxshotque3

procedure checkboxshotque4 (status : boolean)
    shotqueOption4 := GUI.GetCheckBox (shotquecb4)
    GUI.Dispose (shotquecb1)
    GUI.Dispose (shotquecb2)
    GUI.Dispose (shotquecb3)
    GUI.Dispose (shotquecb4)
    Font.Draw ("WRONG!,The correct answer is 'The Head' (- 25 points)", 20, 200, questionfont, blue)
    score -= 25
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxshotque4

Font.Draw ("Question 8/10", 5, 380, scorefont, black)
Font.Draw ("Where should a marksman shoot?", 10, 100, questionfont, red)

exdentframe := GUI.CreateFrame (0, 370, 130, 400, GUI.INDENT)     %Questions Exdent Frame
lineframe := GUI.CreateFrame (0, 370, 130, 400, 0)    %Questions Line Frame
exdentframe := GUI.CreateFrame (0, 0, 400, 140, GUI.EXDENT)    % CheckBoxes Exdent Frame
lineframe := GUI.CreateFrame (0, 0, 400, 140, 0)    %CheckBoxes Line Frame

shotquecb1 := GUI.CreateCheckBox (10, 50, "The Stomach", checkboxshotque1)
shotquecb2 := GUI.CreateCheckBox (150, 50, "The Head", checkboxshotque2)
shotquecb3 := GUI.CreateCheckBox (10, 10, "The Chest", checkboxshotque3)
shotquecb4 := GUI.CreateCheckBox (150, 10, "The Groin", checkboxshotque4)

shotqueOption1 := GUI.GetCheckBox (shotquecb1)
shotqueOption2 := GUI.GetCheckBox (shotquecb2)
shotqueOption3 := GUI.GetCheckBox (shotquecb3)
shotqueOption4 := GUI.GetCheckBox (shotquecb4)

loop
    exit when GUI.ProcessEvent
    exit when shotqueOption1 = true or shotqueOption2 = true or shotqueOption3 = true or shotqueOption4 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Shot Positioning) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Gun Saftey Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxgunque1 (status : boolean)
    gunqueOption1 := GUI.GetCheckBox (gunquecb1)
    GUI.Dispose (gunquecb1)
    GUI.Dispose (gunquecb2)
    GUI.Dispose (gunquecb3)
    GUI.Dispose (gunquecb4)
    Font.Draw ("WRONG!,The correct answer is 'Turn off Saftey' (- 20 points)", 20, 200, questionfont, blue)
    score -= 20
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunque1

procedure checkboxgunque2 (status : boolean)
    gunqueOption2 := GUI.GetCheckBox (gunquecb2)
    GUI.Dispose (gunquecb1)
    GUI.Dispose (gunquecb2)
    GUI.Dispose (gunquecb3)
    GUI.Dispose (gunquecb4)
    Font.Draw ("WRONG!,The correct answer is 'Turn off Saftey' (- 20 points)", 20, 200, questionfont, blue)
    score -= 20
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunque2

procedure checkboxgunque3 (status : boolean)
    gunqueOption3 := GUI.GetCheckBox (gunquecb3)
    GUI.Dispose (gunquecb1)
    GUI.Dispose (gunquecb2)
    GUI.Dispose (gunquecb3)
    GUI.Dispose (gunquecb4)
    Font.Draw ("WRONG!,The correct answer is 'Turn off Saftey' (- 20 points)", 20, 200, questionfont, blue)
    score -= 20
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunque3

procedure checkboxgunque4 (status : boolean)
    gunqueOption4 := GUI.GetCheckBox (gunquecb4)
    GUI.Dispose (gunquecb1)
    GUI.Dispose (gunquecb2)
    GUI.Dispose (gunquecb3)
    GUI.Dispose (gunquecb4)
    Font.Draw ("Yah, you're right (+10 points)", 20, 200, questionfont, blue)
    score += 10
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
end checkboxgunque4

Font.Draw ("Question 9/10", 5, 380, scorefont, black)
Font.Draw ("What is the last thing to do b4 shooting?", 2, 100, questionfont, red)

exdentframe := GUI.CreateFrame (0, 370, 130, 400, GUI.INDENT)     %Questions Exdent Frame
lineframe := GUI.CreateFrame (0, 370, 130, 400, 0)    %Questions Line Frame
exdentframe := GUI.CreateFrame (0, 0, 440, 140, GUI.EXDENT)    % CheckBoxes Exdent Frame
lineframe := GUI.CreateFrame (0, 0, 440, 140, 0)    %CheckBoxes Line Frame

gunquecb1 := GUI.CreateCheckBox (10, 50, "Aim", checkboxgunque1)
gunquecb2 := GUI.CreateCheckBox (150, 50, "Load Bullet", checkboxshotque2)
gunquecb3 := GUI.CreateCheckBox (10, 10, "Crouch", checkboxgunque3)
gunquecb4 := GUI.CreateCheckBox (150, 10, "Turn off Saftey", checkboxgunque4)

gunqueOption1 := GUI.GetCheckBox (gunquecb1)
gunqueOption2 := GUI.GetCheckBox (gunquecb2)
gunqueOption3 := GUI.GetCheckBox (gunquecb3)
gunqueOption4 := GUI.GetCheckBox (gunquecb4)

loop
    exit when GUI.ProcessEvent
    exit when gunqueOption1 = true or gunqueOption2 = true or gunqueOption3 = true or gunqueOption4 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Gun Saftey) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%Gender Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure checkboxgender1 (status : boolean)
    genderOption1 := GUI.GetCheckBox (gendercb1)
    GUI.Dispose (gendercb1)
    GUI.Dispose (gendercb2)
    GUI.Dispose (gendercb3)
    cls
    Font.Draw ("To Pass Written Test you need a +10", 100, 200, questionfont, blue)
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
    if score >= 10 then
        Font.Draw ("You Passed!", 300, 0, questionfont, blue)
        delay (500)
        cls
        locate (13, 25)
        put "Submiting Questionaire" ..
        delay (500)
        put " . " ..
        delay (500)
        put " . " ..
        delay (500)
        put " . "
        delay (500)
        GUI.Quit
        cls
    elsif score < 10 then
        cls
        Font.Draw ("You Failed!", 300, 0, questionfont, blue)
        delay (1000)
        GUI.Quit
        Window.Close (winID + 1)
    end if
end checkboxgender1

procedure checkboxgender2 (status : boolean)
    genderOption2 := GUI.GetCheckBox (gendercb2)
    GUI.Dispose (gendercb1)
    GUI.Dispose (gendercb2)
    GUI.Dispose (gendercb3)
    cls
    Font.Draw ("To pass written test you need at least 0 points", 20, 200, questionfont, blue)
    delay (1000)
    locate (15, 1)
    put "Your Score is ", score
    delay (1000)
    cls
    if score >= 0 then
        Font.Draw ("You Passed!", 230, 200, questionfont, blue)
        delay (500)
        cls
        locate (13, 25)
        put "Submiting Questionaire" ..
        delay (500)
        put " . " ..
        delay (500)
        put " . " ..
        delay (500)
        put " . "
        delay (500)
        GUI.Quit
        cls
    elsif score < 0 then
        cls
        Font.Draw ("You Failed!", 230, 200, questionfont, blue)
        GUI.Quit
        Window.Close (winID + 1)
    end if
end checkboxgender2

procedure checkboxgender3 (status : boolean)
    genderOption3 := GUI.GetCheckBox (gendercb3)
    GUI.Dispose (gendercb1)
    GUI.Dispose (gendercb2)
    GUI.Dispose (gendercb3)
    Font.Draw ("This is serious, obviously you're not ready", 20, 200, questionfont, blue)
    GUI.Quit
    Window.Close (winID + 1)
end checkboxgender3


Font.Draw ("Question 10/10", 0, 380, scorefont, black)
Font.Draw ("What is your gender?", 20, 100, questionfont, red)

Frames

gendercb1 := GUI.CreateCheckBox (10, 50, "Male", checkboxgender1)
gendercb2 := GUI.CreateCheckBox (150, 50, "Female", checkboxgender2)
gendercb3 := GUI.CreateCheckBox (10, 10, "Unknown", checkboxgender3)


genderOption1 := GUI.GetCheckBox (gendercb1)
genderOption2 := GUI.GetCheckBox (gendercb2)
genderOption3 := GUI.GetCheckBox (gendercb3)


loop
    exit when GUI.ProcessEvent
    exit when genderOption1 = true or genderOption2 = true or genderOption3 = true
end loop

delay (3000)
cls

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%End (Gender) Question
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Hope you like it!!!
-Nate

Author:  Prince [ Mon Apr 07, 2003 6:11 pm ]
Post subject: 

umm... wats it supposed to b or do? (havnt tested yet)

Author:  Asok [ Tue Apr 08, 2003 12:05 am ]
Post subject: 

it's not too shabby...

the red boxes after the onClick is rather fugly Sad well alot of it is, ie. massive underlined text.

However, it does show a good use and knowledge of GUI, good job Smile

Author:  Prince [ Tue Apr 08, 2003 10:07 am ]
Post subject: 

good job... if i had more bits (**wink wink**) i would donate sum


: