Sign in to follow this  
Followers 0
Aceguy

_arraydelete() & array problems

4 posts in this topic

cant figure out how to delete/remove and entry.

#include<GUIConstants.au3>
#include<Array.au3>
#include<Misc.au3>
#include <Sound.au3>

Opt("GUIOnEventMode", 1)

AutoItSetOption("SendKeyDelay", 5);
AutoItSetOption("SendKeyDownDelay", 5);

Global $height, $Labela1

$Form1 = GUICreate("Countdown", 450, 80, 810, 74, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")

GUICtrlSetResizing(-1, $GUI_DOCKALL)
$add = GUICtrlCreateButton("Add", 8, 8, 49, 25, 0)
GUICtrlSetOnEvent(-1, "addrow")
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$remove = GUICtrlCreateButton("Delete", 64, 8, 49, 25, 0)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1,"remove")
$save = GUICtrlCreateButton("Save List", 120, 8, 57, 25, 0)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
GUICtrlSetOnEvent(-1, "save")
$Combo1 = GUICtrlCreateCombo("Combo1", 8, 40, 73, 25)
GUICtrlSetData(-1, "CTRL|ALT")
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Combo2 = GUICtrlCreateCombo("Combo2", 88, 40, 73, 25)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0|b")
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$name = GUICtrlCreateInput("name", 184, 8, 73, 21)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Combo3 = GUICtrlCreateCombo("Combo3", 168, 40, 81, 25)
GUICtrlSetData(-1, "3 Secs|10 Secs|15 Secs|20 Secs|30 Secs|45 Secs|1 Min|1 Min 30 Secs|2 Mins|3 Mins|4 Mins|5 Mins|10 Mins|15 Mins|30 Mins|2 Hrs")
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Checkbox1 = GUICtrlCreateCheckbox("Custon Macro", 264, 8, 105, 25)
GUICtrlSetResizing(-1, $GUI_DOCKALL)
$Label_target = GUICtrlCreateLabel("Target", 264, 40, 120, 24)
GUICtrlSetFont(-1, 16, 800, 0, "MS Sans Serif")
GUICtrlSetResizing(-1, $GUI_DOCKALL)

Dim $group_i[1]
Dim $Label_i[1]
Dim $Input_i[1]
Dim $i_key[1]
Dim $i_key_a[1]
Dim $i_key_b[1]
Dim $timer_init[1]
Dim $Input_i_2[1]
Dim $t_start[1]
Dim $init[1]
Dim $Labela1[1]
Dim $Inputa1[1]
Dim $macro[1]
$line = 0
$b2y = 0
$num = 50
$bY = 0
$bx = 0
$alt = 0
$ctrl = 0
$box = 0
$done = 0
$b = 1
$wait_len = 1
Dim $IniFile = @MyDocumentsDir & "\coutdown.ini"
$op = FileOpen($IniFile, 0)
If $op = -1 Then
    IniWrite($IniFile, "section", "0", "0")
Else
    $iniread = IniRead($IniFile, "section", 0, 0)
    If $iniread <> '0' Then
        load_settings()
    EndIf
EndIf
AdlibEnable("time", 500)

GUISetState(@SW_SHOW)

While 1
    For $c = 1 To $group_i[0]
        If _IsPressed($i_key_a[$c]) And _IsPressed($i_key_b[$c]) Then
            GUICtrlSetBkColor($Input_i[$c], 0xff0000)
            _SoundPlay(@WindowsDir & "\media\notify.wav", 0)
            If $t_start[$c] = False Then
                $t_start[$c] = True
            ElseIf $t_start[$c] = True Then
                $timer_init[$c] = $init[$c]
            EndIf
            If $macro[$c] <> '0' Then
                If GUICtrlRead($Label_target) = "Target" Then $target = ' <t>'
                If GUICtrlRead($Label_target) = "ME" Then $target = ' <me>'
                If GUICtrlRead($Label_target) = "F2" Then $target = ' <p1>'
                If GUICtrlRead($Label_target) = "F3" Then $target = ' <p2>'
                If GUICtrlRead($Label_target) = "F4" Then $target = ' <p3>'
                If GUICtrlRead($Label_target) = "F5" Then $target = ' <p4>'
                If GUICtrlRead($Label_target) = "F6" Then $target = ' <p5>'
                If GUICtrlRead($Label_target) = "F8" Then $target = ' <bt>'
                
            EndIf
        EndIf
    Next
    If _IsPressed("09") Then GUICtrlSetData($Label_target, "Target")
    If _IsPressed("70") Then GUICtrlSetData($Label_target, "ME")
    If _IsPressed("71") Then GUICtrlSetData($Label_target, "F2")
    If _IsPressed("72") Then GUICtrlSetData($Label_target, "F3")
    If _IsPressed("73") Then GUICtrlSetData($Label_target, "F4")
    If _IsPressed("74") Then GUICtrlSetData($Label_target, "F5")
    If _IsPressed("75") Then GUICtrlSetData($Label_target, "F6")
    If _IsPressed("77") Then GUICtrlSetData($Label_target, "Battle Target")
    Sleep(50)

