Voici un petit "jeu" de rien du tout pour tester ses reflexes visuel et/ou auditif.
Je l'ai fait vite fait hier dés que j'en ai eu l'idée.
Les scores sont sauvegardés dans des fichiers textes tout simplement.
Pour ma part je suis prés de 2x plus rapide en auditif...

Et vous ? ^^
► Afficher le texteLe Code
Code : Tout sélectionner
;~ Version d'Autoit : 3.2.12.1
;~ Auteur : Max5
;~ Programme : Reflex_01
;~ Version : 1.0
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#Include <String.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)
HotKeySet("z", "Quitter")
Func Quitter()
Exit
EndFunc
$TypeForm = GUICreate("Type", 109, 88, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "TypeFormClose")
$ButtonVisu = GUICtrlCreateButton("Visuel", 12, 8, 83, 33, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($ButtonVisu, "TestVisu")
$ButtonAudit = GUICtrlCreateButton("Auditif", 12, 48, 83, 33, 0)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetOnEvent($ButtonAudit, "TestAudit")
GUISetState(@SW_SHOW, $TypeForm)
$VisuForm = GUICreate("Test Visuel", 227, 129, -1, -1)
GUICtrlCreateLabel("Appuyez sur 'K' au changement de couleur...", 8, 8, 215, 17)
$Color = GUICtrlCreateEdit("", 8, 32, 209, 89, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN))
GUICtrlSetBkColor(-1, 0xFF0000)
GUISetState(@SW_HIDE, $VisuForm)
$AuditForm = GUICreate("Test Auditif", 210, 34, -1, -1)
$Label1 = GUICtrlCreateLabel("Appuyez sur 'D' en entendant le BEEP...", 8, 8, 194, 17)
GUISetState(@SW_HIDE, $AuditForm)
While 1
Sleep(250)
WEnd
Func TestVisu()
GUISetState(@SW_SHOW, $VisuForm)
$Attente = Random(3, 23)
Sleep($Attente * 1000)
GUICtrlSetBkColor($Color, 0x0000FF)
$TimerInit = TimerInit()
Do
Sleep(1)
Until _IsPressed(_StringToHex("K"))
$reflexTPS = TimerDiff($TimerInit)/1000
MsgBox(64, "Temps de réponse visuel", $reflexTPS & " secondes")
GUISetState(@SW_HIDE, $VisuForm)
GUICtrlSetBkColor($Color, 0xFF0000)
FileWriteLine("ScoreVisu.txt", $reflexTPS & " secondes")
EndFunc
Func TestAudit()
GUISetState(@SW_SHOW, $AuditForm)
$Attente = Random(3, 23)
Sleep($Attente * 1000)
Beep(500, 50)
$TimerInit = TimerInit()
Do
Sleep(1)
Until _IsPressed(_StringToHex("D"))
$reflexTPS = TimerDiff($TimerInit)/1000
MsgBox(64, "Temps de réponse auditive", $reflexTPS & " secondes")
GUISetState(@SW_HIDE, $AuditForm)
GUICtrlSetBkColor($Color, 0xFF0000)
FileWriteLine("ScoreAudit.txt", $reflexTPS & " secondes")
EndFunc
Func TypeFormClose()
Exit
EndFunc