Jump to content

Bingo Caller


Ashww
 Share

Recommended Posts

Ok, this is a Bingo Caller.

Its very simple, and could probably be alot smaller (its over 1000 lines)

Please feel free to add and make changed to the script, and then upload to this topic.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$MainGUI = GUICreate("Bingo Caller", 411, 193)
$Lastcalled = GUICtrlCreateLabel("00", 8, 8, 148, 152)
GUICtrlSetFont(-1, 100, 400, 0, "MS Sans Serif")
$a1 = GUICtrlCreateLabel("", 168, 8, 16, 17)
$a2 = GUICtrlCreateLabel("", 192, 8, 16, 17)
$a3 = GUICtrlCreateLabel("", 216, 8, 16, 17)
$a4 = GUICtrlCreateLabel("", 240, 8, 16, 17)
$a5 = GUICtrlCreateLabel("", 264, 8, 16, 17)
$a6 = GUICtrlCreateLabel("", 288, 8, 16, 17)
$a7 = GUICtrlCreateLabel("", 312, 8, 16, 17)
$a8 = GUICtrlCreateLabel("", 336, 8, 16, 17)
$a9 = GUICtrlCreateLabel("", 360, 8, 16, 17)
$a10 = GUICtrlCreateLabel("", 384, 8, 22, 17)
$a11 = GUICtrlCreateLabel("", 168, 24, 22, 17)
$a12 = GUICtrlCreateLabel("", 192, 24, 22, 17)
$a13 = GUICtrlCreateLabel("", 216, 24, 22, 17)
$a14 = GUICtrlCreateLabel("", 240, 24, 22, 17)
$a15 = GUICtrlCreateLabel("", 264, 24, 22, 17)
$a16 = GUICtrlCreateLabel("", 288, 24, 22, 17)
$a17 = GUICtrlCreateLabel("", 312, 24, 22, 17)
$a18 = GUICtrlCreateLabel("", 336, 24, 22, 17)
$a19 = GUICtrlCreateLabel("", 360, 24, 22, 17)
$a20 = GUICtrlCreateLabel("", 384, 24, 22, 17)
$a21 = GUICtrlCreateLabel("", 168, 40, 22, 17)
$a22 = GUICtrlCreateLabel("", 192, 40, 22, 17)
$a23 = GUICtrlCreateLabel("", 216, 40, 22, 17)
$a24 = GUICtrlCreateLabel("", 240, 40, 22, 17)
$a25 = GUICtrlCreateLabel("", 264, 40, 22, 17)
$a26 = GUICtrlCreateLabel("", 288, 40, 22, 17)
$a27 = GUICtrlCreateLabel("", 312, 40, 21, 17)
$a28 = GUICtrlCreateLabel("", 336, 40, 22, 17)
$a29 = GUICtrlCreateLabel("", 360, 40, 22, 17)
$a30 = GUICtrlCreateLabel("", 384, 40, 22, 17)
$a31 = GUICtrlCreateLabel("", 168, 56, 22, 17)
$a32 = GUICtrlCreateLabel("", 192, 56, 22, 17)
$a33 = GUICtrlCreateLabel("", 216, 56, 22, 17)
$a34 = GUICtrlCreateLabel("", 240, 56, 22, 17)
$a35 = GUICtrlCreateLabel("", 264, 56, 22, 17)
$a36 = GUICtrlCreateLabel("", 288, 56, 22, 17)
$a37 = GUICtrlCreateLabel("", 312, 56, 22, 17)
$a38 = GUICtrlCreateLabel("", 336, 56, 22, 17)
$a39 = GUICtrlCreateLabel("", 360, 56, 22, 17)
$a40 = GUICtrlCreateLabel("", 384, 56, 22, 17)
$a41 = GUICtrlCreateLabel("", 168, 72, 22, 17)
$a42 = GUICtrlCreateLabel("", 192, 72, 22, 17)
$a43 = GUICtrlCreateLabel("", 216, 72, 22, 17)
$a44 = GUICtrlCreateLabel("", 240, 72, 22, 17)
$a45 = GUICtrlCreateLabel("", 264, 72, 22, 17)
$a46 = GUICtrlCreateLabel("", 288, 72, 22, 17)
$a47 = GUICtrlCreateLabel("", 312, 72, 22, 17)
$a48 = GUICtrlCreateLabel("", 336, 72, 22, 17)
$a49 = GUICtrlCreateLabel("", 360, 72, 22, 17)
$a50 = GUICtrlCreateLabel("", 384, 72, 22, 17)
$a51 = GUICtrlCreateLabel("", 168, 88, 22, 17)
$a52 = GUICtrlCreateLabel("", 192, 88, 22, 17)
$a53 = GUICtrlCreateLabel("", 216, 88, 22, 17)
$a54 = GUICtrlCreateLabel("", 240, 88, 22, 17)
$a55 = GUICtrlCreateLabel("", 264, 88, 22, 17)
$a56 = GUICtrlCreateLabel("", 288, 88, 22, 17)
$a57 = GUICtrlCreateLabel("", 312, 88, 22, 17)
$a58 = GUICtrlCreateLabel("", 336, 88, 22, 17)
$a59 = GUICtrlCreateLabel("", 360, 88, 22, 17)
$a60 = GUICtrlCreateLabel("", 384, 88, 22, 17)
$a61 = GUICtrlCreateLabel("", 168, 104, 22, 17)
$a62 = GUICtrlCreateLabel("", 192, 104, 22, 17)
$a63 = GUICtrlCreateLabel("", 216, 104, 22, 17)
$a64 = GUICtrlCreateLabel("", 240, 104, 22, 17)
$a65 = GUICtrlCreateLabel("", 264, 104, 22, 17)
$a66 = GUICtrlCreateLabel("", 288, 104, 22, 17)
$a67 = GUICtrlCreateLabel("", 312, 104, 22, 17)
$a68 = GUICtrlCreateLabel("", 336, 104, 22, 17)
$a69 = GUICtrlCreateLabel("", 360, 104, 22, 17)
$a70 = GUICtrlCreateLabel("", 384, 104, 22, 17)
$a71 = GUICtrlCreateLabel("", 168, 120, 22, 17)
$a72 = GUICtrlCreateLabel("", 192, 120, 22, 17)
$a73 = GUICtrlCreateLabel("", 216, 120, 22, 17)
$a74 = GUICtrlCreateLabel("", 240, 120, 22, 17)
$a75 = GUICtrlCreateLabel("", 264, 120, 22, 17)
$a76 = GUICtrlCreateLabel("", 288, 120, 22, 17)
$a77 = GUICtrlCreateLabel("", 312, 120, 22, 17)
$a78 = GUICtrlCreateLabel("", 336, 120, 22, 17)
$a79 = GUICtrlCreateLabel("", 360, 120, 22, 17)
$a80 = GUICtrlCreateLabel("", 384, 120, 22, 17)
$a81 = GUICtrlCreateLabel("", 168, 136, 22, 17)
$a82 = GUICtrlCreateLabel("", 192, 136, 22, 17)
$a83 = GUICtrlCreateLabel("", 216, 136, 22, 17)
$a84 = GUICtrlCreateLabel("", 240, 136, 22, 17)
$a85 = GUICtrlCreateLabel("", 264, 136, 22, 17)
$a86 = GUICtrlCreateLabel("", 288, 136, 22, 17)
$a87 = GUICtrlCreateLabel("", 312, 136, 22, 17)
$a88 = GUICtrlCreateLabel("", 336, 136, 22, 17)
$a89 = GUICtrlCreateLabel("", 360, 136, 22, 17)
$a90 = GUICtrlCreateLabel("", 384, 136, 22, 17)
$Startcalling = GUICtrlCreateButton("Start", 8, 160, 197, 25, 0)
GUICtrlSetState(-1, $GUI_CHECKED)
GUISetState(@SW_SHOW)


