Spaces:
Paused
Paused
Create bot.py
Browse files1234567891011121314151617181920212223242526272829303132import pyautoguiimport timeimport os
# Set the display so it knows where to move the mouseos.environ['DISPLAY'] = ':1'
def human_bot(): time.sleep(10) # Wait for GUI to boot # 1. Click the "Start" area or use shortcut to open terminal pyautogui.hotkey('alt', 'f2') time.sleep(1) pyautogui.write('firefox-esr', interval=0.1) pyautogui.press('enter') time.sleep(5) # Wait for browser # 2. Go to a website and do stuff pyautogui.write('https://www.wikipedia.org', interval=0.1) pyautogui.press('enter') while True: # Move mouse like a human pyautogui.moveTo(500, 500, duration=2) pyautogui.scroll(-10) # Scroll down time.sleep(5) pyautogui.scroll(10) # Scroll up print("Bot is 'thinking'...")
if __name__ == "__main__": human_bot()bot.pyAdded+32