예제 #1
0
 def getSimPic(self,event):
     # 获取模拟器当前图像信息
     self.handle = get_handle()
     im = prtsc(self.handle)
     im = im[:,:,::-1]
     self.origin_img = im
     self.origin_res = [self.origin_img.shape[1], self.origin_img.shape[0]]
     self.scoreText6.SetLabel('{},{}'.format(self.origin_res[0],self.origin_res[1]))
     self.setImage(im)
예제 #2
0
                        pass

                else:
                    #从新定位当前位置
                    #判断是否代理未满3星
                    #self.find_where()
                    pass

    def start(self):
        for i in range(self.num):
            self.start_once()
            time.sleep(3)


if __name__ == "__main__":
    handle = get_handle([1280, 720])  #获取模拟器窗体句柄
    config_ark.pic_load_ram()  #将配置文件中的图像载入内存
    # function_ark.confirm_where(handle,config_ark.pic_where['yuanshi_lizhi'])
    # function_ark.confirm_where(handle, config_ark.guanqia_pic["CE-5_confirm"])
    # function_ark.confirm_where(handle,config_ark.guanqia_pic['1-7'])
    temp_class = Zhuxian(handle, num=1, guanqia='1-7')
    result = temp_class.find_where()
    temp_class.start()
    temp_class1 = Zhuxian(handle, num=2, guanqia="SK-5")
    temp_class1.start_once()
    # temp_class = Shark_Event(handle,num=20,guanqia=temp[3])  #类实例化,num为刷本次数,guanqia为刷图类型,仅支持GT2-6
    # temp_class.start()

    # handle = get_handle([1280, 720])
    # position = function_ark.pic_position(handle,config_ark.pic_where['zhandou_end'])
    # haha = function_ark.confirm_where(handle, "GT3", True, False)
예제 #3
0
class A():
    def __init__(self):
        self.a = 1
        self.b = 2

    class B():
        def __init__(self):
            pass


import time
import winsound
from basic_function import pic_locate, prtsc, get_handle, mouse_scroll, mouse_drag, key_press
import win32gui, win32print
# winsound.Beep(440,3000)
handle = get_handle()
im = prtsc(handle)
a = time.localtime(time.time())
h, m, s = a.tm_hour, a.tm_min, a.tm_sec
print(123)