#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Startcalling
            Calling()
    EndSwitch
WEnd



Func Calling()
    
While 1
    
    
    Sleep(3000)
    $call = Random(0,90, 1)
    
;1
    If $call = 1 Then
        If GUICtrlRead($a1) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a1, "1")
    Else
    Calling()
    EndIf
        EndIf

;2
    If $call = 2 Then
        If GUICtrlRead($a2) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a2, "2")
    Else
    Calling()
    EndIf
        EndIf

;3
    If $call = 3 Then
        If GUICtrlRead($a3) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a3, "3")
    Else
    Calling()
    EndIf
        EndIf

;4
    If $call = 4 Then
        If GUICtrlRead($a4) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a4, "4")
    Else
    Calling()
    EndIf
        EndIf

;5
    If $call = 5 Then
        If GUICtrlRead($a5) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a5, "5")
    Else
    Calling()
    EndIf
        EndIf

;6
    If $call = 6 Then
        If GUICtrlRead($a6) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a6, "6")
    Else
    Calling()
    EndIf
        EndIf

;7
    If $call = 7 Then
        If GUICtrlRead($a7) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a7, "7")
    Else
    Calling()
    EndIf
        EndIf

;8
    If $call = 8 Then
        If GUICtrlRead($a8) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a8, "8")
    Else
    Calling()
    EndIf
        EndIf

