Open .exe within Java component
Hello all,
I'm new here and this is my first question and post.
Right my question is, Is it possible to open up a game using java and manipulate it (as a cheat). So i want to open up "chess" Using java (this is fine) But then i want to be able to "read" what is on the screen and act due to different actions, or moves etc.
Is this possible? And what is the best way to do this?
What i know so far
I can open the file by doing
Process process = Runtime.getRuntime().exec("");
But i don't know how i can get information from it.
Thank you
Re: Open .exe within Java component
import java.util.*;
import java.io.*;
public class CallFile{
public static void main(String[] args) {
try {
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /C start C:\\ab.bat");
}
catch(Exception ex){
ex.printStackTrace();
}
}
}
Hello, there is "ab.bat" file would be placed in c:\\ab.bat..
in ab.bat file, you can define whatever .exe file you want to open...
Re: Open .exe within Java component