Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Show Off Your Open Source Projects (http://www.programmingforums.org/forum52.html)
-   -   No More Coffee? (http://www.programmingforums.org/showthread.php?t=7491)

UnKnown X Dec 10th, 2005 4:13 PM

No More Coffee?
 
If you've ran out of coffee, this is for you!


However, if there are people around that are sleeping or can be disturbed in any other way, you should be careful with this... :p


Now, take this C programme and compile it as beepbeep.exe
:

#include <stdio.h>
#include <time.h>

int main(void)
{
        time_t seconds;
        int initial, current, sec, i;
    double n=rand()*rand();

        current=(int)(time(&seconds));
        initial=current+1;

        while(1)
        {
                if(current<time(&seconds))
                {
                        ++current;
                        sec=(current-initial);
            if (sec==10)
                while (1)
                    printf("\a");
                }
        }

        return 0;
}


Now, save this as, say, open.bat:

:

start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe
start beepbeep.exe


Then run open.bat


And finally scream in frustration as you try to track down all the beepbeep's in your processes list! Have fun!



Also, I doubt that this works on anything other than Windows.

coldDeath Dec 10th, 2005 4:21 PM

lol.

Don't batch scripts have loops? :-)

UnKnown X Dec 10th, 2005 4:22 PM

I dunno. I only made this programme for laughs; nothing serious at all. :p

DaWei Dec 10th, 2005 4:42 PM

This is really stupendous. I may not sleep until I have encompassed its ramifications throughout my very soul.

zorin Dec 10th, 2005 5:08 PM

Yep, your right don't try this when half asleep :o

jayme Dec 10th, 2005 5:11 PM

does this use your cpu speaker or your external speakers?

UnKnown X Dec 10th, 2005 5:16 PM

The CPU speaker. And you all know what that sounds like (on most machines)...

lostcauz Dec 11th, 2005 1:37 AM

Incredibly delightful.

Dameon Dec 11th, 2005 2:06 AM

A beepbeep fork bomb is somewhat funnier ;)

Silvanus Jan 4th, 2006 11:06 PM

Less "scream in frustration" and more "unplug the computer," unsaved work be damned!


All times are GMT -5. The time now is 8:56 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC