class GUI(Tk): def __init__(self, config): Tk.__init__(self, None) self.perso = config self.bot = Fbot(self.perso) self.buildGui() def buildGui(self): self.title(self.perso.login_username) self.statusBar = MyStatusBar(self) self.toolbar = MyToolBar(self) self.console = MyConsole(self) self.crashCount = 0 def clean(self): self.bot.running = False self.bot.join() print ("exiting") def refresh(self): self.console.clear() self.console.appendLine("crash " + str(self.crashCount) + " time(s)") if (not self.bot.isRunning()): self.crashCount = self.crashCount + 1 self.bot.join() time.sleep(15) self.bot = Fbot(self.perso)
msg_antialt_keyL = 'xxxxxxxx' msg_antialt_key1 = 'xxxxxxxx' msg_antialt_key2 = 'xxxxxxxx' msg_antialt_key3 = 'xxxxxxxx' login_id = 13129 login_username = '******' login_password = '******' target_id = 8394 number_of_punch = 65 time_to_heal = 130 # def poll(): # gui.after(200, poll) # gui.refresh() # if __name__ == '__main__': # gui = GUI(Fconfig) # poll() # gui.mainloop() # gui.clean() if __name__ == '__main__': while(True): bot = Fbot(Fconfig) while(bot.isRunning()): time.sleep(1) bot.join() time.sleep(10)