greetings everyone i'm new here
I'm trying to make a macro for a particular game :nonchalance:
The idea depends on checking (color ,coordinates ) :eagerness:
If a specific color is found in the specific coordinates press the keyboard button
and this will be inside loop it's mean will be continue searching until stop this macro manually by shortcut or button :concern:
so i create algorithm and then started writing code but i'm facing problem to how writing code as macro :nevreness:
so for keep my macro recognize (color ,coordinates )or keep checking screen for whole time even keystroke :apologetic:
could you help me to complete this code please?
I'm trying to make a macro for a particular game :nonchalance:
The idea depends on checking (color ,coordinates ) :eagerness:
If a specific color is found in the specific coordinates press the keyboard button
and this will be inside loop it's mean will be continue searching until stop this macro manually by shortcut or button :concern:
so i create algorithm and then started writing code but i'm facing problem to how writing code as macro :nevreness:
so for keep my macro recognize (color ,coordinates )or keep checking screen for whole time even keystroke :apologetic:
could you help me to complete this code please?
C#:
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
bool macrostart = false;
void check_red_square()
{
if (red square) //need to put here coordinate and colors RGP HERE to check on screen
{
SendKeys.Send("A");
}
}
void check_square_blue()
{
if (square blue)) //need to put here coordinate and colors RGP HERE to check on screen
{
SendKeys.Send("S");
}
}
void check_yellow_circle()
{
if (yellow circle) //need to put here coordinate and colors RGP HERE to check on screen
{
SendKeys.Send("D");
}
}
private void btnStart_Click(object sender, EventArgs e)
{
macrostart = true;
while (macrostart = true)
{
check_red_square();
check_square_blue();
check_yellow_circle();
}
}
private void btnEnd_Click(object sender, EventArgs e)
{
macrostart = false;
}
}
}