"Make game believe it's in foreground" menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    vagnue's Avatar Banned
    Reputation
    1
    Join Date
    Mar 2013
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Make game believe it's in foreground"

    Hello. I am trying to use PostMessage to send background clicks to the game Path of Exile. Keyboard clicks work fine but the game seems to completely ignore all mouse events unless the game is in foreground.

    I noticed ISBoxer and some bots (like demonbuddy) have an option called "Make game believe it's in foreground", I assume this would solve my problem. Does anyone know how this is implemented? Or where to start looking on how to do it?

    "Make game believe it's in foreground"
  2. #2
    yellowspark's Avatar Contributor
    Reputation
    147
    Join Date
    Feb 2012
    Posts
    165
    Thanks G/R
    0/4
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
     private static unsafe void smethod_20()
            {
                void* voidPtr = (void*) stackalloc byte[2];
                if (GlobalSettings.Instance.KeepGameInForeground)
                {
                    *((sbyte*) voidPtr) = ZetaDia.Memory.Read<byte>(ZetaDia.Offsets.struct11_0.intptr_0, false) == 1;
                    if (*(((sbyte*) voidPtr)) == 0)
                    {
                        object obj2; <- #1 object declaration World 
                        Executor executor = ZetaDia.Memory.Executor;
                        *((sbyte*) (voidPtr + 1)) = 0;
                        try
                        {
                            Monitor.Enter(obj2 = executor.AssemblyLock, ref (bool) ref (voidPtr + 1));
                            executor.Clear();
                            executor.AddRandomLine("push 1");
                            executor.AddRandomLine("call {0}", new object[] { ZetaDia.Offsets.struct9_0.intptr_581 });
                            executor.AddRandomLine("add esp, 4");
                            executor.AddRandomLine("retn");
                            executor.Execute(null);
                        }
                        finally
                        {
                            if (*(((sbyte*) (voidPtr + 1))) != 0)
                            {
                                Monitor.Exit(obj2);
                            }
                        }
                    }
                }
            }
    Last edited by yellowspark; 03-07-2013 at 09:32 AM.

Similar Threads

  1. 9 Year old makes game for iPhone :O
    By Clain in forum Community Chat
    Replies: 6
    Last Post: 02-14-2009, 08:54 AM
  2. LUA scripting -- Making game objects cast spells.
    By Jotox in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 05-08-2008, 03:44 PM
  3. [Two Questions] How do I make game objects + Repack problem
    By dude891 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 04-01-2008, 08:51 AM
  4. How to make game objects teleport with LUA!
    By Le Froid in forum WoW EMU Guides & Tutorials
    Replies: 4
    Last Post: 01-02-2008, 06:59 PM
  5. Making Games...
    By Clocky in forum Gaming Chat
    Replies: 26
    Last Post: 12-24-2006, 03:36 AM
All times are GMT -5. The time now is 06:00 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search