WEnd





Func addrow()
;*********************** CHECKS IS KEY EXISTS ***********************
    $match = False
    If GUICtrlRead($Combo1) = "CTRL" Then $c_r = "11"
    If GUICtrlRead($Combo1) = "ALT" Then $c_r = "12"
    If GUICtrlRead($Combo2) = '1' Then $c_s = "31"
    If GUICtrlRead($Combo2) = '2' Then $c_s = "32"
    If GUICtrlRead($Combo2) = '3' Then $c_s = "33"
    If GUICtrlRead($Combo2) = '4' Then $c_s = "34"
    If GUICtrlRead($Combo2) = '5' Then $c_s = "35"
    If GUICtrlRead($Combo2) = '6' Then $c_s = "36"
    If GUICtrlRead($Combo2) = '7' Then $c_s = "37"
    If GUICtrlRead($Combo2) = '8' Then $c_s = "38"
    If GUICtrlRead($Combo2) = '9' Then $c_s = "39"
    If GUICtrlRead($Combo2) = '0' Then $c_s = "30"
    If GUICtrlRead($Combo2) = 'b' Then $c_s = "42"
    For $c = 1 To $group_i[0]
        If $i_key_a[$c] = $c_r And $i_key_b[$c] = $c_s Then
            $match = True
        EndIf
    Next
