Jump to content

darendeli

Üye
  • Posts

    45
  • Joined

  • Last visited

Posts posted by darendeli

  1. 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..

  2. 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
    
    
    

     

  3. 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
    
    
    

     

  4. 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
    
    
    

     

  5. 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
    
    
    

     

  6. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseUpx=y
    #AutoIt3Wrapper_Res_Language=1055
    #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <WindowsConstants.au3>
    #include <Array.au3>
    #include <GUIEdit.au3>
    #include <GuiListView.au3>
    #Region ### START Koda GUI section ### Form=
    $gui = GUICreate("Çekilis Pro", 615, 522, 192, 124)
    $input = GUICtrlCreateInput("", 312, 24, 201, 21)
    $Button2 = GUICtrlCreateButton("ÇEKİLİŞİ BAŞLAT", 16, 432, 587, 73)
    $Input2 = GUICtrlCreateInput("", 552, 24, 49, 21,0x2000)
    GUICtrlSetLimit(-1,1)
    $List2 = GUICtrlCreateList("", 312, 56, 289, 370, BitOR($WS_BORDER, $WS_VSCROLL))
    $Button1 = GUICtrlCreateButton("KATILIMCI EKLE", 16, 2, 283, 23)
    $Button3 = GUICtrlCreateButton("KATILIMCI Sil", 16, 25, 283, 23)
    $Label1 = GUICtrlCreateLabel("Kullanıcı ismi", 380, 2, 283, 20)
    $Label2 = GUICtrlCreateLabel("Seçilecek Sayı", 540, 2, 283, 20)
    $list = _GUICtrlListView_Create($gui, "", 1, 50, 310, 379)
    _GUICtrlListView_SetExtendedListViewStyle($list, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $WS_EX_CLIENTEDGE))
    _GUICtrlListView_InsertColumn($list, 0, "SIRA")
    _GUICtrlListView_InsertColumn($list, 1, "ÇEKİLİŞE KATILAN KİŞİLER")
    If(FileExists(@ScriptDir & "\cekilis.ini")) Then
    	$read_section = IniReadSectionNames(@ScriptDir & "\cekilis.ini")
    	For $i = 1 To $read_section[0]
    		$read = IniReadSection(@ScriptDir & "\cekilis.ini", $read_section[$i])
    		_GUICtrlListView_AddItem($list, $i)
    		_GUICtrlListView_AddSubItem($list, ($i -1), $read_section[$i], 1)
        For $i2 = 1 To $read[0][0]
    			If($read[$i2][0] == "ÇEKİLİŞE KATILAN KİŞİLER") Then _GUICtrlListView_AddSubItem($list, ($i -1), $read[$i2][1], 2)
    		Next
    	Next
    EndIf
    _center_list($list)
    _list_column_size($gui, $list)
    
    $KisiSil =GUICtrlCreateDummy()
    $KisiEkle =GUICtrlCreateDummy()
    Dim $EkleSil [2][2] = [["{DELETE}",$KisiSil],["{ENTER}",$KisiEkle]]
    GUISetAccelerators($EkleSil)
    
    
    GUISetState()
    #EndRegion ### END Koda GUI section ###
    
    While 1
    	Switch GUIGetMsg()
    		Case -3
    			Exit
    		Case $Button1,$KisiEkle
    			IniWrite(@ScriptDir & "\cekilis.ini", GUICtrlRead($input), "ÇEKİLİŞE KATILAN KİŞİLER", GUICtrlRead($input2))
    			$count = _GUICtrlListView_GetItemCount($list)
    			_GUICtrlListView_AddItem($list, $count+1)
    			_GUICtrlListView_AddSubItem($list, $count, GUICtrlRead($input), 1)
    			_list_column_size($gui, $list)
    			GUICtrlSetData($input, "")
    		Case $Button3,$KisiSil
                ConfigRemData()
    		Case $Button2
    			GUICtrlSetData($List2,"")
    			$katilimcisayisi = Number(_GUICtrlListView_GetItemCount($list))
    			$secilecekkisisayisi = Number(GUICtrlRead($input2))
    			if $secilecekkisisayisi > $katilimcisayisi Then
    				MsgBox(0,"Hata","Seçilecek kişi sayısı katılımcıdan fazla olmamalı.")
    			Else
    				Local $secilenler[$secilecekkisisayisi+1]
    				$secilenler[0] = ""
    				Local $secilenlerisim[$secilecekkisisayisi]
    				for $i = 1 to $secilecekkisisayisi
    					Do
    						$simdisecilen = Random(1,$katilimcisayisi,1)
    					Until _ArraySearch($secilenler,$simdisecilen) = -1
    					$secilenler[$i] = $simdisecilen
    					$secilenlerisim[$i-1] = _GUICtrlListView_GetItemText($list,$simdisecilen-1,1)
    				Next
    				GUICtrlSetData($List2,_ArrayToString($secilenlerisim))
    			EndIf
    	EndSwitch
    WEnd
    
    
    Func ConfigRemData()
    	DeleteSelectedItems()
    ;~     _GUICtrlListView_DeleteItemsSelected($list)
    EndFunc   ;==>ConfigRemData
    
    Func DeleteSelectedItems()
    	Local $SelectedItems = _GUICtrlListView_GetSelectedIndices($list,True)
    	For $i = 1 To $SelectedItems[0]
    		IniDelete(@ScriptDir & "\cekilis.ini",_GUICtrlListView_GetItemText($list,$SelectedItems[$i],1))
    		_GUICtrlListView_DeleteItem($list,$SelectedItems[$i])
        Next
    	Local $icerik = FileReadToArray(@ScriptDir & "\cekilis.ini")
    	If @error Then;dosya boş olunca hata vereceği için bu kod bloğuna alıyorum
    		FileDelete(@ScriptDir & "\cekilis.ini")
    	EndIf
    EndFunc
    
    Func _center_list($list_handle)
    	For $i = 0 To _GUICtrlListView_GetColumnCount($list_handle) - 1
    		_GUICtrlListView_JustifyColumn($list_handle, $i, 2)
    	Next
    EndFunc   ;==>_center_list
    Func _list_column_size($gui_handle, $list_handle)
    	$iScroll_Allowance = 0
    	_GUICtrlListView_EnsureVisible($list_handle, _GUICtrlListView_GetItemCount($list_handle))
    	If _GUICtrlListView_GetTopIndex($list_handle) > 0 Then
    		$iScroll_Allowance = 17
    	EndIf
    	_GUICtrlListView_EnsureVisible($list_handle, 0)
    	$iLV_Width = $iScroll_Allowance
    	For $i = 0 To _GUICtrlListView_GetColumnCount($list_handle) - 1
    		_GUICtrlListView_SetColumnWidth($list_handle, $i, $LVSCW_AUTOSIZE_USEHEADER)
    		$iHeader_Width = _GUICtrlListView_GetColumnWidth($list_handle, $i)
    		_GUICtrlListView_SetColumnWidth($list_handle, $i, $LVSCW_AUTOSIZE)
    		$iData_Width = _GUICtrlListView_GetColumnWidth($list_handle, $i)
    		If $iHeader_Width > $iData_Width Then
    			_GUICtrlListView_SetColumnWidth($list_handle, $i, $iHeader_Width)
    			$iLV_Width += $iHeader_Width
    		Else
    			$iLV_Width += $iData_Width
    		EndIf
    	Next
    	;ControlMove($gui_handle, "", $list_handle, Default, Default, $iLV_Width)
    	;WinMove($gui_handle, "", Default, Default, $iLV_Width + 30)
    EndFunc   ;==>_list_column_size

    Kodun Son Hali  Enter Ve Delete ile Ekleyip Silme Eklendi...

  7. Gui Finder i kullanarak coordinat ve pixel rengini almak istiyorum  kütüphanesinde degisiklik mi yapmak gerekli sürükleyip bırakınca biriyle coordinat biriyle renk almak istiyorum

    #include<GUIFinder.au3>
    
    $hGUI = GUICreate("guifinder deneme", 300, 100)
    
    $hFinder = _GUICtrlFinder_Create($hGUI, 230, 4)
    $Input1 = GUICtrlCreateInput("", 5, 10)
    
    $hFinder2 = _GUICtrlFinder_Create($hGUI, 230, 54)
    $Input1 = GUICtrlCreateInput("", 5, 60)
    GUISetState(@SW_SHOW)
    GUISetState()
    
    
    While True
        $iMsg  = GUIGetMsg()
        Switch $iMsg
            Case -3
                ExitLoop
        EndSwitch
    WEnd

     

  8. Çekiliş Programı Yapacagım  bir yerde tıkandım  Eklenen Kisilerin Listesinden Random olarak Diger listeye Akrarım saglamak istiyorum  Secilecek Sayı Yazan inputtaki Kisi Kadar...

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseUpx=y
    #AutoIt3Wrapper_Res_Language=1055
    #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <WindowsConstants.au3>
    #include <GUIEdit.au3>
    #include <GuiListView.au3>
    #Region ### START Koda GUI section ### Form=
    $gui = GUICreate("Çekilis Pro", 615, 522, 192, 124)
    $input = GUICtrlCreateInput("", 312, 24, 201, 21)
    $Button2 = GUICtrlCreateButton("ÇEKİLİŞİ BAŞLAT", 16, 432, 587, 73)
    $Input2 = GUICtrlCreateInput("", 552, 24, 49, 21)
    $List2 = GUICtrlCreateList("", 312, 56, 289, 370)
    $Button1 = GUICtrlCreateButton("KATILIMCI EKLE", 16, 2, 283, 23)
    $Button3 = GUICtrlCreateButton("KATILIMCI Sil", 16, 25, 283, 23)
    $Label1 = GUICtrlCreateLabel("Kullanıcı ismi", 380, 2, 283, 20)
    $Label2 = GUICtrlCreateLabel("Seçilecek Sayı", 540, 2, 283, 20)
    $list = _GUICtrlListView_Create($gui, "", 1, 50, 310, 379)
    _GUICtrlListView_SetExtendedListViewStyle($list, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $WS_EX_CLIENTEDGE))
    _GUICtrlListView_InsertColumn($list, 0, "SIRA")
    _GUICtrlListView_InsertColumn($list, 1, "ÇEKİLİŞE KATILAN KİŞİLER")
    If(FileExists(@ScriptDir & "\cekilis.ini")) Then
    	$read_section = IniReadSectionNames(@ScriptDir & "\cekilis.ini")
    	For $i = 1 To $read_section[0]
    		$read = IniReadSection(@ScriptDir & "\cekilis.ini", $read_section[$i])
    		_GUICtrlListView_AddItem($list, $i)
    		_GUICtrlListView_AddSubItem($list, ($i -1), $read_section[$i], 1)
        For $i2 = 1 To $read[0][0]
    			If($read[$i2][0] == "ÇEKİLİŞE KATILAN KİŞİLER") Then _GUICtrlListView_AddSubItem($list, ($i -1), $read[$i2][1], 2)
    		Next
    	Next
    EndIf
    _center_list($list)
    _list_column_size($gui, $list)
    GUISetState()
    #EndRegion ### END Koda GUI section ###
    
    While 1
    	Switch GUIGetMsg()
    		Case -3
    			Exit
    		Case $Button1
    			IniWrite(@ScriptDir & "\filmler.ini", GUICtrlRead($input), "ÇEKİLİŞE KATILAN KİŞİLER", GUICtrlRead($input2))
    			$count = _GUICtrlListView_GetItemCount($list)
    			_GUICtrlListView_AddItem($list, $count+1)
    			_GUICtrlListView_AddSubItem($list, $count, GUICtrlRead($input), 1)
    
    			_list_column_size($gui, $list)
    			GUICtrlSetData($input, "")
    
    Case $Button3
                    ConfigRemData()
    
    	EndSwitch
    WEnd
    
    
    Func ConfigRemData()
    	DeleteSelectedItems()
    ;~     _GUICtrlListView_DeleteItemsSelected($list)
    EndFunc   ;==>ConfigRemData
    
    Func DeleteSelectedItems()
    	Local $SelectedItems = _GUICtrlListView_GetSelectedIndices($list,True)
    	For $i = 1 To $SelectedItems[0]
    		IniDelete(@ScriptDir & "\cekilis.ini",_GUICtrlListView_GetItemText($list,$SelectedItems[$i],1))
    		_GUICtrlListView_DeleteItem($list,$SelectedItems[$i])
        Next
    	Local $icerik = FileReadToArray(@ScriptDir & "\cekilis.ini")
    	If @error Then;dosya boş olunca hata vereceği için bu kod bloğuna alıyorum
    		FileDelete(@ScriptDir & "\cekilis.ini")
    	EndIf
    EndFunc
    
    Func _center_list($list_handle)
    	For $i = 0 To _GUICtrlListView_GetColumnCount($list_handle) - 1
    		_GUICtrlListView_JustifyColumn($list_handle, $i, 2)
    	Next
    EndFunc   ;==>_center_list
    Func _list_column_size($gui_handle, $list_handle)
    	$iScroll_Allowance = 0
    	_GUICtrlListView_EnsureVisible($list_handle, _GUICtrlListView_GetItemCount($list_handle))
    	If _GUICtrlListView_GetTopIndex($list_handle) > 0 Then
    		$iScroll_Allowance = 17
    	EndIf
    	_GUICtrlListView_EnsureVisible($list_handle, 0)
    	$iLV_Width = $iScroll_Allowance
    	For $i = 0 To _GUICtrlListView_GetColumnCount($list_handle) - 1
    		_GUICtrlListView_SetColumnWidth($list_handle, $i, $LVSCW_AUTOSIZE_USEHEADER)
    		$iHeader_Width = _GUICtrlListView_GetColumnWidth($list_handle, $i)
    		_GUICtrlListView_SetColumnWidth($list_handle, $i, $LVSCW_AUTOSIZE)
    		$iData_Width = _GUICtrlListView_GetColumnWidth($list_handle, $i)
    		If $iHeader_Width > $iData_Width Then
    			_GUICtrlListView_SetColumnWidth($list_handle, $i, $iHeader_Width)
    			$iLV_Width += $iHeader_Width
    		Else
    			$iLV_Width += $iData_Width
    		EndIf
    	Next
    	;ControlMove($gui_handle, "", $list_handle, Default, Default, $iLV_Width)
    	;WinMove($gui_handle, "", Default, Default, $iLV_Width + 30)
    EndFunc   ;==>_list_column_size

     

  9. s.a Aranıza Yeni Katıldım

     

    yapmak istedigim belirledigim bir formda kayit olmak icin gerekli form bilgilerini  olusturacagim guideki  inputlardan bilgileri degistire bilmek ve bunları kaydetmek baslatılınca kayıt o bilgilerle saglanacak  yapmıs oldugum kayıt listwiewde gösteriler bilir 

     

    nasıl kodlara ihtiyac var acaba

×
×
  • Create New...