Detect Color And click or reset Run
Posted: 11 May 2024, 23:39
Hello,
I am trying to write a script for a game (Balatro, if anyone is familiar) to detect a color, if the color is seen, click a box. If there is a blue card seen, exit the code, but if neither of the two colors are detected reset the run.
I used chatgpt for alot of this code, but I cannot get ErrorLevel or the color detection to work and I was wondering if someone could help me out.
The escape and other keystrokes seem to work. The main issue is color detection and I get a popup interrupting the loop every time about ErrorLevel not being assigned a value.
[ChatGPT-generated code removed by moderator.]
I am trying to write a script for a game (Balatro, if anyone is familiar) to detect a color, if the color is seen, click a box. If there is a blue card seen, exit the code, but if neither of the two colors are detected reset the run.
I used chatgpt for alot of this code, but I cannot get ErrorLevel or the color detection to work and I was wondering if someone could help me out.
The escape and other keystrokes seem to work. The main issue is color detection and I get a popup interrupting the loop every time about ErrorLevel not being assigned a value.
[ChatGPT-generated code removed by moderator.]