Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C# Programming › What are the methods to triggering an action?

ExclamationWhat are the methods to triggering an action?

Posts 1–2 of 2 · Page 1 of 1
TH
theknig
What are the methods to triggering an action?
I want to know which methods that allow you to do an action to a game while it's on the background.

I know there is sending packets in online games.

Is it possible to emulate a keypress to game in the background (without setforground) using PostMessage? or Injecting DLL

Or every action is possible to be activated by modifying values in the memory? (I tried this some things work some were very hard to find)

Or there is another way I haven't heard about?

Looking forward to hear your opinions

I have tried PostMessage but its not working for me.



My Code:

Code:
        
        [DllImport("user32.dll")]
        public static extern UIntPtr FindWindow(string lpClassName, string lpWindowName);
        [DllImport("user32.dll")]
        public static extern UIntPtr SendMessage(UIntPtr hWnd, uint Msg, UIntPtr wParam, UIntPtr lParam);
        [DllImport("user32.dll")]
        public static extern UIntPtr PostMessage(UIntPtr hWnd, uint Msg, UIntPtr wParam, UIntPtr lParam);
        static void Main(string[] args)
        {
            sendKeystroke((ushort)Keys.W);
        }

        public static void sendKeystroke(ushort k)
        {
            const uint WM_KEYDOWN = 0x0100;
            const uint WM_KEYUP = 0x0101;
            UIntPtr WindowToFind = FindWindow(null, "Warfare OnLine Client");
            UIntPtr result3 = PostMessage(WindowToFind, WM_KEYDOWN, ((UIntPtr)k), (UIntPtr)0b00000000000100010000000000000001);
            Thread.Sleep(1000);
            UIntPtr result4 = PostMessage(WindowToFind, WM_KEYUP, ((UIntPtr)k), (UIntPtr)0b11000000000100010000000000000001);
        }
Let me know if there something I can change in my code to make PostMessage work or another method!
#1 · 2y ago
WA
Warte1969
Quote Originally Posted by theknig View Post
I want to know which methods that allow you to do an action to a game while it's on the background.

I know there is sending packets in online games.avatar game

Is it possible to emulate a keypress to game in the background (without setforground) using PostMessage? or Injecting DLL

Or every action is possible to be activated by modifying values in the memory? (I tried this some things work some were very hard to find)

Or there is another way I haven't heard about?

Looking forward to hear your opinions

I have tried PostMessage but its not working for me.



My Code:

Code:
        
        [DllImport("user32.dll")]
        public static extern UIntPtr FindWindow(string lpClassName, string lpWindowName);
        [DllImport("user32.dll")]
        public static extern UIntPtr SendMessage(UIntPtr hWnd, uint Msg, UIntPtr wParam, UIntPtr lParam);
        [DllImport("user32.dll")]
        public static extern UIntPtr PostMessage(UIntPtr hWnd, uint Msg, UIntPtr wParam, UIntPtr lParam);
        static void Main(string[] args)
        {
            sendKeystroke((ushort)Keys.W);
        }

        public static void sendKeystroke(ushort k)
        {
            const uint WM_KEYDOWN = 0x0100;
            const uint WM_KEYUP = 0x0101;
            UIntPtr WindowToFind = FindWindow(null, "Warfare OnLine Client");
            UIntPtr result3 = PostMessage(WindowToFind, WM_KEYDOWN, ((UIntPtr)k), (UIntPtr)0b00000000000100010000000000000001);
            Thread.Sleep(1000);
            UIntPtr result4 = PostMessage(WindowToFind, WM_KEYUP, ((UIntPtr)k), (UIntPtr)0b11000000000100010000000000000001);
        }
Let me know if there something I can change in my code to make PostMessage work or another method!
Hmm... Actually I have no idea. The problem looks a little complicated.
#2 · edited 2y ago · 2y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • What are the best slice-of-life/romance/comedy/(action) animes?By unsub in Anime
    3Last post 10y ago
  • what are the hotkeys?By enk112 in Combat Arms Hacks & Cheats
    5Last post 17y ago
  • What are the types? help pleaseBy sidnietje in WarRock - International Hacks
    0Last post 19y ago
  • what are the risksBy mightymole in Combat Arms Hacks & Cheats
    2Last post 17y ago
  • What are the VIP features?By momo66342 in Combat Arms Hacks & Cheats
    3Last post 17y ago

Tags for this Thread

None