//=======得到当前窗口的句柄=======
Plugin Wend=Window.Foreground()
//======移动窗口到1.1的位置=====
Plugin Window.Move(Wend,1,1)
//==================脚本主体==================
While 1
    Gosub cjt
    Gosub ajt
EndWhile 
//================脚本主体结束================
//==============开始检测箭头数量==============
Sub cjt
    While 1
        //循环防卡延时:
        Delay 8*dt
        VBS i=0
        While i<9
            IfColor 283+17.5*i 449 D76500 2
                VBS s=9-i:k=17.5*i
                Goto jscjt
            EndIf 
            If i<4
                IfColor 283+17.5*i 449 2300D3 2
                    VBS s=9-i:k=17.5*i
                    Goto jscjt
                EndIf 
            EndIf 
            VBS i=i+1
        EndWhile 
    EndWhile 
    //-------------结束测箭头
    Rem jscjt
Return 
//================检测箭头数量结束=============
//================开始按箭头===================
Sub ajt
    VBS x=0
    IfColor 283+k 449 008AFA 2
        VBS x=x+1
    EndIf 
    //------------------循环检测为哪个方向键(已包括反键)并按相应方向键
    While x<s
        //-------------循环防卡延时
        Delay 4*dt
        VBS a=0:b=0:c=0
        //-------------判断4K还是8K
        IfColor 276+k+x*35 457 EE9900 2
            Goto an8k
        EndIf 
        IfColor 276+k+x*35 457 5300F3 2
            Goto an8k
        EndIf 
        Goto an4k
        //--------------8K
        Rem an8k
        Gosub 8k
        Goto xyg
        //--------------4K
        Rem an4k
        Gosub 4k
        Goto xyg
        //--------------下一个方向键
        Rem xyg
        Delay 4*dt
        x=x+1
    EndWhile 
    Delay 256
Return 
//=================结束按箭头=================[/ft]
//===================8==K=====================
Sub 8k
    IfColor 275+k+x*35 449 CE6000 2
        VBS a=1
    EndIf 
    IfColor 275+k+x*35 449 2100CB 2
        VBS a=0.1
    EndIf 
    IfColor 283+k+x*35 457 F39D00 2
        VBS b=1
    EndIf 
    IfColor 283+k+x*35 457 4D00EF 2
        VBS b=0.1
    EndIf 
    IfColor 290+k+x*35 449 D76500 2
        VBS c=3
    EndIf 
    IfColor 290+k+x*35 449 2100CB 2
        VBS c=0.3
    EndIf 
    VBS sum=a+b+c
    //正键
    If sum=3
        KeyPress 33,1
        Goto 8kjs
    EndIf 
    If sum=1
        KeyPress 36,1
        Goto 8kjs
    EndIf 
    If sum=4