;*******************************************************************


    If $match = False Then
        If GUICtrlRead($name) <> "name" And GUICtrlRead($name) <> "" And GUICtrlRead($Combo1) <> "Combo1" And GUICtrlRead($Combo2) <> "Combo2" And GUICtrlRead($Combo3) <> "Combo3" Then







            $group_i[0] += 1
            $Label_i[0] += 1
            $Input_i[0] += 1
            $i_key_a[0] += 1
            $i_key_b[0] += 1
            $timer_init[0] += 1
            $Input_i_2[0] += 1
            $t_start[0] += 1
            $init[0] += 1
            $macro[0] += 1
            
            ReDim $group_i[$group_i[0] + 1]
            ReDim $Label_i[$Label_i[0] + 1]
            ReDim $Input_i[$Input_i[0] + 1]
            ReDim $i_key_a[$i_key_a[0] + 1]
            ReDim $i_key_b[$i_key_b[0] + 1]
            ReDim $timer_init[$timer_init[0] + 1]
            ReDim $Input_i_2[$Input_i_2[0] + 1]
            ReDim $t_start[$t_start[0] + 1]
            ReDim $init[$init[0] + 1]
            ReDim $macro[$macro[0] + 1]
            
            $Ypos = WinGetPos("Countdown")

            If GUICtrlRead($Combo1) = "ALT" Then
                $bx = 220
                $alt += 1
                If $alt = $ctrl Then
                    $height = ($alt * $num) + 100
                    $box = ($alt * $num)
                ElseIf $alt > $ctrl Then
                    $height = ($alt * $num) + 100
                    $box = ($alt * $num)
                ElseIf $alt < $ctrl Then
                    $box = ($alt * $num)
                EndIf
            ElseIf GUICtrlRead($Combo1) = "CTRL" Then
                $bx = 0
                $ctrl += 1
                If $alt = $ctrl Then
                    $height = ($alt * $num) + 100
                    $box = ($ctrl * $num)
                ElseIf $ctrl > $alt Then
                    $box = ($ctrl * $num)
                    $height = ($ctrl * $num) + 100
                ElseIf $ctrl < $alt Then
                    $box = $ctrl * $num
                EndIf
            EndIf


            WinMove("Countdown", '', $Ypos[0], $Ypos[1], $Ypos[2], $height, 0)



            $group_i[$group_i[0]] = GUICtrlCreateGroup(GUICtrlRead($Combo1) & "+" & GUICtrlRead($Combo2), 8 + $bx, 22 + $box, 215, 49)
            GUICtrlSetResizing(-1, $GUI_DOCKALL)
            $Label_i[$Label_i[0]] = GUICtrlCreateLabel(GUICtrlRead($name), 80 + $bx, 38 + $box, 120, 24)
            GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
            GUICtrlSetResizing(-1, $GUI_DOCKALL)
            $Input_i[$Input_i[0]] = GUICtrlCreateProgress(16 + $bx, 38 + $box, 60, 21)
            GUICtrlSetColor(-1, 0x00FF00)
            GUICtrlSetBkColor(-1, 0x00ff00)
            GUICtrlSetCursor(-1, 7)
            DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", " ", "wstr", " ")
            GUICtrlSetStyle(-1, 1)
            GUICtrlSetResizing(-1, $GUI_DOCKALL)
            $Input_i_2[$Input_i_2[0]] = GUICtrlCreateInput("", 175 + $bx, 38 + $box, 40, 21, BitOR($ES_AUTOHSCROLL, $ES_READONLY))
            GUICtrlSetCursor(-1, 7)
            GUICtrlSetResizing(-1, $GUI_DOCKALL)
            GUICtrlSetBkColor(-1, 0xFFFFFF)
            If GUICtrlRead($Combo1) = "CTRL" Then $i_key_a[$i_key_a[0]] = "11"
            If GUICtrlRead($Combo1) = "ALT" Then $i_key_a[$i_key_a[0]] = "12"
            If GUICtrlRead($Combo2) = '1' Then $i_key_b[$i_key_b[0]] = "31"
            If GUICtrlRead($Combo2) = '2' Then $i_key_b[$i_key_b[0]] = "32"
            If GUICtrlRead($Combo2) = '3' Then $i_key_b[$i_key_b[0]] = "33"
            If GUICtrlRead($Combo2) = '4' Then $i_key_b[$i_key_b[0]] = "34"
            If GUICtrlRead($Combo2) = '5' Then $i_key_b[$i_key_b[0]] = "35"
            If GUICtrlRead($Combo2) = '6' Then $i_key_b[$i_key_b[0]] = "36"
            If GUICtrlRead($Combo2) = '7' Then $i_key_b[$i_key_b[0]] = "37"
            If GUICtrlRead($Combo2) = '8' Then $i_key_b[$i_key_b[0]] = "38"
            If GUICtrlRead($Combo2) = '9' Then $i_key_b[$i_key_b[0]] = "39"
            If GUICtrlRead($Combo2) = '0' Then $i_key_b[$i_key_b[0]] = "30"
            If GUICtrlRead($Combo2) = 'b' Then $i_key_b[$i_key_b[0]] = "42"
            If GUICtrlRead($Combo3) = '3 Secs' Then $timer_init[$timer_init[0]] = 3000
            If GUICtrlRead($Combo3) = '10 Secs' Then $timer_init[$timer_init[0]] = 10000
            If GUICtrlRead($Combo3) = '15 Secs' Then $timer_init[$timer_init[0]] = 15000
            If GUICtrlRead($Combo3) = '20 Secs' Then $timer_init[$timer_init[0]] = 20000
            If GUICtrlRead($Combo3) = '30 Secs' Then $timer_init[$timer_init[0]] = 30000
            If GUICtrlRead($Combo3) = '45 Secs' Then $timer_init[$timer_init[0]] = 45000
            If GUICtrlRead($Combo3) = '1 Min' Then $timer_init[$timer_init[0]] = 60000
            If GUICtrlRead($Combo3) = '1 Min 30 Secs' Then $timer_init[$timer_init[0]] = 90000
            If GUICtrlRead($Combo3) = '2 Mins' Then $timer_init[$timer_init[0]] = 120000
            If GUICtrlRead($Combo3) = '3 Mins' Then $timer_init[$timer_init[0]] = 3 * 60000
            If GUICtrlRead($Combo3) = '4 Mins' Then $timer_init[$timer_init[0]] = 4 * 60000
            If GUICtrlRead($Combo3) = '5 Mins' Then $timer_init[$timer_init[0]] = 5 * 60000
            If GUICtrlRead($Combo3) = '10 Mins' Then $timer_init[$timer_init[0]] = 10 * 60000
            If GUICtrlRead($Combo3) = '15 Mins' Then $timer_init[$timer_init[0]] = 15 * 60000
            If GUICtrlRead($Combo3) = '30 Mins' Then $timer_init[$timer_init[0]] = 30 * 60000
            If GUICtrlRead($Combo3) = '2 Hrs' Then $timer_init[$timer_init[0]] = 120 * 60000
            GUICtrlSetData($Input_i_2[$Input_i_2[0]], $timer_init[$timer_init[0]])
            $init[$init[0]] = $timer_init[$timer_init[0]]
            $t_start[$t_start[0]] = False


            GUICtrlSetData($name, '')

            If GUICtrlRead($Checkbox1) = 1 Then
                newgui()
            Else
                $macro[$macro[0]] = 0
            EndIf





        Else
            MsgBox(0, "", "Boxes not set", 0)
        EndIf
    Else
        MsgBox(0, "", "Key Combination Found", 0)
    EndIf
