nitekram Posted August 12, 2009 Posted August 12, 2009 I want to create a typing test with AutoIt and want to know if is possible to do the following, and if so, can someone lead me in the right direction. 1. Display the text that is to be typed. I can do this... 2. Have an input field for the user to type the test text. I can do this... 3. Keep track of all failed attemps to type the correct letters. I AM UNABLE to do this 4. Start a timer for the length of time it takes to complete test text. I can do this... 5. Show how long the test took and how many errors were created. I know that this is just the basic, but I am really stuck on number 3. 2¢ Reveal hidden contents All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." Reveal hidden contents WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
JSThePatriot Posted August 12, 2009 Posted August 12, 2009 To do it with any accuracy, you would need a keyboard hook. You can search the Example Scripts forum and see if there are any useful keyboard hooks in there... I hope that helps. Jarvis AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
billthecreator Posted August 12, 2009 Posted August 12, 2009 id use ini. and every time they fail, send the info to [failed] word1= word2= word3= ... then at the end use inireadsection of [failed] [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap
nitekram Posted August 13, 2009 Author Posted August 13, 2009 On 8/12/2009 at 8:37 PM, 'JSThePatriot said: To do it with any accuracy, you would need a keyboard hook. You can search the Example Scripts forum and see if there are any useful keyboard hooks in there...I hope that helps.JarvisWOW...that looks beyond my comfort level at the this time. Maybe I will look again in a couple of years of programming/scripting.Thanks for your help though - SAVED ME LOTS OF TIME! 2¢ Reveal hidden contents All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." Reveal hidden contents WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
water Posted August 13, 2009 Posted August 13, 2009 Please try the following code. An action ist aken every time the user input changes.#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $UserInputOld = "" Global $UserInputNew = "" $hGUI = GUICreate("Test", 500, 500) $input = GUICtrlCreateInput("",10,110,200,20) GUISetState() While 1 $UserInputNew = GUICtrlRead($input) If $UserInputNew <> "" Then ; Here you get when the user input has changed If $UserInputOld <> $UserInputNew Then ConsoleWrite($UserInputNew & @CRLF) $UserInputOld = $UserInputNew EndIf EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep(20) WEnd My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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