def main(): print("Welcome to Autoclicker v.1") train_or_deploy = input("What are we doing today? (train) (deploy): ") # Split form train or deploy option if train_or_deploy == "train": # Initializing Variables file_name_train = input("File name: ") number_of_clicks = input( "Number of clicks (type -1 for continuous clicking): ") # If statement for number of clicks print("Begin clicking! (Scroll the mouse-wheel when complete)") mouse_train = MouseInput(file_name_train, number_of_clicks) print("Stopped") elif train_or_deploy == "deploy" or "2": file_name_deploy = input("Please input file name (add .json please): ") number_of_loops = int( input("Number of loops (type -1 for infinite loop): ")) print( f"Using {file_name_deploy} as file input with {number_of_loops} number of loops." ) print("Beginning clicking.") mouse_clicker = Bot(file_name_deploy, number_of_loops) mouse_clicker.loop() print(f"Finished {number_of_loops} loops") else: print("Please select option (train or 1) (deploy or 2): ")
def run(self): while self.current_loops < self.n_loops: script_list = ("weeds_clean2", "east_bank1" ) # scripts to run # + Randomizer(1, 8, 1).select() <====#==== randomizer(min,max,step) for index, current_script in enumerate(script_list): # print(index, current_script) bot = Bot(current_script) bot.loop() self.current_loops += 1 print("loop number: " + str(self.current_loops))
import os import argparse from dotenv import load_dotenv from src.bot import Bot from src.mouse_input import MouseInput load_dotenv() parser = argparse.ArgumentParser() parser.add_argument('--name', help='objective to do or to train bot upon', type=str) parser.add_argument('--n_times', help='training clicks amount or bot total loops', type=int) parser.add_argument('--action', help='train or run objective', type=str) args = parser.parse_args() if __name__ == "__main__": if args.action == "train": MouseInput(args.name, args.n_times) elif args.action == "deploy": bot = Bot(args.name + ".json", n_loops=args.n_times) bot.loop()