I am trying to make a Twitch plays Roller Coaster Tycoon 2 (for fun) with help from this site and a slightly modified version of this to click on the screen. What I want to do is: if a person writes for example !click 10 10
, it will click at position 10 10, but I don't know how to do that.
My dad said that I have to find a way to find those numbers and turn them in to a variable. I've already wrote a bit to turn the text into a variable.
Define clickMSG
:
clickMSG = ""
Code to detect message:
if "!click" in msg:
clickMSG = msg
How can I find those numbers and turn them into the variables xpos
and ypos
if, for example, the message is !click 50 10
?