;9
    If $call = 9 Then
        If GUICtrlRead($a9) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a9, "9")
    Else
    Calling()
    EndIf
        EndIf

;10
    If $call = 10 Then
        If GUICtrlRead($a10) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a10, "10")
    Else
    Calling()
    EndIf
        EndIf

;11
    If $call = 11 Then
        If GUICtrlRead($a11) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a11, "11")
    Else
    Calling()
    EndIf
        EndIf

;12
    If $call = 12 Then
        If GUICtrlRead($a12) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a12, "12")
    Else
    Calling()
    EndIf
        EndIf

;13
    If $call = 13 Then
        If GUICtrlRead($a13) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a13, "13")
    Else
    Calling()
    EndIf
        EndIf

;14
    If $call = 14 Then
        If GUICtrlRead($a14) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a14, "14")
    Else
    Calling()
    EndIf
        EndIf

;15
    If $call = 15 Then
        If GUICtrlRead($a15) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a15, "15")
    Else
    Calling()
    EndIf
        EndIf

;16
    If $call = 16 Then
        If GUICtrlRead($a16) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a16, "16")
    Else
    Calling()
    EndIf
        EndIf

;17
    If $call = 17 Then
        If GUICtrlRead($a17) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a17, "17")
    Else
    Calling()
    EndIf
        EndIf

;18
    If $call = 18 Then
        If GUICtrlRead($a18) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a18, "18")
    Else
    Calling()
    EndIf
        EndIf

;19
    If $call = 19 Then
        If GUICtrlRead($a19) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a19, "19")
    Else
    Calling()
    EndIf
        EndIf

;20
    If $call = 20 Then
        If GUICtrlRead($a20) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a20, "20")
    Else
    Calling()
    EndIf
        EndIf

;21
    If $call = 21 Then
        If GUICtrlRead($a21) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a21, "21")
    Else
    Calling()
    EndIf
        EndIf

;22
    If $call = 22 Then
        If GUICtrlRead($a22) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a22, "22")
    Else
    Calling()
    EndIf
        EndIf

;23
    If $call = 23 Then
        If GUICtrlRead($a23) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a23, "23")
    Else
    Calling()
    EndIf
        EndIf

;24
    If $call = 24 Then
        If GUICtrlRead($a24) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a24, "24")
    Else
    Calling()
    EndIf
        EndIf

;25
    If $call = 25 Then
        If GUICtrlRead($a25) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a25, "25")
    Else
    Calling()
    EndIf
        EndIf

;26
    If $call = 26 Then
        If GUICtrlRead($a26) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a26, "26")
    Else
    Calling()
    EndIf
        EndIf

;27
    If $call = 27 Then
        If GUICtrlRead($a27) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a27, "27")
    Else
    Calling()
    EndIf
        EndIf

;28
    If $call = 28 Then
        If GUICtrlRead($a28) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a28, "28")
    Else
    Calling()
    EndIf
        EndIf

;29
    If $call = 29 Then
        If GUICtrlRead($a29) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a29, "29")
    Else
    Calling()
    EndIf
        EndIf

