Hello everyone, how are you all ?
I am new here, so I hope it's the right place to ask. If no, then apologies and if a moderator can move it to the correct section.
I am completly new to coding and new to AutoIt. And I am trying to get the result of the Timeout of a MsgBox.
IE : If timeout is over then desplay a message
Else continue
the code :
$iTimeout = 10
$s_currentday = InputBox ("Tutoriel" , "Which day of the week are we??", "Enter a day" , "" , 200, 130, Default, Default, $iTimeout)
If $iTimeout <> 0 then
MsgBox ( 16, "Tutoriel", "Too long to answer, programe will close!!")
Else
Switch $s_currentday
Case "Monday"
MsgBox ( 0, "Tutoriel", "It's only the start of the week!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "It's the start of an awesome week!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be a better day!")
EndIf
Case "Tuesday"
MsgBox ( 0, "Tutoriel", "Second day of the week!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "Let's make this week and amazing one!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be a better day!")
EndIf
Case "Wednesday"
MsgBox ( 0, "Tutoriel", "Third day of the week!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox == 6 Then
MsgBox ( 0, "Tutoriel", "Half of the week and yet more good stuff to come!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be a better day!")
EndIf
Case "Thursday"
MsgBox ( 0, "Tutoriel", "Closer to the weekend!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "We are close to end the week! Keep that positive mind")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be a better day!")
EndIf
Case "Friday"
MsgBox ( 0, "Tutoriel", "Almost weekend!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "It's the start of an awesome weekend! Think of what you are going to do!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be a better day! Maybe you can go out and have a drink with your friends?")
EndIf
Case "Saturday"
MsgBox ( 0, "Tutoriel", "It's the start of the weekend!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "It's the start of an awesome weekend!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow is Sunday, you can rest and have a good day with your friends and/or family!")
EndIf
Case "Sunday"
MsgBox ( 0, "Tutoriel", "We are almost at the end of the week!")
$mybox = MsgBox ( 4, "Tutoriel", "Do you feel good?")
If $mybox = 6 Then
MsgBox ( 0, "Tutoriel", "It's the end of an awesome week! And I am sure that the next one will be even better!")
ElseIf $mybox = 7 Then
MsgBox ( 0, "Tutoriel", "Don't worry tomorrow will be the start of a new week! So new chance to feel better")
EndIf
EndSwitch
EndIf
Sorry for my bad english, not my main language.
Thanks in advance,
Solchael