darendeli Posted November 24, 2017 Share Posted November 24, 2017 (edited) İNDİR : Darendeli Bil Bakalım V1 ŞİFRE : darendeli Skin Degiştirildi Sarkılı Soru Eklendi.. İstek olursa..Program Sürekli Yeni Sorular Ve özellikler ile Güncellenecektir.. Yakında Gelicek Olan Özellik Calan Sarkı Kime Aittir Tarzında... Edited December 7, 2017 by darendeli 1 1 Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 25, 2017 Author Share Posted November 25, 2017 Sadece soruların Sırayla Devam Etme Mantıgını Göstere Bilecek Varsa Oda İşimi Görür Devamını Yapabilirim... Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 26, 2017 Share Posted November 26, 2017 Soruların sırası ile devam etmesi için array kullanabilirsin #include <Array.au3> Dim $soru[3] = ["Soru1", "Soru2", "Soru3"] For $i = 0 To UBound($soru) - 1 $Sorular = InputBox("Soru", "Soru : " & $soru[$i] & " ?") Next Eğer rasgele sorulmasını istersen random kullanabilirsin Kalan süre için #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $_TimerDif = 5000, $_Dakika, $_Saniye $Form1 = GUICreate("Bil Bakalım", 418, 402, 192, 124) $Button1 = GUICtrlCreateButton("BAŞLAT", 8, 296, 193, 41) $Button2 = GUICtrlCreateButton("PAS GEÇ", 8, 344, 193, 41) $SureLabel = GUICtrlCreateLabel("", 224, 328, 72, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) $Group1 = GUICtrlCreateGroup("", 0, 280, 417, 121) $Label2 = GUICtrlCreateLabel("Doğru : ", 328, 320, 42, 17) $Label3 = GUICtrlCreateLabel("Yanlış :", 328, 344, 38, 17) $Label4 = GUICtrlCreateLabel("PAS :", 328, 368, 37, 17) $Label5 = GUICtrlCreateLabel("0", 384, 320, 10, 17) $Label6 = GUICtrlCreateLabel("0", 384, 344, 10, 17) $Label7 = GUICtrlCreateLabel("0", 384, 368, 10, 17) $Label8 = GUICtrlCreateLabel("Skor Tabelası", 328, 296, 69, 17) $Group2 = GUICtrlCreateGroup("", 320, 312, 81, 81) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label9 = GUICtrlCreateLabel("KALAN SÜRE", 224, 304, 72, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateEdit("", 0, 0, 417, 225) GUICtrlSetState(-1, $GUI_DISABLE) $Button3 = GUICtrlCreateButton("CEVAP 1", 8, 232, 91, 49) $Button4 = GUICtrlCreateButton("CEVAP 2", 112, 232, 91, 49) $Button5 = GUICtrlCreateButton("CEVAP 3", 216, 232, 91, 49) $Button6 = GUICtrlCreateButton("CEVAP 4", 320, 232, 91, 49) $TimeTicks = TimerInit() GUISetState(@SW_SHOW) _Check() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Check() While 1 $_TimerDif -= TimerDiff($TimeTicks) $TimeTicks = TimerInit() Local $_MinCalc = Int($_TimerDif /(60 * 1000)), $_SecCalc = $_TimerDif -($_MinCalc * 60 * 1000) $_SecCalc = Int($_SecCalc / 1000) If $_MinCalc <= 0 And $_SecCalc <= 0 Then GUICtrlSetColor($SureLabel , 0xFF0000) GUICtrlSetData($SureLabel, "Bitti") Sleep(1000) ExitLoop Else If $_MinCalc <> $_Dakika Or $_SecCalc <> $_Saniye Then $_Dakika = $_MinCalc $_Saniye = $_SecCalc GUICtrlSetData($SureLabel, StringFormat("%02u" & ":" & "%02u", $_Dakika, $_Saniye)) If $_Dakika = 0 And $_Saniye <= 10 Then Beep(2000, 100) GUICtrlSetColor($SureLabel , 0xA093FF) EndIf EndIf EndIf WEnd EndFunc Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 26, 2017 Author Share Posted November 26, 2017 Geri Sayımı Hallettim Su Sekilde Soruları Rast Gele Sorması Kaldı... #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Global $dogru , $yanlis , $pas $dogru = 0 $yanlis = 0 $pas = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Bil Bakalım", 418, 402, 192, 124) $Button1 = GUICtrlCreateButton("BAŞLAT", 8, 296, 193, 41) $Button2 = GUICtrlCreateButton("PAS GEÇ", 8, 344, 193, 41) $Label1 = GUICtrlCreateLabel("Kalan Süre : 20 Saniye", 150, 8, 150, 33) GUICtrlSetColor(-1, 0xFF0000) $Group1 = GUICtrlCreateGroup("", 0, 280, 417, 121) $Label2 = GUICtrlCreateLabel("Doğru : ", 328, 320, 42, 17) $Label3 = GUICtrlCreateLabel("Yanlış :", 328, 344, 38, 17) $Label4 = GUICtrlCreateLabel("PAS :", 328, 368, 37, 17) $Label5 = GUICtrlCreateLabel("0", 384, 320, 10, 17) $Label6 = GUICtrlCreateLabel("0", 384, 344, 10, 17) $Label7 = GUICtrlCreateLabel("0", 384, 368, 10, 17) $Label8 = GUICtrlCreateLabel("Skor Tabelası", 328, 296, 69, 17) $Group2 = GUICtrlCreateGroup("", 320, 312, 81, 81) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Edit = GUICtrlCreateEdit("", 0, 30, 417, 100) GUICtrlSetState(-1, $GUI_DISABLE) $Button3 = GUICtrlCreateRadio("CEVAP 1", 28, 142, 91, 19) $Button4 = GUICtrlCreateRadio("CEVAP 2", 28, 162, 91, 19) $Button5 = GUICtrlCreateRadio("CEVAP 3", 28, 182, 91, 19) $Button6 = GUICtrlCreateRadio("CEVAP 4", 28, 202, 91, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 AdlibRegister("time", 1000) EndSwitch WEnd Func time() $read = GUICtrlRead($label1) $read = StringReplace($read, "Kalan Süre : ", "") $read = StringReplace($read, " Saniye", "") If $read > 0 Then GUICtrlSetData($label1, "Kalan Süre : " & $read - 1 & " Saniye") Else SoundPlay(@TempDir & "\False.mp3", 0) AdlibUnRegister("time") MsgBox(16, "Bilgi", "Malesef Süre Yetmedi. Skor Tabelasına Yanlış Olarak 1 Puan Ekliyorum..", 0, $Form1) GUICtrlSetData($label1, "Kalan Süre : 21 Saniye") AdlibRegister("time", 1000) $yanlis += 1 GUICtrlSetData($label6,$yanlis) EndIf EndFunc ;==>time Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 26, 2017 Author Share Posted November 26, 2017 (edited) Sonuç Kısmı Kaldı Saniyenin Tamam Butonuyla Yenilenmesi Cevap Seçili Değilse Tamam Butonuna Basılmaması Ve Son olarak Baslat Butonuyla Oyuna Girmesi Kaldı... Yardımlarınızı Bekliyorum #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Global $SORU_SAYISI = 3 Global $SORULAR[$SORU_SAYISI +1][8] = [[$SORU_SAYISI], _ ["Türkiye'nin başkenti neresidir?","Adana","Istanbul","Ankara","Atina",3] , _ ["2+7= ? işleminin sonucu kaçtır?","8","9","7","10",2], _ ["Yılın en soğuk mevsimi hangisidir?","Kış","Ilk Bahar","Son Bahar","Yaz",1] _ ] Global $dogru , $yanlis , $pas $dogru = 0 $yanlis = 0 $pas = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Bil Bakalım", 418, 402, 192, 124) $Button1 = GUICtrlCreateButton("BAŞLAT", 8, 296, 193, 41) $Button2 = GUICtrlCreateButton("PAS GEÇ", 8, 344, 193, 41) $Button3 = GUICtrlCreateButton("TAMAM", 108, 234, 193, 41) $Label1 = GUICtrlCreateLabel("Kalan Süre : 20 Saniye", 150, 8, 150, 33) GUICtrlSetColor(-1, 0xFF0000) $Group1 = GUICtrlCreateGroup("", 0, 280, 417, 121) $Label2 = GUICtrlCreateLabel("Doğru : ", 328, 320, 42, 17) $Label3 = GUICtrlCreateLabel("Yanlış :", 328, 344, 38, 17) $Label4 = GUICtrlCreateLabel("PAS :", 328, 368, 37, 17) $Label5 = GUICtrlCreateLabel("0", 384, 320, 10, 17) $Label6 = GUICtrlCreateLabel("0", 384, 344, 10, 17) $Label7 = GUICtrlCreateLabel("0", 384, 368, 10, 17) $Label8 = GUICtrlCreateLabel("Skor Tabelası", 328, 296, 69, 17) $Group2 = GUICtrlCreateGroup("", 320, 312, 81, 81) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Edit = GUICtrlCreateEdit("", 0, 30, 417, 100) GUICtrlSetState(-1, $GUI_DISABLE) $Radio1 = GUICtrlCreateRadio("CEVAP 1", 28, 142, 91, 19) $Radio2 = GUICtrlCreateRadio("CEVAP 2", 28, 162, 91, 19) $Radio3 = GUICtrlCreateRadio("CEVAP 3", 28, 182, 91, 19) $Radio4 = GUICtrlCreateRadio("CEVAP 4", 28, 202, 91, 19) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### AdlibRegister("time", 1000) _SIRADAKI_SORU() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Button3 If GUICtrlRead($Radio1) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 1 GUICtrlSetState($Radio1,4) ElseIf GUICtrlRead($Radio2) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 2 GUICtrlSetState($Radio2,4) ElseIf GUICtrlRead($Radio3) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 3 GUICtrlSetState($Radio3,4) ElseIf GUICtrlRead($Radio4) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 4 GUICtrlSetState($Radio4,4) EndIf _SIRADAKI_SORU() If @error Then _Sonuc() EndSwitch WEnd Func _SIRADAKI_SORU() $SORULAR[0][1] += 1 If $SORULAR[0][0] < $SORULAR[0][1] Then Return SetError(1,0,0) GUICtrlSetData($Edit,$SORULAR[$SORULAR[0][1]][0]) GUICtrlSetData($Radio1,$SORULAR[$SORULAR[0][1]][1]) GUICtrlSetData($Radio2,$SORULAR[$SORULAR[0][1]][2]) GUICtrlSetData($Radio3,$SORULAR[$SORULAR[0][1]][3]) GUICtrlSetData($Radio4,$SORULAR[$SORULAR[0][1]][4]) GUICtrlSetState($Radio2,4) GUICtrlSetState($Radio3,4) GUICtrlSetState($Radio4,4) Return True EndFunc Func _Sonuc() EndFunc Func time() $read = GUICtrlRead($label1) $read = StringReplace($read, "Kalan Süre : ", "") $read = StringReplace($read, " Saniye", "") If $read > 0 Then GUICtrlSetData($label1, "Kalan Süre : " & $read - 1 & " Saniye") Else SoundPlay(@TempDir & "\False.mp3", 0) AdlibUnRegister("time") MsgBox(16, "Bilgi", "Malesef Süre Yetmedi. Skor Tabelasına Yanlış Olarak 1 Puan Ekliyorum..", 0, $Form1) GUICtrlSetData($label1, "Kalan Süre : 21 Saniye") AdlibRegister("time", 1000) $yanlis += 1 GUICtrlSetData($label6,$yanlis) EndIf EndFunc ;==>time Edited November 26, 2017 by darendeli Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 27, 2017 Share Posted November 27, 2017 (edited) Diğer işlemlerini aradan çıkardım kafa karıştırmasın diye son istediğine göre ayarladım kendine göre düzenlersin olurmu. #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <Array.au3> Global $Durdur = True Global $BaslamaZamani = 20 Global $Sayac = $BaslamaZamani Global $zaman AdlibRegister("Zaman", 1000) $Form1 = GUICreate("Bil Bakalım", 418, 402, 192, 124) $Label1 = GUICtrlCreateLabel($BaslamaZamani & " Saniye", 120, 48, 184, 33) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $ButtonBasla = GUICtrlCreateButton("Baslat", 120, 304, 80, 33) $ButtonDur = GUICtrlCreateButton("Durdur", 216, 304, 80, 33) $Button3 = GUICtrlCreateButton("TAMAM", 108, 234, 193, 41) $ButtonReset = GUICtrlCreateButton("Resetle", 120, 344, 80, 33) $ButtonDevamEt = GUICtrlCreateButton("Devam Ettir", 216, 344, 80, 33) GUICtrlSetState($ButtonDur, $GUI_DISABLE) GUICtrlSetState($Button3, $GUI_DISABLE) GUICtrlSetState($ButtonDevamEt, $GUI_DISABLE) GUICtrlSetState($ButtonReset, $GUI_DISABLE) $Radio1 = GUICtrlCreateRadio("CEVAP 1", 28, 142, 91, 19) $Radio2 = GUICtrlCreateRadio("CEVAP 2", 28, 162, 91, 19) $Radio3 = GUICtrlCreateRadio("CEVAP 3", 28, 182, 91, 19) $Radio4 = GUICtrlCreateRadio("CEVAP 4", 28, 202, 91, 19) GUICtrlSetState($Radio1, $GUI_DISABLE) GUICtrlSetState($Radio2, $GUI_DISABLE) GUICtrlSetState($Radio3, $GUI_DISABLE) GUICtrlSetState($Radio4, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 To $Radio4 If BitAND(GUICtrlRead($nMsg), $GUI_CHECKED) Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($ButtonBasla,$GUI_DISABLE) GUICtrlSetState($ButtonDur, $GUI_DISABLE) GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Button3,$ButtonBasla KalanZamanResetle() KalanZamanBaslat() GUICtrlSetState($Radio1,$gui_UNCHECKED) GUICtrlSetState($Radio2,$gui_UNCHECKED) GUICtrlSetState($Radio3,$gui_UNCHECKED) GUICtrlSetState($Radio4,$gui_UNCHECKED) GUICtrlSetState($ButtonBasla,$GUI_DISABLE) GUICtrlSetState($ButtonDur, $GUI_ENABLE) GUICtrlSetState($Button3, $GUI_DISABLE) GUICtrlSetState($Radio1, $GUI_ENABLE) GUICtrlSetState($Radio2, $GUI_ENABLE) GUICtrlSetState($Radio3, $GUI_ENABLE) GUICtrlSetState($Radio4, $GUI_ENABLE) Case $ButtonDur KalanZamanDurdur() GUICtrlSetState($ButtonBasla,$GUI_ENABLE) GUICtrlSetState($ButtonDur, $GUI_DISABLE) GUICtrlSetState($ButtonReset,$GUI_ENABLE) GUICtrlSetState($ButtonDevamEt,$GUI_ENABLE) Case $ButtonReset KalanZamanResetle() Case $ButtonDevamEt KalanZamanDevamEttir() EndSwitch WEnd Func Zaman() If Not $Durdur And $Sayac > 0 Then $Sayac -= 1 GUICtrlSetData($Label1, "Kalan " & $Sayac & " Saniye") EndIf EndFunc Func KalanZamanDurdur() $Durdur = True EndFunc Func KalanZamanResetle() $Durdur = True $Sayac = $BaslamaZamani GUICtrlSetData($Label1, "Kalan " & $Sayac & " Saniye") EndFunc Func KalanZamanDevamEttir() $Durdur = False EndFunc Func KalanZamanBaslat() $Durdur = False $Sayac = $BaslamaZamani GUICtrlSetData($Label1, "Kalan " & $Sayac & " Saniye") EndFunc Edited November 27, 2017 by Mehmet Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 27, 2017 Author Share Posted November 27, 2017 Ben Soyle Bisey Yaptım Mehmet Sadece Cevaplar Dogru Yada Yanlıs ise Skor Tabelasına islemesi Kaldı... #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Global $SORU_SAYISI = 3 Global $SORULAR[$SORU_SAYISI +1][8] = [[$SORU_SAYISI], _ ["Türkiye'nin başkenti neresidir?","Adana","Istanbul","Ankara","Atina",3] , _ ["2+7= ? işleminin sonucu kaçtır?","8","9","7","10",2], _ ["Yılın en soğuk mevsimi hangisidir?","Kış","Ilk Bahar","Son Bahar","Yaz",1] _ ] Global $dogru , $yanlis , $pas $dogru = 0 $yanlis = 0 $pas = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 404, 315, 192, 124) $Label1 = GUICtrlCreateLabel("Kalan Süre : 20 Saniye", 40, 32, 109, 17) $Edit = GUICtrlCreateEdit("", 0, 96, 401, 113) GUICtrlSetState(-1, $GUI_DISABLE) $Button3 = GUICtrlCreateButton("TAMAM", 8, 256, 185, 49) GUICtrlSetState(-1,$GUI_DISABLE) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 8, 216, 97, 27 , BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 104, 216, 97, 27 , BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 200, 216, 97, 27 ,BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 296, 216, 97, 27 ,BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Button2 = GUICtrlCreateButton("PAS GEÇ", 200, 256, 185, 49) $Group1 = GUICtrlCreateGroup("", 192, 24, 209, 65) $Label2 = GUICtrlCreateLabel("DOĞRU", 208, 40, 44, 17) $Label3 = GUICtrlCreateLabel("YANLIŞ", 280, 40, 42, 17) $Label4 = GUICtrlCreateLabel("PAS", 352, 40, 25, 17) $Label5 = GUICtrlCreateLabel("0", 224, 64, 20, 17) $Label6 = GUICtrlCreateLabel("0", 296, 64, 20, 17) $Label7 = GUICtrlCreateLabel("0", 360, 64, 20, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label8 = GUICtrlCreateLabel("SKOR TABELASI", 224, 8, 144, 16) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### AdlibRegister("time", 1000) _SIRADAKI_SORU() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $CheckBox1 If GUICtrlRead($CheckBox1) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $CheckBox2 If GUICtrlRead($CheckBox2) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $CheckBox3 If GUICtrlRead($CheckBox3) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $CheckBox4 If GUICtrlRead($CheckBox4) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Button2 $pas += 1 GUICtrlSetData($Label7,$pas) _SIRADAKI_SORU() Case $Button3 If GUICtrlRead($CheckBox1) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 1 GUICtrlSetState($CheckBox1,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($CheckBox2) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 2 GUICtrlSetState($CheckBox2,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($CheckBox3) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 3 GUICtrlSetState($CheckBox3,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($CheckBox4) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 4 GUICtrlSetState($CheckBox4,4) GUICtrlSetState($Button3,$GUI_DISABLE) EndIf _SIRADAKI_SORU() If @error Then _Sonuc() EndSwitch WEnd Func _SIRADAKI_SORU() $SORULAR[0][1] += 1 If $SORULAR[0][0] < $SORULAR[0][1] Then Return SetError(1,0,0) GUICtrlSetData($Edit,$SORULAR[$SORULAR[0][1]][0]) GUICtrlSetData($label1, "Kalan Süre : 20 Saniye") GUICtrlSetData($CheckBox1,$SORULAR[$SORULAR[0][1]][1]) GUICtrlSetData($CheckBox2,$SORULAR[$SORULAR[0][1]][2]) GUICtrlSetData($CheckBox3,$SORULAR[$SORULAR[0][1]][3]) GUICtrlSetData($CheckBox4,$SORULAR[$SORULAR[0][1]][4]) GUICtrlSetState($CheckBox2,4) GUICtrlSetState($CheckBox3,4) GUICtrlSetState($CheckBox4,4) Return True EndFunc Func _Sonuc() EndFunc Func time() $read = GUICtrlRead($label1) $read = StringReplace($read, "Kalan Süre : ", "") $read = StringReplace($read, " Saniye", "") If $read > 0 Then GUICtrlSetData($label1, "Kalan Süre : " & $read - 1 & " Saniye") Else SoundPlay(@TempDir & "\False.mp3", 0) AdlibUnRegister("time") MsgBox(16, "Bilgi", "Malesef Süre Yetmedi. Skor Tabelasına Yanlış Olarak 1 Puan Ekliyorum..", 0, $Form1) GUICtrlSetData($label1, "Kalan Süre : 21 Saniye") AdlibRegister("time", 1000) $yanlis += 1 GUICtrlSetData($label6,$yanlis) EndIf EndFunc ;==>time Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 28, 2017 Author Share Posted November 28, 2017 Arkadaslar oyunun sonuna geldim Skor Tabelasına Skorlar en son isliyor Her Soruda işlemiyor Neden Acaba 2. olarakta Soru Bitince Direk Kapanıyor #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> Global $SORU_SAYISI = 3 Global $SORULAR[$SORU_SAYISI +1][8] = [[$SORU_SAYISI], _ ["Türkiye'nin başkenti neresidir?","Adana","Istanbul","Ankara","Atina",3] , _ ["2+7= ? işleminin sonucu kaçtır?","8","9","7","10",2], _ ["Yılın en soğuk mevsimi hangisidir?","Kış","Ilk Bahar","Son Bahar","Yaz",1] _ ] Global $dogru , $yanlis , $pas $dogru = 0 $yanlis = 0 $pas = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 404, 315, 192, 124) $Label1 = GUICtrlCreateLabel("Kalan Süre : 20 Saniye", 40, 32, 109, 17) $Edit = GUICtrlCreateEdit("", 0, 96, 401, 113) GUICtrlSetState(-1, $GUI_DISABLE) $Button3 = GUICtrlCreateButton("TAMAM", 8, 256, 185, 49) GUICtrlSetState(-1,$GUI_DISABLE) $Checkbox1 = GUICtrlCreateCheckbox("", 8, 216, 97, 27 , BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox2 = GUICtrlCreateCheckbox("", 104, 216, 97, 27 , BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox3 = GUICtrlCreateCheckbox("", 200, 216, 97, 27 ,BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Checkbox4 = GUICtrlCreateCheckbox("", 296, 216, 97, 27 ,BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_PUSHLIKE)) $Button2 = GUICtrlCreateButton("PAS GEÇ", 200, 256, 185, 49) $Group1 = GUICtrlCreateGroup("", 192, 24, 209, 65) $Label2 = GUICtrlCreateLabel("DOĞRU", 208, 40, 44, 17) $Label3 = GUICtrlCreateLabel("YANLIŞ", 280, 40, 42, 17) $Label4 = GUICtrlCreateLabel("PAS", 352, 40, 25, 17) $Label5 = GUICtrlCreateLabel("0", 224, 64, 20, 17) $Label6 = GUICtrlCreateLabel("0", 296, 64, 20, 17) $Label7 = GUICtrlCreateLabel("0", 360, 64, 20, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label8 = GUICtrlCreateLabel("SKOR TABELASI", 224, 8, 144, 16) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### AdlibRegister("time", 1000) _SIRADAKI_SORU() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Checkbox1 If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Checkbox2 If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Checkbox3 If GUICtrlRead($Checkbox3) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Checkbox4 If GUICtrlRead($Checkbox4) = $GUI_CHECKED Then GUICtrlSetState($Button3, $GUI_ENABLE) Else GUICtrlSetState($Button3, $GUI_DISABLE) EndIf Case $Button2 If $SORU_SAYISI > $pas Then $pas += 1 GUICtrlSetData($Label7,$pas) EndIf _SIRADAKI_SORU() Case $Button3 _ButonaAktarim() _SIRADAKI_SORU() If @error Then _DogruYanlis() EndSwitch WEnd Func _ButonaAktarim() If GUICtrlRead($Checkbox1) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 1 GUICtrlSetState($Checkbox1,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($Checkbox2) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 2 GUICtrlSetState($Checkbox2,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($Checkbox3) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 3 GUICtrlSetState($Checkbox3,4) GUICtrlSetState($Button3,$GUI_DISABLE) ElseIf GUICtrlRead($Checkbox4) = 1 Then $SORULAR[$SORULAR[0][1]][6] = 4 GUICtrlSetState($Checkbox4,4) GUICtrlSetState($Button3,$GUI_DISABLE) EndIf EndFunc Func _SIRADAKI_SORU() $SORULAR[0][1] += 1 If $SORULAR[0][0] < $SORULAR[0][1] Then Return SetError(1,0,0) GUICtrlSetData($Edit,$SORULAR[$SORULAR[0][1]][0]) GUICtrlSetData($label1, "Kalan Süre : 20 Saniye") GUICtrlSetData($Checkbox1,$SORULAR[$SORULAR[0][1]][1]) GUICtrlSetData($Checkbox2,$SORULAR[$SORULAR[0][1]][2]) GUICtrlSetData($Checkbox3,$SORULAR[$SORULAR[0][1]][3]) GUICtrlSetData($Checkbox4,$SORULAR[$SORULAR[0][1]][4]) Return True EndFunc Func _DogruYanlis() For $I = 1 to $SORULAR[0][0] If $SORULAR[$I][5] = $SORULAR[$I][6] Then $dogru += 1 GUICtrlSetData($Label5,$dogru) Else $yanlis += 1 GUICtrlSetData($Label6,$yanlis) EndIf Next Exit EndFunc Func time() $read = GUICtrlRead($label1) $read = StringReplace($read, "Kalan Süre : ", "") $read = StringReplace($read, " Saniye", "") If $read > 0 Then GUICtrlSetData($label1, "Kalan Süre : " & $read - 1 & " Saniye") Else SoundPlay(@TempDir & "\False.mp3", 0) AdlibUnRegister("time") MsgBox(16, "Bilgi", "Malesef Süre Yetmedi. Skor Tabelasına Yanlış Olarak 1 Puan Ekliyorum..", 0, $Form1) GUICtrlSetData($label1, "Kalan Süre : 21 Saniye") AdlibRegister("time", 1000) $yanlis += 1 GUICtrlSetData($label6,$yanlis) EndIf EndFunc ;==>time Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 29, 2017 Share Posted November 29, 2017 Her seferinde Skor tabelasına eklemek için bir koşul belirleyip kontrol etmen gerekir. Soru kısmınıda bir döngüye sokup bitince ContinueLoop eklersin. bu arada array mantığını kavradıysan artık sorularını ini dosyasından çekmen daha sağlıklı olacaktır,yok ben soruların dışarıda kalmasını istemiyorum gizli kalsın dersen böylede olur. Quote Link to comment Share on other sites More sharing options...
darendeli Posted November 29, 2017 Author Share Posted November 29, 2017 (edited) Func _DogruYanlis() For $I = 1 to $SORULAR[0][0] If $SORULAR[$I][5] = $SORULAR[$I][6] Then $dogru += 1 GUICtrlSetData($Label5,$dogru) Else $yanlis += 1 GUICtrlSetData($Label6,$yanlis) EndIf Next Exit EndFunc Gibi birsey Yaptım Kontrol Etsin die ama olmuyor burda verilen cevap dogru cevapla esitse dogru labeline yanlıs ise yanlıs labeline islem yaptırıyor fakat en son kapanırken yapıyor... Bir Yerde Eksik yada Hata olabilir Görmedigim.. Edited November 29, 2017 by darendeli Quote Link to comment Share on other sites More sharing options...
darendeli Posted December 6, 2017 Author Share Posted December 6, 2017 Daredeli BilBakalım V1 Yayında Yorumlarınızı Bekliyorum Arkadaslar... Quote Link to comment Share on other sites More sharing options...
darendeli Posted December 7, 2017 Author Share Posted December 7, 2017 Link Yenilendi Skin ile olusan Virüs Olarak Algılamadan Dolayı Skin Degistirildi Sarkılı Soru Eklendi Quote Link to comment Share on other sites More sharing options...
mbilgili Posted December 7, 2017 Share Posted December 7, 2017 üstadım ellerine , emeğine sağlık. gayet güzel olmuş faydalı bir program. Tam ekran olmuyor mu? Quote Link to comment Share on other sites More sharing options...
darendeli Posted December 7, 2017 Author Share Posted December 7, 2017 (edited) Öncelikle Yorumunuz için Tesekkurler ...Önerilerinizi Dikkate alacagım Tam Ekran Modu Eklenecektir... Edited December 7, 2017 by darendeli Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.