def __testOp(proc):
    bossid = dolScript.getTabId(proc)
    bossid = 0x1800476
    dia = 0x65
    if(bossid != 0):
    
        dolCall.openDialog(proc, bossid, dia, False)
    else:
        print 'no tab'
def __testOpen(proc):
    
    
    bossid = dolScript.getTabId(proc)
    
    if(bossid != 0):
        
        print dolScript.getTabName(proc)
        
        for dia in range(0x4c, 0xFF):
            print "%x" % (dia)
            dolCall.openDialog(proc, bossid, dia, False)
            time.sleep(2)
            addr = getInt(proc, CALLADDR.DIALOG)
            if (addr != 0):
                print "%x" % (dia)
                break
        
    else:
        print 'no tab'
Exemple #3
0
def __gettab(proc):
    print "0x%x" % (dolScript.getTabId(proc))
 def searchGoods(self):
     helper = ProcessHelper()
     hwnd = helper.getHwndByProc(self.proc)
     
     
     
     bossid = dolScript.getTabId(self.proc)
     
     if(bossid == 0):
         print "no tab!"
         return
     
     addr = getInt(self.proc, FIRM_BASE_ADDR)
     if(addr == 0):
         dolCall.openDialog(self.proc, bossid, 0x7b)
         
         dountil(waitLoad, [self.proc])
         addr = getInt(self.proc, FIRM_BASE_ADDR)
         
     print "%x" % (addr)
     if(addr > 0):
         
         rank = getByte(self.proc, addr + 0x5e4)
         nameList = self.getFirmNameList()
         nowrank = rank
         if(nowrank == rank):
             self.writer.write('ID', 'name', 'price', 'count', 'firm', 'firmseq')
             while(nowrank == rank and nowrank < 250):
                 
                 print "-----------search [%s]------------- (%d/%d)" % (nameList[rank], nowrank, len(nameList))
                 self.currentFirmSeq = nowrank
                 
                 
                 num4 = getInt(self.proc, FIRM_BASE_ADDR) # 当前窗口为商会一览 或者 商会店铺, 这个值会不同
                 Mouse('LClick', hwnd, 0x248, 0x179) #点击"商会店铺"按钮
                 time.sleep(2)
                 num5 = getInt(self.proc, FIRM_BASE_ADDR + 4)
                 
                 waitCount = 0
                 while(num4 == getInt(self.proc, FIRM_BASE_ADDR) or num5 == 0):
                     time.sleep(0.5)
                     num5 = getInt(self.proc, FIRM_BASE_ADDR + 4)
                     if (waitCount > 15):
                         break
                     waitCount += 1
                 
                 
                 
                 if(waitCount < 10 or num4 != getInt(self.proc, FIRM_BASE_ADDR)):
                     #readinfo
                     infoList = self.getGoodsInfo()
                     
                     
                     
                     num4 = getInt(self.proc, FIRM_BASE_ADDR)
                     Key('KeyClick', hwnd, 0x1b) #ESC
                     
                     waitCount = 0
                     while(num4 == getInt(self.proc, FIRM_BASE_ADDR)):
                         time.sleep(0.5)
                         waitCount += 1
                     
                 Key('KeyClick', hwnd, 40) #down arrow
                 time.sleep(0.5)
                 
                 while(getByte(self.proc, addr + 0x6ac) != rank + 1):
                     if(getByte(self.proc, addr + 0x6ac) == 0):
                         return
                     time.sleep(0.5)
                 
                 rank = getByte(self.proc, addr + 0x5e4)     
                     
                 nowrank += 1
                 
                 #print rank
                 #print nowrank
     else:
         print "Dialog Not opened"