EndFunc  ;==>addrow

Func newgui()
    
    $Forma2 = GUICreate("Command Edit", 417, 42, 498, 358, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST))
    $Buttona1 = GUICtrlCreateButton("New Line", 280, 8, 57, 17, 0)
    GUICtrlSetOnEvent(-1, "addcommand")
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    $Buttona2 = GUICtrlCreateButton("Accept", 344, 8, 65, 17, 0)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetOnEvent(-1, "Macroaccept")
    GUISetState(@SW_SHOW, $Forma2)
EndFunc  ;==>newgui


Func addcommand()
    $Ypos2 = WinGetPos("Command Edit")
    $Labela1[0] += 1
    $Inputa1[0] += 1
    ReDim $Labela1[$Labela1[0] + 1]
    ReDim $Inputa1[$Inputa1[0] + 1]
    $line += 1
    $Labela1[$Labela1[0]] = GUICtrlCreateLabel("", 8, 8 + $b2y, 58, 24)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    GUICtrlSetResizing(-1, $GUI_DOCKALL)
    GUICtrlSetData(-1, "Line " & $line)
    $Inputa1[$Inputa1[0]] = GUICtrlCreateInput("", 72, 8 + $b2y, 201, 21)
    GUICtrlSetResizing(-1, $GUI_DOCKALL)

    WinMove("Command Edit", '', $Ypos2[0], $Ypos2[1], $Ypos2[2], $Ypos2[3] + 25, 0)

    $b2y += 25

EndFunc  ;==>addcommand



Func time()
    
    For $d = 1 To $group_i[0]
        If $t_start[$d] = True And $timer_init[$d] >= 0 Then
            If $timer_init[$d] >= 500 Then
                
                
                If $macro[$d] <> '0' Then
                    $split = StringSplit($macro[$d], ',')
                    
                    If $timer_init[$d] = $init[$d] Then $b = 1
                    
                    
                    
                    If IsInt($b) Then
                        
                        
                        $string = StringInStr($split[$b], '/wait')
                        If $string = 0 Then
                            Sleep(250)
                            Send($split[$b] & $target & "{enter}")
                            
                        EndIf
                    EndIf
                    
                    If $b <= $split[0] Then
                        StringInStr($split[$b], '/wait')
                        If @error = 0 Then
                            $wait = StringSplit($split[$b], ' ')
                            

                            If $wait_len <= $wait[2] Then
                                $wait_len += 0.5
                                
                            Else
                                $wait_len = 1
                                $b += 0.5
                            EndIf
                            
                        EndIf
                        If $wait_len = 1 and $b <= $split[0] Then 
                            $b += 0.5
                        EndIf
                    EndIf
                EndIf
                
                
                $timer_init[$d] -= 500

                GUICtrlSetData($Input_i[$d], 100 - ($timer_init[$d] / $init[$d]) * 100)

                $time = $timer_init[$d] / 1000
                $minute = Floor(Mod(($time / 60), 60));
                If $minute < 10 Then
                    $minute = '0' & $minute
                EndIf
                $second = Floor(Mod($time, 60));
                If $second < 10 Then
                    $second = '0' & $second
                EndIf
                GUICtrlSetData($Input_i_2[$d], $minute & ":" & $second)
            Else
                _SoundPlay(@WindowsDir & "\media\Tada.wav", 0)
                $t_start[$d] = False
                $timer_init[$d] = $init[$d]
                GUICtrlSetData($Input_i_2[$d], $timer_init[$d])
                GUICtrlSetColor($Input_i[$d], 0x00FF00)
                GUICtrlSetBkColor($Input_i[$d], 0x00ff00)
            EndIf
        EndIf
    Next