;30
    If $call = 30 Then
        If GUICtrlRead($a30) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a30, "30")
    Else
    Calling()
    EndIf
        EndIf

;31
    If $call = 31 Then
        If GUICtrlRead($a31) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a31, "31")
    Else
    Calling()
    EndIf
        EndIf

;32
    If $call = 32 Then
        If GUICtrlRead($a32) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a32, "32")
    Else
    Calling()
    EndIf
        EndIf

;33
    If $call = 33 Then
        If GUICtrlRead($a33) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a33, "33")
    Else
    Calling()
    EndIf
        EndIf

;34
    If $call = 34 Then
        If GUICtrlRead($a34) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a34, "34")
    Else
    Calling()
    EndIf
        EndIf
;35
    If $call = 35 Then
        If GUICtrlRead($a35) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a35, "35")
    Else
    Calling()
    EndIf
        EndIf

;36
    If $call = 36 Then
        If GUICtrlRead($a36) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a36, "36")
    Else
    Calling()
    EndIf
        EndIf

;37
    If $call = 37 Then
        If GUICtrlRead($a37) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a37, "37")
    Else
    Calling()
    EndIf
        EndIf

;38
    If $call = 38 Then
        If GUICtrlRead($a38) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a38, "38")
    Else
    Calling()
    EndIf
        EndIf

;39
    If $call = 39 Then
        If GUICtrlRead($a39) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a39, "39")
    Else
    Calling()
    EndIf
        EndIf

;40
    If $call = 40 Then
        If GUICtrlRead($a40) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a40, "40")
    Else
    Calling()
    EndIf
        EndIf

;41
    If $call = 41 Then
        If GUICtrlRead($a41) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a41, "41")
    Else
    Calling()
    EndIf
        EndIf

;42
    If $call = 42 Then
        If GUICtrlRead($a42) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a42, "42")
    Else
    Calling()
    EndIf
        EndIf

;43
    If $call = 43 Then
        If GUICtrlRead($a43) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a43, "43")
    Else
    Calling()
    EndIf
        EndIf

;44
    If $call = 44 Then
        If GUICtrlRead($a44) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a44, "44")
    Else
    Calling()
    EndIf
        EndIf

;45
    If $call = 45 Then
        If GUICtrlRead($a45) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a45, "45")
    Else
    Calling()
    EndIf
        EndIf

;46
    If $call = 46 Then
        If GUICtrlRead($a46) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a46, "46")
    Else
    Calling()
    EndIf
        EndIf

;47
    If $call = 47 Then
        If GUICtrlRead($a47) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a47, "47")
    Else
    Calling()
    EndIf
        EndIf

;48
    If $call = 48 Then
        If GUICtrlRead($a48) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a48, "48")
    Else
    Calling()
    EndIf
        EndIf

;49
    If $call = 49 Then
        If GUICtrlRead($a49) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a49, "49")
    Else
    Calling()
    EndIf
        EndIf

;50
    If $call = 50 Then
        If GUICtrlRead($a50) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a50, "50")
    Else
    Calling()
    EndIf
        EndIf

;51
    If $call = 51 Then
        If GUICtrlRead($a51) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a51, "51")
    Else
    Calling()
    EndIf
        EndIf

;52
    If $call = 52 Then
        If GUICtrlRead($a52) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a52, "52")
    Else
    Calling()
    EndIf
        EndIf

;53
    If $call = 53 Then
        If GUICtrlRead($a53) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a53, "53")
    Else
    Calling()
    EndIf
        EndIf

;54
    If $call = 54 Then
        If GUICtrlRead($a54) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a54, "54")
    Else
    Calling()
    EndIf
        EndIf

;55
    If $call = 55 Then
        If GUICtrlRead($a55) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a55, "55")
    Else
    Calling()
    EndIf
        EndIf

;56
    If $call = 56 Then
        If GUICtrlRead($a56) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a56, "56")
    Else
    Calling()
    EndIf
        EndIf

;57
    If $call = 57 Then
        If GUICtrlRead($a57) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a57, "57")
    Else
    Calling()
    EndIf
        EndIf

