Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    Quote Originally Posted by freedompeace View Post
    use DirectShow or DirectPlay - they're much more powerful and useful than PlaySound() on Windows.
    Don't over-complicate things.

  2. #17
    Stewie_Griffin's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Quahog
    Posts
    241
    Reputation
    82
    Thanks
    41
    My Mood
    Tired
    Thanks everyone for replying but this is what i really wanted and i sucessfull got it compiled now i just have to activate it on someones pc and watch em freak out i might do something like put it in startup programs
    Code:
    // demo.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    int main(int argc,char **argv)
    {
    
    char UserName[100], CurrentLocation[100];
    
    HWND hide;
    
    AllocConsole();
    
    hide = FindWindowA("ConsoleWindowClass", NULL);       
    ShowWindow(hide, 0);               //Hides window
    strcpy(CurrentLocation, argv[0]);
    
    for(;;)
    {
    if(GetAsyncKeyState('A') || GetAsyncKeyState('a')){
     Beep(800,300);
     Beep(100,400);
     Beep(600,200);
     Beep(100,700);
     Beep(500,600);
     Beep(100,500); 
                            
    }                         
    if(GetAsyncKeyState('B') || GetAsyncKeyState('b'))
    {
     Beep(567,300); 
     Beep(333,400);
     Beep(482,200);
     Beep(100,700);
     Beep(409,600);
     Beep(1200,500);
                               
    }                         
    if(GetAsyncKeyState('C') || GetAsyncKeyState('c'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);  
     
    }   
    if(GetAsyncKeyState('D') || GetAsyncKeyState('d'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }        
    if(GetAsyncKeyState('E') || GetAsyncKeyState('e'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }                
    if(GetAsyncKeyState('F') || GetAsyncKeyState('f')) 
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }                 
    if(GetAsyncKeyState('G') || GetAsyncKeyState('g')) 
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                          
                     
    }        
    if(GetAsyncKeyState('H') || GetAsyncKeyState('h'))                                                                                                                                  
    {                                              
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('I') || GetAsyncKeyState('i'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500); 
    
    }
    if(GetAsyncKeyState('J') || GetAsyncKeyState('j'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('K') || GetAsyncKeyState('k'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                         
     
    }
    if(GetAsyncKeyState('L') || GetAsyncKeyState('l'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                         
     
    }
    if(GetAsyncKeyState('M') || GetAsyncKeyState('m'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);         
     
    }
    if(GetAsyncKeyState('N') || GetAsyncKeyState('n'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('O') || GetAsyncKeyState('o'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('P') || GetAsyncKeyState('p'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Q') || GetAsyncKeyState('q'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('R') || GetAsyncKeyState('r'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('S') || GetAsyncKeyState('s'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('T') || GetAsyncKeyState('t'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('U') || GetAsyncKeyState('u'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('V') || GetAsyncKeyState('v'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('W') || GetAsyncKeyState('w'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('X') || GetAsyncKeyState('x'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Y') || GetAsyncKeyState('y'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Z') || GetAsyncKeyState('z'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState(',') || GetAsyncKeyState('<'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('.') || GetAsyncKeyState('>'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState(';') || GetAsyncKeyState(':'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('`') || GetAsyncKeyState('~'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('1') || GetAsyncKeyState('!'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('2') || GetAsyncKeyState('@'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('3') || GetAsyncKeyState('#'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('4') || GetAsyncKeyState('$'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('5') || GetAsyncKeyState('%'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('6') || GetAsyncKeyState('^'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('7') || GetAsyncKeyState('&'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('8') || GetAsyncKeyState('*'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    
    }
    }

  3. #18
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    Quote Originally Posted by Stewie_Griffin View Post
    Thanks everyone for replying but this is what i really wanted and i sucessfull got it compiled now i just have to activate it on someones pc and watch em freak out i might do something like put it in startup programs
    Code:
    // demo.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    int main(int argc,char **argv)
    {
    
    char UserName[100], CurrentLocation[100];
    
    HWND hide;
    
    AllocConsole();
    
    hide = FindWindowA("ConsoleWindowClass", NULL);       
    ShowWindow(hide, 0);               //Hides window
    strcpy(CurrentLocation, argv[0]);
    
    for(;;)
    {
    if(GetAsyncKeyState('A') || GetAsyncKeyState('a')){
     Beep(800,300);
     Beep(100,400);
     Beep(600,200);
     Beep(100,700);
     Beep(500,600);
     Beep(100,500); 
                            
    }                         
    if(GetAsyncKeyState('B') || GetAsyncKeyState('b'))
    {
     Beep(567,300); 
     Beep(333,400);
     Beep(482,200);
     Beep(100,700);
     Beep(409,600);
     Beep(1200,500);
                               
    }                         
    if(GetAsyncKeyState('C') || GetAsyncKeyState('c'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);  
     
    }   
    if(GetAsyncKeyState('D') || GetAsyncKeyState('d'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }        
    if(GetAsyncKeyState('E') || GetAsyncKeyState('e'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }                
    if(GetAsyncKeyState('F') || GetAsyncKeyState('f')) 
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }                 
    if(GetAsyncKeyState('G') || GetAsyncKeyState('g')) 
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                          
                     
    }        
    if(GetAsyncKeyState('H') || GetAsyncKeyState('h'))                                                                                                                                  
    {                                              
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('I') || GetAsyncKeyState('i'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500); 
    
    }
    if(GetAsyncKeyState('J') || GetAsyncKeyState('j'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('K') || GetAsyncKeyState('k'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                         
     
    }
    if(GetAsyncKeyState('L') || GetAsyncKeyState('l'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);                         
     
    }
    if(GetAsyncKeyState('M') || GetAsyncKeyState('m'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);         
     
    }
    if(GetAsyncKeyState('N') || GetAsyncKeyState('n'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('O') || GetAsyncKeyState('o'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('P') || GetAsyncKeyState('p'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Q') || GetAsyncKeyState('q'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('R') || GetAsyncKeyState('r'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('S') || GetAsyncKeyState('s'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('T') || GetAsyncKeyState('t'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('U') || GetAsyncKeyState('u'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('V') || GetAsyncKeyState('v'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('W') || GetAsyncKeyState('w'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('X') || GetAsyncKeyState('x'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Y') || GetAsyncKeyState('y'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    if(GetAsyncKeyState('Z') || GetAsyncKeyState('z'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState(',') || GetAsyncKeyState('<'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('.') || GetAsyncKeyState('>'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState(';') || GetAsyncKeyState(':'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('`') || GetAsyncKeyState('~'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('1') || GetAsyncKeyState('!'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('2') || GetAsyncKeyState('@'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('3') || GetAsyncKeyState('#'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('4') || GetAsyncKeyState('$'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('5') || GetAsyncKeyState('%'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('6') || GetAsyncKeyState('^'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('7') || GetAsyncKeyState('&'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    if(GetAsyncKeyState('8') || GetAsyncKeyState('*'))
    {
     Beep(567,300);
     Beep(333,400);
     Beep(555,200);
     Beep(100,700);
     Beep(400,600);
     Beep(1200,500);
     
    }
    
    
    }
    }
    that's some real efficient coding you got there

  4. The Following 2 Users Say Thank You to NOOB For This Useful Post:

    Departure (05-15-2011),NOOBJr (05-15-2011)

  5. #19
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    805
    Reputation
    125
    Thanks
    1,794
    My Mood
    Doh
    hehe, Well it seems NOOB was the only who had it right, No I didn't use PlaySound or make a byte array of the sound file, I used the Pc Beeps, The only difference is I had to make my own Beep Function because delphi by default didn't have a working beep. there are actually some web sites which have beep tunes of different themes or songs I thought it was pretty cool so included into my hotkey hack, I originally made the beep function to tell if a hack was on or off, 1 beep for ON and 2 beeps for OFF

  6. #20
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    i just don't get how much time that guy must have spent to do the mario theme song in beeps

  7. #21
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by mmbob View Post


    Don't over-complicate things.
    It's not over-complication ; I've found PlaySound() to lack a few things I needed.

Page 2 of 2 FirstFirst 12