def getRealtimeQuotation(self, code='300431'): """获取可用资金 """ #code = '999999' setEditText(self.__buy_sell_hwnds[24][0], code) # 测试时获得资金情况 time.sleep(0.2) if self.debug: print('money_hwnd=', self.__buy_sell_hwnds[12][0]) #money = getWindowText(self.__buy_sell_hwnds[12][0]).strip() #setEditText(self.__buy_sell_hwnds[24][0], '') # 测试时获得资金情况 buy1 = getWindowText(self.__buy_sell_hwnds[25][0]).strip() sell1 = getWindowText(self.__buy_sell_hwnds[1][0]).strip() print('buy1=', buy1) print('sell1=', sell1) time.sleep(0.2) #print('money_str=',money) try: money = float(money) except: money = 0.0 sm.send_mail(sub='获取可用资金失败', content='检查验证是否软件异常') if self.debug: print('可用资金=', money) return money
def getRealtimeQuotation(self,code='300431'): """获取可用资金 """ #code = '999999' setEditText(self.__buy_sell_hwnds[24][0], code) # 测试时获得资金情况 time.sleep(0.2) if self.debug: print('money_hwnd=',self.__buy_sell_hwnds[12][0]) #money = getWindowText(self.__buy_sell_hwnds[12][0]).strip() #setEditText(self.__buy_sell_hwnds[24][0], '') # 测试时获得资金情况 buy1 = getWindowText(self.__buy_sell_hwnds[25][0]).strip() sell1 = getWindowText(self.__buy_sell_hwnds[1][0]).strip() print('buy1=',buy1) print('sell1=',sell1) time.sleep(0.2) #print('money_str=',money) try: money=float(money) except: money=0.0 sm.send_mail(sub='获取可用资金失败',content='检查验证是否软件异常' ) if self.debug: print('可用资金=',money) return money
def getMoney(self): """获取可用资金 """ code = '999999' setEditText(self.__buy_sell_hwnds[24][0], code) # 测试时获得资金情况 time.sleep(0.2) if self.debug: print('money_hwnd=', self.__buy_sell_hwnds[12][0]) money = getWindowText(self.__buy_sell_hwnds[12][0]).strip() #setEditText(self.__buy_sell_hwnds[24][0], '') # 测试时获得资金情况 time.sleep(0.2) #print('money_str=',money) try: money = float(money) except: money = 0.0 sm.send_mail(sub='获取可用资金失败', content='检查验证是否软件异常') if self.debug: print('可用资金=', money) return money
def getMoney(self): """获取可用资金 """ code = '999999' setEditText(self.__buy_sell_hwnds[24][0], code) # 测试时获得资金情况 time.sleep(0.2) if self.debug: print('money_hwnd=',self.__buy_sell_hwnds[12][0]) money = getWindowText(self.__buy_sell_hwnds[12][0]).strip() #setEditText(self.__buy_sell_hwnds[24][0], '') # 测试时获得资金情况 time.sleep(0.2) #print('money_str=',money) try: money=float(money) except: money=0.0 sm.send_mail(sub='获取可用资金失败',content='检查验证是否软件异常' ) if self.debug: print('可用资金=',money) return money