Jump to content

Cr5x

Inactive Member
  • Posts

    4
  • Joined

  • Last visited

  • Feedback

    0%

About Cr5x

Informations

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Cr5x's Achievements

Newbie

Newbie (1/16)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. But this isn´t in a loop, is it? I think the function there is called once.. int main(int argc, char* argv[]) { bool bAnyBrowserIsOpen = false; if ( FindProcessId(L"chrome.exe") || FindProcessId(L"firefox.exe") || FindProcessId(L"iexplore.exe")) { bAnyBrowserIsOpen = true; } return 0; } It just checks once. I need to check it the whole time. With timers it would be easy, but in the metin2 source i can´t use timers.. Thank you in advance Edit: Solved
  2. Thank you. I just want to make a function do detect if a program is running. Just a test. So yes, it must run forever.. other solutions? The function "TestFunc" is just a test to see how to loop without freezing the game.
  3. #include <Windows.h> #include <iostream> #include <thread> #include <fstream> void TestFunc(){ while (1){ ofstream myfile; myfile.open("example.txt"); myfile << "Just a test"; myfile.close(); } } And the call in the mainfunc: std::thread t1(TestFunc); t1.join(); The function works, but the game doesnt appear..
  4. Hello, i have the client source and i try to make a function which should be called in a loop. I tried threading, but it doesn´t work. If i use while and threads, the game doesn´t appear, but the function gets called in a loop. Does somebody know how to call a function in a loop from UserInterface without freezing the game? Thank you
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.