;58
    If $call = 58 Then
        If GUICtrlRead($a58) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a58, "58")
    Else
    Calling()
    EndIf
        EndIf

;59
    If $call = 59 Then
        If GUICtrlRead($a59) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a59, "59")
    Else
    Calling()
    EndIf
        EndIf

;60
    If $call = 60 Then
        If GUICtrlRead($a60) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a60, "60")
    Else
    Calling()
    EndIf
        EndIf

;61
    If $call = 61 Then
        If GUICtrlRead($a61) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a61, "61")
    Else
    Calling()
    EndIf
        EndIf


;62
    If $call = 62 Then
        If GUICtrlRead($a62) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a62, "62")
    Else
    Calling()
    EndIf
        EndIf


;63
    If $call = 63 Then
        If GUICtrlRead($a63) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a63, "63")
    Else
    Calling()
    EndIf
        EndIf

;64
    If $call = 64 Then
        If GUICtrlRead($a64) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a64, "64")
    Else
    Calling()
    EndIf
        EndIf

;65
    If $call = 65 Then
        If GUICtrlRead($a65) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a65, "65")
    Else
    Calling()
    EndIf
        EndIf

;66
    If $call = 66 Then
        If GUICtrlRead($a66) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a66, "66")
    Else
    Calling()
    EndIf
        EndIf

;67
    If $call = 67 Then
        If GUICtrlRead($a67) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a67, "67")
    Else
    Calling()
    EndIf
        EndIf

;68
    If $call = 68 Then
        If GUICtrlRead($a68) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a68, "68")
    Else
    Calling()
    EndIf
        EndIf

;69
    If $call = 69 Then
        If GUICtrlRead($a69) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a69, "69")
    Else
    Calling()
    EndIf
        EndIf

;70
    If $call = 70 Then
        If GUICtrlRead($a70) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a70, "70")
    Else
    Calling()
    EndIf
        EndIf

;71
    If $call = 71 Then
        If GUICtrlRead($a71) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a71, "71")
    Else
    Calling()
    EndIf
        EndIf

;72
    If $call = 72 Then
        If GUICtrlRead($a72) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a72, "72")
    Else
    Calling()
    EndIf
        EndIf

;73
    If $call = 73 Then
        If GUICtrlRead($a73) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a73, "73")
    Else
    Calling()
    EndIf
        EndIf

;74
    If $call = 74 Then
        If GUICtrlRead($a74) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a74, "74")
    Else
    Calling()
    EndIf
        EndIf

;75
    If $call = 75 Then
        If GUICtrlRead($a75) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a75, "75")
    Else
    Calling()
    EndIf
        EndIf

;76
    If $call = 76 Then
        If GUICtrlRead($a76) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a76, "76")
    Else
    Calling()
    EndIf
        EndIf

;77
    If $call = 77 Then
        If GUICtrlRead($a77) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a77, "77")
    Else
    Calling()
    EndIf
        EndIf

;78
    If $call = 78 Then
        If GUICtrlRead($a78) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a78, "78")
    Else
    Calling()
    EndIf
        EndIf

;79
    If $call = 79 Then
        If GUICtrlRead($a79) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a79, "79")
    Else
    Calling()
    EndIf
        EndIf

;80
    If $call = 80 Then
        If GUICtrlRead($a80) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a80, "80")
    Else
    Calling()
    EndIf
        EndIf

;81
    If $call = 81 Then
        If GUICtrlRead($a81) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a81, "81")
    Else
    Calling()
    EndIf
        EndIf

;82
    If $call = 82 Then
        If GUICtrlRead($a82) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a82, "82")
    Else
    Calling()
    EndIf
        EndIf

;83
    If $call = 83 Then
        If GUICtrlRead($a83) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a83, "83")
    Else
    Calling()
    EndIf
        EndIf

;84
    If $call = 84 Then
        If GUICtrlRead($a84) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a84, "84")
    Else
    Calling()
    EndIf
        EndIf

;85
    If $call = 85 Then
        If GUICtrlRead($a85) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a85, "85")
    Else
    Calling()
    EndIf
        EndIf

