1

I have a script on apple script editor for a discord bot. (Discord is a chatting app my friends and I use) The discord bot is called "Dank Memer" and basically there are coins that you can get by typing in certain commands, such as "pls beg". I have a bot that I can run overnight to farm coins, the problem is that i need my laptop to be on that window to run it, since all it does is type the command and then press return. I was wondering if I could run the script in the background so I can farm coins 24/7.

Here's the code.

tell application "System Events"
    repeat
        delay 40
        keystroke "pls beg"
        keystroke return
    end repeat
end tell
1

1 Answer 1

1

No, System Events can only send keystrokes to the frontmost window and is not capable of sending keystrokes to a window that's in the background.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .