also hallo erstmal..ich habe laange nicht mehr mit autoit gearbeitet wollte wieder i.etwas schwachsinniges basteln
also habe ich mir einen enscheider gebastelt
Spoiler anzeigen
$comp = Random(1,100,1)
; Script Start - Add your code below here
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Enscheider", 252, 111, 192, 124)
$Button1 = GUICtrlCreateButton("ja/nein", 32, 24, 89, 25)
$Button2 = GUICtrlCreateButton("ja/nein/vielleicht", 120, 24, 89, 25)
$Button3 = GUICtrlCreateButton("1-10", 32, 46, 89, 25)
$Button4 = GUICtrlCreateButton("1-100", 119, 46, 89, 25)
$button6 = GUICtrlCreateButton("Spiel!", 32, 68, 178, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$ant=Random(1,2,1)
if $ant = 1 Then
Msgbox(0,"Antwort","JA")
EndIf
IF $ant = 2 Then
Msgbox(0,"Antwort","Nein")
EndIf
case $Button2
$ant2=Random(1,3,1)
if $ant2 = 1 Then
Msgbox(0,"Antwort","JA")
EndIf
if $ant2 = 2 Then
Msgbox(0,"Antwort","NEIN")
EndIf
if $ant2 = 3 Then
Msgbox(0,"Antwort","VIELLEICHT")
EndIf
case $Button3
$zahl=Random(1,10,1)
Msgbox(0,"Antwort",$zahl)
case $Button4
$zahl2=Random(1,100,1)
Msgbox(0,"Antwort",$zahl2)
case $button6
$you = InputBox("Deine Zahl!","errate die zahl die ich mir ausgedacht habe!")
IF $you < $comp Then
Msgbox(0,"falsch!","Die gesuchte zahl ist größer!")
EndIf
If $you > $comp Then
Msgbox(0,"falsch!","Die gesuchte zahl ist kleiner!")
EndIf
If $you = $comp Then
Msgbox(0,"Richtig!","Super,du hast die zahl erraten!")
$comp = Random(1,100,1)
EndIf
EndSwitch
WEnd
so jetzt zum "case $button6" teil!
ich will das wenn er die zahl falsch eingegeben hat er den user noch einmal fragt welche zahl er rät!
also sagen wir ich gebe 50 als zahl ein!
dann kommt die nachricht ...falsch zu klein....dann will ich das er mich noch einmal fragt welche zahl ich jetzt eingeben will...bis ich es richtig habe!....
Danke für jede hilfe