link , thanks for the reply and support! , ifi have problems ill post back here , ty!
SetForegroundWindow(GetConsoleWindow()); //Sets the program as the main window. Used to set the window.
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), 0, 0); //Simulate that you are pressing the ALT key
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), 0, 0); //Simulate that you are pressing the ENTER key
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), KEYEVENTF_KEYUP, 0); //Simulate that you are letting go of the ALT key
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), KEYEVENTF_KEYUP, 0); //Simulate that you are letting go of the ENTER key

#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address =0x063FE94; // This is the address that we want to read from
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD address2=0x063FE78;
int value2= 0;
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"TB"); //Finds the Window called "TB"
if(!hwnd) //If none, display an error
{
cout <<"Window not found!\n";
cin.get();
}
else
{
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
cout << "ok , tentando Mostrar valores...\n";
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
else
{
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0); //Read what is in "address" and store it in "value", then what is the size of what we are going to read which is "value",and finally the number of bytes read, but I dont care about that so I put a 0, or NULL
cout <<"HP:"<< value << "\n\n"; //Display it
ReadProcessMemory(phandle,(void*)address2,&value2,sizeof(value2),0);
cout <<"MP:"<<value2<<"\n\n";
Sleep(5000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
}
}
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address =0x063FE94; // This is the address that we want to read from
int change = 1000;
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD address2=0x063FE78;
int change2 = 1000;
int value2= 0;
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"TB"); //Finds the Window called "Minesweeper"
if(!hwnd) //If none, display an error
{
cout <<"Janela nao encontrada!\n";
cin.get();
}
else
{
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE,0,pid); //Get permission to read
cout << "ok , tentando Mostrar valores...\n";
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
else
{
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0); //Read what is in "address" and store it in "value", then what is the size of what we are going to read which is "value",and finally the number of bytes read, but I dont care about that so I put a 0, or NULL
cout <<"HP:"<< value << "\n\n"; //Display it
ReadProcessMemory(phandle,(void*)address2,&value2,sizeof(value2),0);
cout <<"MP:"<<value2<<"\n\n";
if(value == 2)
{
WriteProcessMemory(phandle,(void*)address,&change,sizeof(change),0);
}
if(value2 == 2)
{
WriteProcessMemory(phandle,(void*)address,&change2,sizeof(change2),0);
}
Sleep(5000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
}
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address =0x063FE94; // This is the address that we want to read from
int change = 1000;
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD address2=0x063FE78;
int change2 = 1000;
int value2= 0;
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"TB"); //Finds the Window called "Minesweeper"
if(!hwnd) //If none, display an error
{
cout <<"Janela nao encontrada!\n";
cin.get();
}
else
{
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
cout << "ok , tentando Mostrar valores...\n";
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
else
{
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0); //Read what is in "address" and store it in "value", then what is the size of what we are going to read which is "value",and finally the number of bytes read, but I dont care about that so I put a 0, or NULL
cout <<"HP:"<< value << "\n\n"; //Display it
ReadProcessMemory(phandle,(void*)address2,&value2,sizeof(value2),0);
cout <<"MP:"<<value2<<"\n\n";
if(value == 2)
{
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), 0, 0);
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), 0, 0);
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), KEYEVENTF_KEYUP, 0);
}
if(value2 == 2)
{
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), 0, 0);
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), 0, 0);
keybd_event(VK_RETURN, MapVirtualKey(VK_RETURN, 0), KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, MapVirtualKey(VK_MENU, 0), KEYEVENTF_KEYUP, 0);
}
Sleep(5000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
}
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address =0x063FE94; // This is the address that we want to read from
int change = 1000;
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD address2=0x063FE78;
int change2 = 1000;
int value2= 0;
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"TB"); //Finds the Window called "Minesweeper"
if(!hwnd) //If none, display an error
{
cout <<"Janela nao encontrada!\n";
cin.get();
}
else
{
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
cout << "ok , tentando Mostrar valores...\n";
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
else
{
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0); //Read what is in "address" and store it in "value", then what is the size of what we are going to read which is "value",and finally the number of bytes read, but I dont care about that so I put a 0, or NULL
cout <<"HP:"<< value << "\n\n"; //Display it
ReadProcessMemory(phandle,(void*)address2,&value2,sizeof(value2),0);
cout <<"MP:"<<value2<<"\n\n";
if(value == 2)
{
SetForegroundWindow(hwnd); //Sets the window to the game
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), 0, 0); //Press F11
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), KEYEVENTF_KEYUP, 0); //Let go of F11
}
if(value2 == 2)
{
SetForegroundWindow(hwnd); //Sets the window to the game
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), 0, 0); //Press F11
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), KEYEVENTF_KEYUP, 0); //Let go of F11
}
Sleep(5000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
}
#include <windows.h>
#include <stdio.h>
int main()
{
char buffer[MAX_PATH];
char *message = "hello";
sprintf(buffer, "%s", message);
//GetWindowText(hwContact, szContact, 256);
//strcpy(&szContact[strlen(szContact)], " - Conversation");
//GetWindowText(hwMsg, szMsg, 256);
//strcpy(&szMsg[strlen(szMsg)], "");
HWND fcContact = FindWindow(NULL, "Untitled - Notepad");
ShowWindow(fcContact, SW_SHOWMAXIMIZED);
SetForegroundWindow(fcContact);
//FindWindowEx( hTray, NULL, "Button", NULL);
SendMessage(FindWindowEx(fcContact, NULL, "Edit", NULL), WM_SETTEXT, 0, (LPARAM)buffer);
system("pause");
}
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address =0x063FE94;
int value = 0;
DWORD address2=0x063FE78;
int value2= 0;
DWORD pid;
HWND hwnd;
hwnd = FindWindow(NULL,"TB");
if(!hwnd)
{
cout <<"Janela nao encontrada!\n";
cin.get();
}
else
{
GetWindowThreadProcessId(hwnd,&pid);
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
cout << "ok , tentando Mostrar valores...\n";
if(!phandle)
{
cout <<"Could not get handle!\n";
cin.get();
}
else
{
while(1)
{
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0);
cout <<"HP:"<< value << "\n\n"; //Display it
ReadProcessMemory(phandle,(void*)address2,&value2,sizeof(value2),0);
cout <<"MP:"<<value2<<"\n\n";
if(value == 65)
{
SetForegroundWindow(hwnd); //Sets the window to the game
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), 0, 0); //Press F11
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), KEYEVENTF_KEYUP, 0); //Let go of F11
}
if(value2 == 65)
{
SetForegroundWindow(hwnd); //Sets the window to the game
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), 0, 0); //Press F11
keybd_event(VK_F11, MapVirtualKey(VK_F11, 0), KEYEVENTF_KEYUP, 0); //Let go of F11
}
Sleep(5000);
}
return 0;
}
}
ill try me best to help!!