;86
    If $call = 86 Then
        If GUICtrlRead($a86) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a86, "86")
    Else
    Calling()
    EndIf
        EndIf

;87
    If $call = 87 Then
        If GUICtrlRead($a87) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a87, "87")
    Else
    Calling()
    EndIf
        EndIf

;88
    If $call = 88 Then
        If GUICtrlRead($a88) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a88, "88")
    Else
    Calling()
    EndIf
        EndIf

;89
    If $call = 89 Then
        If GUICtrlRead($a89) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a89, "89")
    Else
    Calling()
    EndIf
        EndIf

;90
    If $call = 90 Then
        If GUICtrlRead($a90) = "" Then
    GUICtrlSetData($Lastcalled, $call)
    GUICtrlSetData($a90, "90")
    Else
    Calling()
    EndIf
        EndIf


    WEnd
    
EndFunc

Enjoy.

Also I wanted a pause button, but i couldnt figure it out.

Cheers

Ashww

X)

Edited by Ashww

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Link to comment
Share on other sites

Cool!! Need to add a pause button and add the letters displayed with the number.. Cool start!

add the letters displayed with the number? what does this mean.

Also how can i get it not to pick a number again if already picked, becusae if if there is like 4 numbers left, it takes forever to get them

Cheers

Ashww

X)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Link to comment
Share on other sites

the letters as the are called.. b12 i21 n45, etc... that sounds like a conditional query using if then, or something like that...

Im still not sure what you meen, could u post an example?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Projects: Account Control Wii style gui Bingo Caller - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Want a website? Click here!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -I use my Blackberry Storm to browse the forum! Please be patient!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Link to comment
Share on other sites

Use instead of the random function in line 126 an array[1-90], fill it with numbers 1-90 and shuffle it.

You don't need to wait for the random function to hit all the numbers. Just run through the array and that's all :)

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

How does 56 lines sounds after over 1000? :)

Here: an example on how to use For-Next loops and arrays in such a case:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
HotKeySet("{ESC}", "Exit0")
$MainGUI = GUICreate("Bingo Caller", 411, 193)
$Lastcalled = GUICtrlCreateLabel("00", 8, 8, 148, 152)
GUICtrlSetFont(-1, 100, 400, 0, "MS Sans Serif")
Dim $label[91]
Global $x = 0, $y=0, $exit0 = 0
For $i=1 To 90
    $label[$i] = GUICtrlCreateLabel("", 190 +$x, 8+$y, 16, 17)
    $x += 24
    If $x = 216 Then
        $y += 16
        $x = 0
    EndIf
Next
$Startcalling = GUICtrlCreateButton("Start", 8, 160, 160, 25, 0)
GUICtrlSetState(-1, $GUI_CHECKED)
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Startcalling
            Calling()
    EndSwitch
WEnd


Func Calling()
    For $i=1 To 90
        GUICtrlSetData ($label[$i], "")
    Next
    GUICtrlSetData($Lastcalled, "00")
    Do
        Sleep(3000)
        $call = Random(0,90, 1)
        If GUICtrlRead($label[$call]) = "" Then GUICtrlSetData($label[$call], $call)
        GUICtrlSetData($Lastcalled, $call)
    Until $exit0 = 1
    
EndFunc
Func Exit0()
    $exit0 = 1
    Sleep(3500)
    WinSetTitle("Bingo Caller","", "Bingo Caller - STOPPED")
EndFunc

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

How does 56 lines sounds after over 1000? :)

Here: an example on how to use For-Next loops and arrays in such a case:

...

:)

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Shuffle function:

Func Shuffle(ByRef $myArray) ;coded by weaponx
    Local $temp[1], $x, $random
    Local $numElements = UBound($myArray)
    ;Loop through all array elements
    For $x = 0 To $numElements - 1
        ;Store copy of current element
        $temp[0] = $myArray[$x]
        $random = Random($x, $numElements - 1, 1)
        ;Overwrite current element with random element
        $myArray[$x] = $myArray[$random]
        ;Overwrite random element with original copy of current element
        $myArray[$random] = $temp[0]
    Next
EndFunc   ;==>Shuffle

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Here the modified code from enaiman:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
HotKeySet("{ESC}", "Exit0")
$MainGUI = GUICreate("Bingo Caller", 411, 193)
$Lastcalled = GUICtrlCreateLabel("00", 8, 8, 148, 152)
GUICtrlSetFont(-1, 100, 400, 0, "MS Sans Serif")
Dim $label[91]
Global $x = 0, $y=0, $exit0 = 0
For $i=1 To 90
    $label[$i] = GUICtrlCreateLabel("", 190 +$x, 8+$y, 16, 17)
    $x += 24
    If $x = 216 Then
        $y += 16
        $x = 0
    EndIf
Next
$Startcalling = GUICtrlCreateButton("Start", 8, 160, 160, 25, 0)
GUICtrlSetState(-1, $GUI_CHECKED)
GUISetState(@SW_SHOW)

Dim $arrBingo[90]
For $x = 0 To 89
    $arrBingo[$x] = $x + 1
Next

Shuffle($arrBingo)

#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Startcalling
            Calling()
    EndSwitch
WEnd


Func Calling()
    For $i=1 To 90
        GUICtrlSetData ($label[$i], "")
    Next
    GUICtrlSetData($Lastcalled, "00")
    For $x = 0 To 89
        Sleep(3000)
        $call = $arrBingo[$x]
        If GUICtrlRead($label[$call]) = "" Then GUICtrlSetData($label[$call], $call)
        GUICtrlSetData($Lastcalled, $call)
    Next
    
EndFunc
Func Exit0()
    $exit0 = 1
    Sleep(3500)
    WinSetTitle("Bingo Caller","", "Bingo Caller - STOPPED")
EndFunc

Func Shuffle(ByRef $myArray) ;coded by weaponx
    Local $temp[1], $x, $random
    Local $numElements = UBound($myArray)
    ;Loop through all array elements
    For $x = 0 To $numElements - 1
        ;Store copy of current element
        $temp[0] = $myArray[$x]
        $random = Random($x, $numElements - 1, 1)
        ;Overwrite current element with random element
        $myArray[$x] = $myArray[$random]
        ;Overwrite random element with original copy of current element
        $myArray[$random] = $temp[0]
    Next
EndFunc   ;==>Shuffle

Regards,

UEZ

PS: made a bug -> corrected!

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • 3 months later...
  • 10 months later...

Here's a 'prettier' version of one.... the spacebar picks and the enter key calls house.

-----------------------------------------------------------------------------------

#include <ButtonConstants.au3>

#include <GUIEdit.au3>

#include <GUIConstants.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#include <Array.au3>

Opt("MustDeclareVars", 1)

HotKeySet("{SPACE}", "PickNumber")

HotKeySet("{ENTER}", "HouseCalled")

HotKeySet("{ESC}", "QuitGame")

Const $Font = "Comic Sans MS"

Const $FontSize = 24

Const $xOrigin = 190

Const $yOrigin = 15

Const $xIncrement = 60

Const $yIncrement = 50

Const $CellWidth = 55

Const $CellHeight = 45

Dim $Event

Dim $winMain

Dim $FixedNums[90]

Dim $RandomNums[90]

Dim $Board[10][9]

Dim $LastNumber

Dim $NextNumber

Dim $NextCall

Dim $BoardX

Dim $BoardY

dim $nn

dim $nc

$winMain = GUICreate("BINGO CALLER", 800, 600, -1, -1)

StartGame()

DrawBoard()

GUISetState(@SW_SHOW, $winMain)

While 1

$Event = GUIGetMsg()

Switch $Event

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Func StartGame()

MixNumbers()

ClearBoard()

$NextNumber = 0

EndFunc

Func MixNumbers()

Dim $x

Dim $RandNum

For $i = 0 To 89

$FixedNums[$i] = $i + 1

Next

For $x = 0 To 89

$RandNum = Random(0, 89 - $x, 1)

$RandomNums[$x] = $FixedNums[$RandNum]

$FixedNums[$RandNum] = $FixedNums[89 - $x]

Next

EndFunc ;==>MixNumbers

Func DrawBoard()

Dim $xpos

Dim $ypos

