nilly (01-24-2014)
I am trying to create an advanced trade bot using image search on the screen. I am using a program called Jitbit Macro Recorder. I can create an if statement with an image but it only searches for one image and then continues after finding the one image or not finding the image. In the Macro recorder it has the option to input C# code and then run it. So basically I am trying to make it search for a certain number of images say 5 and report back if it finds 5 images or not. Maybe have it upload (say pot.png) an image to search for and search the screen for images.
English version (this is what I need help making)
If "pot.png" found five times
statement is true (read next line of code)
statement is false (goto end if)
When I open the command to edit in the macro recorder this is in the text box.
https://imgur.com/o8APIM8
public class Program
{
public static void Main()
{
System.Windows.Forms.MessageBox.Show("test");
}
}
Below text box:
IMPORTANT: This code MUST contain a class name "Program" with a static method "Main".
If you need more details or have questions post below or pm me.
Last edited by HappyMan20; 01-23-2014 at 06:36 PM.
nilly (01-24-2014)
The code is fine, it should run just fine.
Post some pics?
Last edited by krazyshank; 01-23-2014 at 05:34 PM.
Do you know C#? I am not sure what to do with this "This code MUST contain a class name "Program" with a static method "Main"." What does the class and static method mean?
https://imgur.com/o8APIM8
Last edited by HappyMan20; 01-23-2014 at 06:36 PM.
Yes I know c#..
That message is not an error, it a warning. If you don't know what it means, you should go learn c# first.
Main is your entry point of your program, the first thing that is called that makes it start. Program is a class which incapsulates your code, a fundamental core of an object oriented language like c#. Your method, Main, must be in a class. Static just means only one instance of it exists, and always exists, and you access it without an object reference.