Last try, then i quit...

This is a discussion on Last try, then i quit... within the C++ Programming forums, part of the General Programming Boards category; I've been looking all over the play trying to figure this out! This is how the program will work: Starts ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    13

    Unhappy Last try, then i quit...

    I've been looking all over the play trying to figure this out!
    This is how the program will work:
    Starts and runs in backround... Win32 App (I use visual c++ 6)
    Counts 35 seconds... and then whereever the cursor is... is clicks
    Like you click the mouse but automatically and on the computer...
    and then like a while loop that never stops (which is easy and i know how to do)
    If you can please help me...

    Thanks,
    ~Silencer~
    What is this "C.O.D.E." you speak of?

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    No offense, but this sounds a little sketchy to me.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    13

    ???

    What do you mean by that?
    ~Silencer~
    What is this "C.O.D.E." you speak of?

  4. #4
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    hmmmmm......what???

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    13
    I need to know how to make the mouse click and a timer that counts down from 35 for my program... thats it...
    ~Silencer~
    What is this "C.O.D.E." you speak of?

  6. #6
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Sound like a virus. A cheesy virus but a virus none the less.

    Why would you want to cause the user's mouse to click at a random position?

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    206
    *slaps you*

    Code:
    sleep(3500);
    that should sleep about 35 seconds.

  8. #8
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330
    Sleep() halts program function. Shouldn't use it.

  9. #9
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    Actually *slaps you* that would pause for 3,5 seconds.

    Sleep(35000); // now THIS would do the thing

  10. #10
    Unregistered
    Guest
    Originally posted by rmullen3
    Sleep() halts program function. Shouldn't use it.
    Actually, sleep() is good to use if you want to be multi-tasking friendly. When you call sleep you are giving other applications time to perform code, without a sleep() anywhere in your code you take more cpu cycles.

  11. #11
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    By sketchy, I meant the program sounded like it was going to be a virus.

  12. #12
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    just a follow up, i was reading about your sleep(), and actually my question is based on different programming languages...... doesn't sleep depend on the speed of the cpu........???

    well, anyway couple languages different than c++ worked like that ......"the faster the processor the less time it takes for the sleep() to terminate"

    hmmmmmm????

    matheo917

  13. #13
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >doesn't sleep depend on the speed of the cpu........???
    Not necessarily. Most implementations of sleep will use the system time as a base, so saying sleep ( 35000 ); will cause a program on any system to sleep for 35 seconds, regardless of processor speed. Something like this:
    Code:
    void sleep ( long m )
    {
      clock_t limit, cl = clock();
      limit = cl + m;
      while ( limit > cl )
        cl = clock();
    }
    -Prelude
    My best code is written with the delete key.

  14. #14
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    do a search for fakesurf, it has the capabilities to do what you want it to do (i use it all the time to keep Netzero from disconnecting me :))

  15. #15
    Registered User
    Join Date
    Aug 2001
    Posts
    13

    huh...

    Lol, you guys are so stupid
    "Sounds like a virus..."
    If you must know i want it for those website programs where you click on the rating and get money to buy hits...
    If you don't know how to do it... Then just don't say anything...
    but, thanks for the time tips from most of you
    ~Silencer~
    What is this "C.O.D.E." you speak of?

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. processes not exiting or quit
    By kryptkat in forum Tech Board
    Replies: 8
    Last Post: 11-13-2006, 11:43 AM
  3. I quit!
    By Luigi in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2002, 08:30 AM
  4. implicit declatation of function 'int toupper(...)'
    By Intimd8r in forum C Programming
    Replies: 3
    Last Post: 10-01-2001, 02:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21