Simple script for a browser game

Ask gaming related questions (AHK v1.1 and older)
juanguirago
Posts: 4
Joined: 27 Jul 2016, 20:04

Simple script for a browser game

02 Dec 2018, 10:15

Hi everyone!
I need some help creating a simple script that does the following:

Press left arrow key
Wait 3 seconds
Press right arrow key
Wait 3 seconds

This should be done until it detects a certain pixel color on the screen.
Can anyone help me do this or give me any tips?

Thanks!
User avatar
mizutamari
Posts: 9
Joined: 02 Dec 2018, 22:06

Re: Simple script for a browser game

04 Dec 2018, 00:15

Here's an example that may or may not work:

Code: Select all

While (pxColor != desiredColor) {
  SendInput {Left}
  Sleep, 3000
  SendInput {Right}
  Sleep, 3000
  PixelGetColor, pxColor, xPos, yPos
}

Naturally, you'll need to tell it what xPos, yPos and desiredColor should be.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Gemos and 71 guests