PostMessage to simulate mouse input menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Anadrol's Avatar Member
    Reputation
    8
    Join Date
    Dec 2007
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PostMessage to simulate mouse input

    Hello all,

    Did someone manage to simulate mouse clicks in Wow with PostMessage ? (I need background mode).

    Using Winspector or Spy++ I see that clicks happen in the right X Y place.

    Here are the messages:

    Real click:

    WM_LBUTTONDOWN
    Mouse coordinates: 695, 86

    WM_LBUTTONDOWN
    Buttons pressed: MK_LBUTTON
    Mouse coordinates: 695, 86

    WM_LBUTTONUP
    wParam: 0x00000001
    lParam: 0x005602b7

    WM_LBUTTONUP
    wParam: 0x00000000
    lParam: 0x005602b7

    False click:

    WM_LBUTTONDOWN
    Buttons pressed: MK_LBUTTON (this line was added)
    Mouse coordinates: 695, 86

    WM_LBUTTONDOWN
    Buttons pressed: MK_LBUTTON
    Mouse coordinates: 695, 86

    WM_LBUTTONUP
    wParam: 0x00000001
    lParam: 0x005602b7

    WM_LBUTTONUP
    wParam: 0x00000001 (1 instead of 0)
    lParam: 0x005602b7

    I read that Wow detects false clicks and blocks them in the message queue, is that right ?

    Apoc stated that WoW's MainWindowHandle is not the good one, and I need to send the move/click messages to the actual game window.
    He suggested : Which requires you to enumerate over the windows for the WoW process. Use Spy++ to get the class name and parent of the draw window.

    But well I did find only the GxWindowClass D3d handle.

    By the way simulating keystrokes works (even though sending keydown and keyup will strangely press the key twice).

    Thank you very much for your help !
    Kind regards.

    PostMessage to simulate mouse input
  2. #2
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The messagepump wow uses removes any bogus mouse message.
    You could try to patch it to make it accept all messages in wow it starts at 0x007C9F80
    good luck

  3. #3
    Anadrol's Avatar Member
    Reputation
    8
    Join Date
    Dec 2007
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx Nesox for the great advice !

    I tried to NOP some JMP instructions, without success for the moment.

    Anyway Wow detects at login the exe was modified, will it work if I modify the process in game with WriteProcessMemory or will Warden detect that ?

    Thank you again, +rep for you

  4. #4
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +rep cause i need too

  5. #5
    p20ph37's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah... I cannot figure it out either. I have been trying endlessly to send mouse clicks...Has there been any posts regarding this?

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use SendInput instead.

  7. #7
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Use SendInput instead.
    How can one use SendInput with WoW in background? :confused:

  8. #8
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sendinput

    Im pretty sure you cant use sendinput for background only :S

    -Duke

Similar Threads

  1. Simulate mouse/keyword input from C#
    By booba in forum Diablo 3 Bots and Programs
    Replies: 2
    Last Post: 08-07-2012, 09:52 AM
  2. Is there a way to disable actual mouse input when a AutoIt script is running?
    By Simonzi in forum Diablo 3 Bots Questions & Requests
    Replies: 4
    Last Post: 06-22-2012, 06:45 PM
  3. WndProc (Mouse Input Hook) Problem
    By Amrok in forum WoW Memory Editing
    Replies: 10
    Last Post: 10-30-2011, 07:30 AM
  4. [General Question][C#] WinAPI Hooking / Mouse Simulation
    By DrakeFish in forum WoW Memory Editing
    Replies: 8
    Last Post: 12-31-2010, 02:35 AM
  5. Simulate mouse without focus
    By JuJuBoSc in forum Programming
    Replies: 10
    Last Post: 03-07-2009, 12:22 PM
All times are GMT -5. The time now is 06:10 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search