EndFunc  ;==>time


Func save()
    For $a = 1 To $group_i[0]
        IniWrite($IniFile, "section", $a - 1, GUICtrlRead($Label_i[$a]) & "|" & $i_key_a[$a] & "|" & $i_key_b[$a] & "|" & $timer_init[$a] & "|" & $macro[$a])
    Next
EndFunc  ;==>save

Func load_settings()
    $var_open = IniReadSection($IniFile, "section")
    
    For $e = 1 To $var_open[0][0]
        $s_s = StringSplit($var_open[$e][1], "|")



        $group_i[0] += 1
        $Label_i[0] += 1
        $Input_i[0] += 1
        $i_key_a[0] += 1
        $i_key_b[0] += 1
        $timer_init[0] += 1
        $Input_i_2[0] += 1
        $t_start[0] += 1
        $init[0] += 1
        $macro[0] += 1
        
        ReDim $group_i[$group_i[0] + 1]
        ReDim $Label_i[$Label_i[0] + 1]
        ReDim $Input_i[$Input_i[0] + 1]
        ReDim $i_key_a[$i_key_a[0] + 1]
        ReDim $i_key_b[$i_key_b[0] + 1]
        ReDim $timer_init[$timer_init[0] + 1]
        ReDim $Input_i_2[$Input_i_2[0] + 1]
        ReDim $t_start[$t_start[0] + 1]
        ReDim $init[$init[0] + 1]
        ReDim $macro[$macro[0] + 1]


        If $s_s[2] = 11 Then $s_s2 = 'CTRL'
        If $s_s[2] = 12 Then $s_s2 = 'ALT'

        If $s_s[3] = '31' Then $s_s3 = "1"
        If $s_s[3] = '32' Then $s_s3 = "2"
        If $s_s[3] = '33' Then $s_s3 = "3"
        If $s_s[3] = '34' Then $s_s3 = "4"
        If $s_s[3] = '35' Then $s_s3 = "5"
        If $s_s[3] = '36' Then $s_s3 = "6"
        If $s_s[3] = '37' Then $s_s3 = "7"
        If $s_s[3] = '38' Then $s_s3 = "8"
        If $s_s[3] = '39' Then $s_s3 = "9"
        If $s_s[3] = '30' Then $s_s3 = "0"
        If $s_s[3] = '42' Then $s_s3 = "b"

        $Ypos = WinGetPos("Countdown")
        If $s_s2 = 'ALT' Then
            $bx = 220
            $alt += 1
            If $alt = $ctrl Then
                $height = ($alt * $num) + 100
                $box = ($alt * $num)
            ElseIf $alt > $ctrl Then
                $height = ($alt * $num) + 100
                $box = ($alt * $num)
            ElseIf $alt < $ctrl Then
                $box = ($alt * $num)
            EndIf
        ElseIf $s_s2 = 'CTRL' Then
            $bx = 0
            $ctrl += 1
            If $alt = $ctrl Then
                $height = ($alt * $num) + 100
                $box = ($ctrl * $num)
            ElseIf $ctrl > $alt Then
                $box = ($ctrl * $num)
                $height = ($ctrl * $num) + 100
            ElseIf $ctrl < $alt Then
                $box = $ctrl * $num
            EndIf
        EndIf
        WinMove("Countdown", '', $Ypos[0], $Ypos[1], $Ypos[2], $height, 0)

        $group_i[$group_i[0]] = GUICtrlCreateGroup($s_s2 & "+" & $s_s3, 8 + $bx, 22 + $box, 215, 49)
        GUICtrlSetResizing(-1, $GUI_DOCKALL)
        $Label_i[$Label_i[0]] = GUICtrlCreateLabel($s_s[1], 80 + $bx, 38 + $box, 120, 24)
        GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
        GUICtrlSetResizing(-1, $GUI_DOCKALL)
        $Input_i[$Input_i[0]] = GUICtrlCreateProgress(16 + $bx, 38 + $box, 60, 21)
        GUICtrlSetColor(-1, 0x00FF00)
        GUICtrlSetBkColor(-1, 0x00ff00)
        GUICtrlSetCursor(-1, 7)
        DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", " ", "wstr", " ")
        GUICtrlSetStyle(-1, 1)
        GUICtrlSetResizing(-1, $GUI_DOCKALL)
        $Input_i_2[$Input_i_2[0]] = GUICtrlCreateInput("", 175 + $bx, 38 + $box, 40, 21, BitOR($ES_AUTOHSCROLL, $ES_READONLY))
        GUICtrlSetCursor(-1, 7)
        GUICtrlSetResizing(-1, $GUI_DOCKALL)
        GUICtrlSetBkColor(-1, 0xFFFFFF)

        $i_key_a[$i_key_a[0]] = $s_s[2]
        $i_key_b[$i_key_b[0]] = $s_s[3]

        $timer_init[$timer_init[0]] = $s_s[4]

        GUICtrlSetData($Input_i_2[$Input_i_2[0]], $timer_init[$timer_init[0]])
        $init[$init[0]] = $timer_init[$timer_init[0]]
        $t_start[$t_start[0]] = False
        $macro[$macro[0]] = $s_s[5]

    Next