Dim $winBoard

Dim $Border1

Dim $Border2

For $xpos = 0 To 9

For $ypos = 0 To 8

$Board[$xpos][$ypos] = GUICtrlCreateLabel("", $xOrigin + ($xpos * $xIncrement), $yOrigin + ($ypos * $yIncrement), $CellWidth, $CellHeight, $ES_CENTER)

GUICtrlSetFont(-1, $FontSize, 1000, -1, $Font)

GUICtrlSetBkColor(-1, 0xff00ff)

GUICtrlSetColor(-1, 0xffffff)

$Border1 = GUICtrlCreateGraphic($xOrigin - 5, $yOrigin - 5, 1, 1)

GUICtrlSetGraphic($Border1, $GUI_GR_PENSIZE, 3)

GUICtrlSetGraphic($Border1, $GUI_GR_COLOR, 0x000000)

GUICtrlSetGraphic($Border1, $GUI_GR_RECT, -1, -1, $CellWidth * 11 + 2, $CellHeight * 10 + 7)

Next

Next

$LastNumber = GUICtrlCreateLabel("", 12, 12, 159, 149, $ES_CENTER)

GUICtrlSetBkColor(-1, 0x0000ff)

GUICtrlSetColor(-1, 0xffff00)

GUICtrlSetFont(-1, 72, 1000, -1, $Font)

$Border2 = GUICtrlCreateGraphic(10, 10, 1, 1)

GUICtrlSetGraphic($Border2, $GUI_GR_PENSIZE, 3)

GUICtrlSetGraphic($Border2, $GUI_GR_COLOR, 0x000000)

GUICtrlSetGraphic($Border2, $GUI_GR_RECT, -1, -1, 165, 155)

EndFunc ;==>DrawBoard

Func PickNumber()

If $NextNumber = 90 Then

HouseCalled()

EndIf

$NextCall = $RandomNums[$NextNumber]

$BoardX = Mod($NextCall - 1, 10)

$BoardY = ($NextCall - $BoardX) / 10

GUICtrlSetData($Board[$BoardX][$BoardY], $NextCall)

GUICtrlSetData($LastNumber, $NextCall)

$NextNumber = $NextNumber + 1

GUICtrlSetData($nn, $nextnumber)

GUICtrlSetData($nc, $nextcall)

EndFunc ;==>PickNumber

Func HouseCalled()

Dim $HouseLabel

Dim $btnContinue

Dim $btnNewGame

Dim $btnStop

Dim $Choice

$HouseLabel = GUICtrlCreateLabel("HOUSE CALLED!", 190, 485, 600, 100, $ES_CENTER)

GUICtrlSetFont(-1, 48, 700, -1, $Font)

$btnContinue = GUICtrlCreateButton("Continue", 9, 195, 165, 70)

GUICtrlSetFont(-1, 20, 700, -1, $Font)

$btnNewGame = GUICtrlCreateButton("New Game", 9, 295, 165, 70)

GUICtrlSetFont(-1, 20, 700, -1, $Font)

$btnStop = GUICtrlCreateButton("Stop", 9, 395, 165, 70)

GUICtrlSetFont(-1, 20, 700, -1, $Font)

While 1

$Choice = GUIGetMsg(1)

Select

Case $Choice[0] = $btnContinue

ExitLoop

Case $Choice[0] = $btnNewGame

StartGame()

ExitLoop

Case $Choice[0] = $btnStop

QuitGame()

Case $Choice[0] = $GUI_EVENT_CLOSE

QuitGame()

EndSelect

WEnd

GUICtrlDelete($btnStop)

GUICtrlDelete($btnNewGame)

GUICtrlDelete($btnContinue)

GUICtrlDelete($HouseLabel)

EndFunc ;==>HouseCalled

Func ClearBoard()

Dim $xpos

Dim $ypos

For $xpos = 0 To 9

For $ypos = 0 To 8

GUICtrlSetData($Board[$xpos][$ypos], "")

Next

Next

GUICtrlSetData($LastNumber, "")

EndFunc ;==>ClearBoard

Func QuitGame()

Exit

EndFunc ;==>QuitGame

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...