Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed

    Mouse_Event strange behavior.

    So i got going on my Color aimbot. so far everything is going good, but one thing which confuses me is this:

    As you can see on the picture, the function i used returns the Tx Ty (wide and high) which is my resolution, though when i make two int's (X and Y) and set their values to the half of Tx and Ty, then to use them in the mouse even function, it should(after all i know) set my mouse position to the middle of my screen, but instead it moves down to the right corner of my screen ....

    So, I'm guessing it's cause i use it wrong? I should be doing:
    Code:
    mouse_event(MOUSEEVENTF_RIGHT, x, y, 0, 0);
    &
    Code:
    mouse_event(MOUSEEVENTF_LEFT, x, y, 0, 0);
    For some strange reason, the LEFT and RIGHT (Yea, the parameters don't look like that) does not really move my mouse, at all.

    Anyways, enough talking here's my code:
    Code:
    #include <cstdlib>
    #include <iostream>
    #include <windows.h>
    using namespace std;
    
    int main()
    {
       int Tx = GetSystemMetrics(SM_CXSCREEN);
       int Ty = GetSystemMetrics(SM_CYSCREEN);
       
       int x = Tx / 2;
       int y = Ty / 2;
       cout << x << " x - y " << y << endl;
       cout << Tx << " Tx - Ty " << Ty;
    mouse_event(MOUSEEVENTF_MOVE, x, y, 0, 0);
    
        cin.get();
        return EXIT_SUCCESS;
    }
    Last edited by VirtualDUDE; 05-09-2011 at 09:35 AM.

  2. #2
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    Use the flag MOUSEEVENTF_ABSOLUTE to let the function know you want to set the exact position of the mouse.

  3. The Following User Says Thank You to mmbob For This Useful Post:

    Hell_Demon (05-10-2011)

  4. #3
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by mmbob View Post
    Use the flag MOUSEEVENTF_ABSOLUTE to let the function know you want to set the exact position of the mouse.
    Thanks mate. Gonna try it later today. Will let you know if it works.

    Also, is anyone able to find proper documentations of the MOUSE_EVENT. I can't, all i get is problem related searches.

  5. #4
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by VirtualDUDE View Post
    Thanks mate. Gonna try it later today. Will let you know if it works.

    Also, is anyone able to find proper documentations of the MOUSE_EVENT. I can't, all i get is problem related searches.
    mymy, I found a secret underground site that can read your mind:


  6. The Following User Says Thank You to freedompeace For This Useful Post:

    Hell_Demon (05-10-2011)

  7. #5
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    *cough* MSDN.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  8. The Following User Says Thank You to master131 For This Useful Post:

    Hell_Demon (05-10-2011)

  9. #6
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by freedompeace View Post


    mymy, I found a secret underground site that can read your mind:

    It shows results for VB Windows API's...Etc.

    @master131 lol, /Facepalm. Completely forgot about that

  10. #7
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    Quote Originally Posted by VirtualDUDE View Post
    It shows results for VB Windows API's...Etc.

    @master131 lol, /Facepalm. Completely forgot about that
    So you don't need any help anymore?

  11. #8
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by Cookie. View Post


    So you don't need any help anymore?
    Actually, I'm pretty sure i do
    I'm going to try with the other "flag" he posted, by a few seconds ago when i tried. I didn't work....Not surprising tho :P

  12. #9
    Stephen's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Engine.exe
    Posts
    4,689
    Reputation
    184
    Thanks
    1,149
    My Mood
    Aggressive
    It still doesn't work?

  13. #10
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by Stephen View Post
    It still doesn't work?
    Nope MOUSEEVENTF_ABSOLUTE Doesn't move my mouse.

    Off topic, you miss-spelled "you're" in your signature.

  14. #11
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by VirtualDUDE View Post
    Off topic, you miss-spelled "you're" in your signature.
    Your not Serious right ?

  15. #12
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Code:
    mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, x, y, 0, 0);
    Si?
    Ah we-a blaze the fyah, make it bun dem!

  16. #13
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by whit View Post
    Your not Serious right ?
    You did it again
    It's You're. You're , YOU ARE. Your, Your object or belonging.

    @Hell_Demon Will try the code, thanks. I'm aware the "strange behavior" is caused by the fact it's my first time using these Win functions, so bare with me while i slowly figure it out .
    Last edited by VirtualDUDE; 05-10-2011 at 01:48 PM.

  17. #14
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    Quote Originally Posted by VirtualDUDE View Post
    You did it again
    It's You're. You're , YOU ARE. Your, Your object or belonging.

    @Hell_Demon Will try the code, thanks. I'm aware the "strange behavior" is caused by the fact it's my first time using these Win functions, so bare with me while i slowly figure it out .
    He knows

  18. #15
    VirtualDUDE's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    In my basement
    Posts
    665
    Reputation
    -172
    Thanks
    20
    My Mood
    Relaxed
    Quote Originally Posted by Cookie. View Post


    He knows
    I don't wanna sound all stupid But it's still not working correctly.
    This time it moves to upper left corner (Y-aks) O__o
    I tried legit coordinates like x 400 and y 300..
    Can anyone give me an example or perhaps test it themselves :?
    Else, thanks for the help.

Page 1 of 2 12 LastLast