YpR^ Posted February 9, 2005 Share Posted February 9, 2005 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 More sharing options...
Andre Posted February 9, 2005 Share Posted February 9, 2005 Hi, U can use InputBox, MsgBox, and the If Then Elseif to do that kind of stuff. Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 I'll have a look on it Is there any guides for greating a nice clean GUI ? Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 I'll have a look on it Is there any guides for greating a nice clean GUI ? Link to comment Share on other sites More sharing options...
gosu Posted February 9, 2005 Share Posted February 9, 2005 I'll have a look on it 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 More sharing options...
ioliver Posted February 9, 2005 Share Posted February 9, 2005 You could also look into using an Ini file to keep Questions & Answers. Check out IniRead(), and IniWrite() in the Help File. Ian "Blessed be the name of the Lord" - Job 1:21Check out Search IMF Link to comment Share on other sites More sharing options...
layer Posted February 9, 2005 Share Posted February 9, 2005 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 but a button thingy) FootbaG Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 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 ... Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 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 More sharing options...
MSLx Fanboy Posted February 9, 2005 Share Posted February 9, 2005 (edited) 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 but a button thingy)<{POST_SNAPBACK}>If $answer == 'this answer' OR $answer == 'THIS ANSWER' Then $correct++Else $wrong++EndIfJust set a variable for correct answers and wrong answers. You can then find the number of questions answered by doing:$total = $correct + $wrongand then find percentage by:$percent = $correct/$totalyou'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 February 9, 2005 by MSLx Fanboy Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 Hehe.... im totally new to AutoIT.... so ... i think i'll take some time Only made some VERy simple scripts Link to comment Share on other sites More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 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*=?") If @error = 1 Then MsgBox(4096, "Exit", "Afslut program") Exit Else If $text <> "log(a)+log(" 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 More sharing options...
YpR^ Posted February 9, 2005 Author Share Posted February 9, 2005 Is it possible to write a command in the start of the script which allow the answers to be in small and/or big letters ? Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted February 9, 2005 Share Posted February 9, 2005 I know in linux shell its [a-z][A-Z], I don't know about Autoit though... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Neoborn Posted June 16, 2006 Share Posted June 16, 2006 I know in linux shell its [a-z][A-Z], I don't know about Autoit though... expandcollapse popupStringUpper -------------------------------------------------------------------------------- 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now