Jump to content

Making a "QUIZ" program ?


YpR^
 Share

Recommended Posts

I would like to make a Quiz-program - Which means.,...

A text is shown and you'll be able to write your answer in a box.

If the answer was correct it'll pass to next question - and if not then tell the right answer and move to the next question...

Thank you!

Link to comment
Share on other sites

I'll have a look on it :lmao:

Is there any guides for greating a nice clean GUI ?

<{POST_SNAPBACK}>

Use CyberSlugs awsome http://www.autoitscript.com/fileman/users/public/CyberSlug/jan11autobuilder.zip.

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

Layer... something like that.. maybe,.. is it possible to make a script which accept 2 diffrent answeres ?....

Another question.... is it possible to "count" how many wrong / right answers you've made ?

Thanks for all replays ... :lmao:

Link to comment
Share on other sites

I've made a very simple layout.... a square to write the answer.... and a OK button.... but how do i link a script to the GUI ?

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 348, 126,(@DesktopWidth-348)/2, (@DesktopHeight-126)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Edit_1 = GuiCtrlCreateEdit("", 20, 30, 140, 70)

$Button_2 = GuiCtrlCreateButton("OK", 200, 30, 80, 40)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case Else

;;;

EndSelect

WEnd

Exit

Link to comment
Share on other sites

or if its going to be like questions that have to be typed in exactly i reccomend you use Radio's.. (not a media radio :lmao: but a button thingy)

<{POST_SNAPBACK}>

If $answer == 'this answer' OR $answer == 'THIS ANSWER' Then

$correct++

Else

$wrong++

EndIf

Just set a variable for correct answers and wrong answers. You can then find the number of questions answered by doing:

$total = $correct + $wrong

and then find percentage by:

$percent = $correct/$total

you'll probably want a For Each loop in this one, that way you can keep cycling through the questions, and refresh the correct, wrong, total, and percent variables after each question.

If you ever get it working, let me know, I know someone who would like a quiz program.

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

I've wrote a bit... but it isn't a fix script :)

$answer = MsgBox(4, "Formelsamlingstest 2.x", "Klar?")

If $answer = 7 Then

MsgBox(4096, "AutoIt", "OK. Farvel!")

Exit

EndIf

$bLoop = 1

While $bLoop = 1

$text = InputBox("Formel: 1", "a^2+b^2=?")

If @error = 1 Then

MsgBox(4096, "Exit", "Afslut program")

Exit

Else

If $text <> "c^2" Then

MsgBox(4096, "Forkert", "Prøv igen - eller kig evt. i formelsamlingen ?")

Else

$bLoop = 0

EndIf

EndIf

WEnd

MsgBox(4096,"h4x ? :)", "Korrekt")

$bLoop = 1

While $bLoop = 1

$text = InputBox("Formel: 2", "log(a*:lmao:=?")

If @error = 1 Then

MsgBox(4096, "Exit", "Afslut program")

Exit

Else

If $text <> "log(a)+log(o:)" Then

MsgBox(4096, "Forkert", "Prøv igen - eller kig evt. i formelsamlingen ?")

Else

$bLoop = 0

EndIf

EndIf

WEnd

MsgBox(4096,"h4x ? :)", "Korrekt")

Link to comment
Share on other sites

  • 1 year later...

I know in linux shell its [a-z][A-Z], I don't know about Autoit though...

StringUpper 
--------------------------------------------------------------------------------

Converts a string to uppercase.


StringUpper ( "string" )


 

Parameters

string The string to convert. 

 

Return Value

Returns the string converted to uppercase.
==================================================

StringLower 
--------------------------------------------------------------------------------

Converts a string to lowercase.


StringLower ( "string" )


 

Parameters

string The string to convert. 

 

Return Value

Returns the string converted to lowercase.
===================================================

Chr 
--------------------------------------------------------------------------------

Returns a character corresponding to an ASCII code.


Chr ( ASCIIcode )


 

Parameters

ASCIIcode An ASCII code (e.g., 65 returns the capital letter A). 

 

Return Value

Returns a string containing the ASCII representation of the given code.

 

Remarks

The parameter is converted to a positive integer between 0 and 255 if not already one.
Chr(48) == "0", Chr(57) == "9", Chr(65) == "A", Chr(90) == "Z", Chr(97) == "a", Chr(122) = "z", etc.
A complete ASCII table is in the Appendix.

When assigning/ concatenating Chr(0) to a string the result is converted to a binaryString

From beta help - may help you.

~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...