Event Form1.Load
    PutAttachment ".\plugin", "*.*"
    Form1.ComboBox1.List = "先前|先后"
    Form1.ComboBox1.ListIndex = 0
End Event
a = Form1.ComboBox1.ListIndex
If a = 0 Then 
    Call qq
ElseIf a = 1 Then
    Call hh
End If
Sub qq
    Dim tbx,tby
    Rem ks
    FindPic 0,0,1000,500,"Attachment:\mltb.bmp",0.9,tbX,tbY
    //以下是条件判断;如果返回的坐标大于0,那么就说明找到了。
    If tbX > 0 And tbY > 0 Then
        Delay 10
    Else 
        EndScript 
    End If 
    Do  While tbx>0
        Delay 200
        Randomize
        r1 = Int((50 * Rnd) + 1)
        r2 = Int((10 * Rnd) - 5)
        IfColor tbx+115, tby+46, "7375FF", 0 Then
            Delay 200+r1
            IfColor tbx+188, tby+101, "9CBECE", 0 Then
                MoveTo tbx+300 + r1, tby+220 + r1
                Delay 200+r1
                LeftClick 1
                Delay 200+r1
                MoveTo tbx+630+r2,tby+483+r2
            End If
            Goto ks
        Else 
            IfColor tbx+395, tby+116, "FFFFFF", 0 Then
                MoveTo tbx+225 + r2, tby+230 + r2
                Delay 200+r1
                IfColor 26+tbx,487+tby,"FFFFFF",0 Then		
                    LeftClick 1
                    Delay 300 + r1
                    LeftClick 1
                    Delay 300 + r1
                    MoveTo tbx+630+r2,tby+485+r2
                    Goto ks
                Else
                    MoveTo tbx+162 + r2, tby+185 + r2
                    Delay 200+r1
                    IfColor 26+tbx,487+tby,"FFFFFF",0 Then
                        LeftClick 1
                        Delay 300 + r1
                        LeftClick 1
                        Delay 300 + r1
                        MoveTo tbx+630+r2,tby+485+r2
                        goto ks
                    End If
                End If
            End If 
        End If 
    Loop
End Sub 
Sub hh
    Dim ta,tb
    Rem kk
    FindPic 0,0,1000,500,"Attachment:\mltb.bmp",0.9,ta,tb
    //以下是条件判断;如果返回的坐标大于0,那么就说明找到了。
    If ta > 0 And tb > 0 Then
        Delay 10
    Else 
        EndScript 
    End If
    Do  While ta>0
        Delay 200
        Randomize
        r1 = Int((50 * Rnd) + 1)
        r2 = Int((10 * Rnd) - 5)
        IfColor ta+115, tb+46, "7375FF", 0 Then
            Delay 200+r1
            IfColor ta+114, tb+111, "42CF00", 0 Then
                MoveTo ta+320 + r1, tb+220 + r1
                Delay 200+r1
                LeftClick 1
                Delay 200+r1
                MoveTo ta+630+r2,tb+483+r2
            End If
            Goto kk
        Else 
            IfColor ta+395, tb+116, "FFFFFF", 0 Then
                MoveTo ta+162 + r2, tb+185 + r2
                Delay 200+r1
                IfColor 26+ta,487+tb,"FFFFFF",0 Then		
                    LeftClick 1
                    Delay 300 + r1
                    LeftClick 1
                    Delay 300 + r1
                    MoveTo ta+630+r2,tb+485+r2
                    Goto kk
                Else