I want to create a script in script editor that will press a key and then press enter every 60 seconds. However, I don't know how to make a script that presses a key. Does anybody know how to make a script that does this? I tried to keystroke "enter" but what is did was type out the word enter. Also, sometimes the code will crash and an error message will pop up saying that script editor cannot do keystrokes.
The aim for this script is to create an xp farming discord bot to farm xp on a server by sending messages.