Gosub 移动鼠标
    LeftClick 1
    Delay 500
    Num = 1
    For 10
        //VBSCall MessageBox (BSDirection(Num))
        If BSDirection(Num) = 1 or BSDirection(Num) = 2
            If BSDirection(Num) = 1
                PosX = 62
                PosY = 94
                Gosub 移动鼠标
                Gosub 快速入仓
                Gosub 当前时间
                Message = CurrentTime & "点取:" & Num & "号买入商品结束..."
                Gosub 写入日志文件
            EndIf 
            KeyPress 40,1
            Delay 1000
        Else 
            Goto 买入商品结束
        EndIf 
        Num = Num+1
    EndFor 
    Rem 买入商品结束
    PosX = 661
    PosY = 411
    Gosub 坐标转换
    IfColor PosX,PosY,736A56,1
        MoveTo PosX,PosY
        Delay 600
        LeftClick 1
        Gosub 延时判定
        Delay 2000
        Gosub 当前时间
        Message = CurrentTime & "买入商品结束..."
        Gosub 写入日志文件
    Else 
        KeyPress 27,1
        Delay 500
        Gosub 当前时间
        Message = CurrentTime & "!!!买入商品结束,无任何买入物..."
        Gosub 写入日志文件
    EndIf 
Return 买入商品
Sub 卖出商品
    Delay 1000
    If SellChoose = 0
        SellChoose = 1
    EndIf 
    StMenu = 0
    While StMenu = 0
        PosX = 687
        PosY = 359
        Gosub 移动鼠标
        LeftClick 1
        Gosub 延时判定
        Delay 2000
        PosX = 92
        PosY = 93
        Gosub 坐标转换
        IfColor PosX,PosY,BBBBBB,2
            StMenu = 1
            Gosub 当前时间
            Message = CurrentTime & "卖出商品页面打开成功..."
            Gosub 写入日志文件
        Else 
            Gosub 当前时间
            Message = CurrentTime & "!!!卖出商品页面打开未成功..."
            Gosub 写入日志文件
            If MarketSell(SellChoose) <> 0
                Gosub 查找交易所老板
            Else 
                StMenu = 1
            EndIf 
        EndIf 
    EndWhile 
    If MarketSell(SellChoose) <> 0
        PosX = 92+((SellChoose+4) MOD 5)*56
        PosY = 93+((SellChoose-1)\5)*72
        Gosub 移动鼠标
        LeftClick 1
        Delay 1000
        For 2
            Gosub 砍价要价
        EndFor 
        //点全部卖出
        PosX = 325
        PosY = 70
        Gosub 移动鼠标
        LeftClick 1
        Delay 1000
        PosX = 631
        PosY = 413
        Gosub 移动鼠标
        LeftClick 1
        Gosub 延时判定
        Delay 2000
        Gosub 当前时间
        Message = CurrentTime & "卖出商品结束..."
        Gosub 写入日志文件