Example #1
0
class Auto(object):

    #软件初始化
    def __init__(self):
        self.Winauto = Winauto()

    #判断软件是否启动成功
    def IsWindow(self):
        if self.Winauto.IsWindow():
            return 1
        else:
            return 0

    #软件启动
    def startApp(self, filePath, var):
        self.Winauto.appStart(filePath, var)

    #购买
    def buy(self, stock, price, num):
        self.Winauto.Buy(stock, price, num)

    #出售
    def sell(self, stock, price, num):
        self.Winauto.Sell(stock, price, num)

    #查看所有资产
    def getAllInfo(self):
        return self.Winauto.getAllAsset()

    #窗口置顶
    def topWindow(self):
        self.Winauto.topWindow()
Example #2
0
class main():
    def __init__(self):

        self.wt = Winauto()
        self.statu = self.wt.SoftwareStat()
        time.sleep(10)

    def buy(self, buy_stock, buy_price, buy_nun):
        if self.statu == 0:
            return "请先启动交易软件"
        self.wt.BuyS(buy_stock, buy_price, buy_nun)

    def sell(self, buy_stock, buy_price, buy_nun):
        if self.statu == 0:
            return "请先启动交易软件"
        self.wt.SellS(buy_stock, buy_price, buy_nun)


#m = main()
#m.buy("002486","0","1000")
Example #3
0
 def __init__(self):
     self.Winauto = Winauto()
Example #4
0
    def __init__(self):

        self.wt = Winauto()
        self.statu = self.wt.SoftwareStat()
        time.sleep(10)