c++ auto refresh/reload

01/23/2011 19:28 wongerlt#1
How i can auto refresh screen?
this code system("CLS"); clear screen and how i can load screen?
or how i can reload offset rezultat?
01/23/2011 19:38 xNopex#2
I don't understand your question... After you have cleared the console output by using system("cls"), which is btw not a very clever idea, you can simply write again on the console by using 'cout' or a winapi function.
01/23/2011 19:45 wongerlt#3
me program:
Quote:
#include <windows.h>
#include <iostream>




int main()
{

SetConsoleTitle ("BOT");


HWND hWnd;
DWORD processId;
HANDLE hProcess;
hWnd = FindWindow("Solitaire", 0);

if (!hWnd)
{
std::cout << "Programa Isjungta" << std::endl;
} else {
GetWindowThreadProcessId(hWnd, &processId);

hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, processId);

int taskai;

ReadProcessMemory(hProcess, (LPVOID)0x000AA768, &taskai, 4, 0);

std::cout << "Score: " << taskai << std::endl;
if (taskai == 0)
{
std::cout << "Score: " << taskai << std::endl;

}
}
system("pause");

return 0;
}
this show
score:
and if score 0 show again score :D
now i nee re-load offset , because i need recheck if(taskai == 0)
maybe can make simple example how refresh?
01/23/2011 20:45 Medix#4
maybe you just should grab a good book / tutorial before you start copy and paste other people's code.
01/24/2011 16:25 xNopex#5
Your English sucks... Maybe this will help you: [Only registered and activated users can see links. Click Here To Register...]