EndFunc  ;==>load_settings

Func quit()
    save()
    Exit
    GUIDelete($Form1)
EndFunc  ;==>quit

Func Macroaccept()
    $wait_count=0
    Dim $read[$Labela1[0] + 1]
    For $r = 1 To $Labela1[0]
        $read[$r] = GUICtrlRead($Inputa1[$r])
    $str =StringInStr($read[$r],"/wait")
    
    if $str>0 then
        $w_split=StringSplit($read[$r],' ')
        
        $wait_count += $w_split[2]
    Else
    $wait_count +=1 
    EndIf
    Next
    
    if $wait_count >= ($timer_init[$timer_init[0]]/1000) Then
        MsgBox(0,"Error","Your /wait commands Total, exceeds you timer!!!"&@CRLF&"Remeber.. Even if your command doesnt contain a /wait it still counts as 1",0)
    Else
    $aray_strin = _ArrayToString($read, ',', 1, $Labela1[0])
    
    $macro[$macro[0]] = $aray_strin
    GUISetState(@SW_HIDE, "Command Edit")
    GUISwitch($Form1)
    EndIf
EndFunc  ;==>Macroaccept

Func remove()
if GUICtrlRead($Combo1) = 'Combo1' Or GUICtrlRead($Combo2) = 'Combo2' Then
MsgBox(0,"","Set Combo boxes to selecet what macro to delete",0)
Else

for $del = 1 to $group_i[0]
if $i_key_a[$del] = 11 And $i_key_b[$del]=GUICtrlRead($Combo2)+30 Then

ConsoleWrite("Deleting "&$del&@LF)

guictrldelete($group_i[$del])
guictrldelete($Label_i[$del])
guictrldelete($Input_i[$del])
guictrldelete($i_key_a[$del])
guictrldelete($i_key_b[$del])
guictrldelete($timer_init[$del])
guictrldelete($Input_i_2[$del])
guictrldelete($t_start[$del])
guictrldelete($init[$del])
guictrldelete($macro[$del])

_ArrayDisplay($t_start)
_ArrayDelete($group_i,$del)
_ArrayDelete($Label_i,$del)
_ArrayDelete($Input_i,$del)
_ArrayDelete($i_key_a,$del)
_ArrayDelete($i_key_b,$del)
_ArrayDelete($timer_init,$del)
_ArrayDelete($Input_i_2,$del)
_ArrayDelete($t_start,$del)
_ArrayDelete($init,$del)
_ArrayDelete($macro,$del)
_ArrayDisplay($t_start)

EndIf
Next


            
            
            

EndIf
EndFunc

Share this post


Link to post
Share on other sites



What error occured?

Share this post


Link to post
Share on other sites

C:\Documents and Settings\Andy\Desktop\Scripts\countdown_macro.au3 (83) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

If _IsPressed($i_key_a[$c]) And _IsPressed($i_key_b[$c]) Then

If _IsPressed(^ ERROR

Share this post


Link to post
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
Sign in to follow this  
Followers 0