Page 1 of 3 123 LastLast
Results 1 to 15 of 43
  1. #1
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked

    Looking to start my first C++ Project

    Well i've been absent from the boards for a while now, since Combat Arms called to me again, and I had to go answer said call. But i've started my down slope for CA again, (Mainly because my legit account was banned) but to the point, i've been using my VIP for a while, and the creator of my VIP said that since he only charges once for a life time membership, that new updates / features will be few and far between. (More exactly he said that he has NO plans for ANY updates anytime soon) and i'm wanting a spammer to advertise while i'm OPKing or whatever.

    I figure this would suffice as my first actual project as it will make use of the windows API, basic C++, and maybe some other things. This is what I want the finished product to be.

    I'm nowhere near writing a GUI, so i'd be fine running it as a console app. But this is the basic stuff it has to do.

    First, when you open the program, it will prompt for a message that you want to be spammed. You type in the message that you want to be spammed, and it will then prompt to press shift to spam the message (which will require a global keyboard hook I recon.)

    I want this to be an ANY time spammer, meaning I could use it when firefox is open, yahoo messenger, or for my use CA. I figure if I make it work for multiple things then there will be a less chance that i'll run into HackShield.

    This is where my knowledge starts to get even more limited.

    Once I get into a window, regardless of the program, I would need it to find the text box so that it would actually display my message instead of spamming it into nothing-ness (This is the part I have no clue about, the rest of it I have somewhat of an idea how to start.)

    But basically, I want it to lock onto a text box, and us the Virtual Keys ctrl and v to paste the message, then the enter key to send the message. But I would like it to do this about 2 times a second, for 5 seconds, then take a 1 minute rest period.

    So I guess my first question is, is this too much if a quest for my first programming project? I figure if I can do this, i'll have a basic understanding of the Win32 API (more specifically, keyboard hooking.)

    Does this require any D3D other than grabbing the Combat arms window?


    Most importantly, would I have to bypass hack shield to do this? If so I'm just going to drop the project entirely, cause I have NO need to learn anything about that right now.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  2. #2
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Hate to double post, but i've already started on it, i've got it so far as taking in the message you wish to be spammed, storing it as a string variable using the getline() functions, and I won't have to find a text box or anything like that because in combat arms when you hop in channel, you're by default, in the text box. So Now I have this question.

    I have it set to take a message that you want to be spammed, and store it as a string, Is there a way to then, copy the stored message to the clipboard so that the ctrl + v method would work?

    EDIT! I'm a dumb ass, it will still have to find the in game text box so that it can spam, other wise it will just spam the program itself. Which isn't what i'm looking for.

    EDIT AGAIN! I think i'm confusing the shit out of myself.....Ok, so if I set it to store a message in a variable, copy the stored message to the clipboard, as long as i'm in game if the program is pressing Ctrl + V it should paste in the in game text box anyway right?
    Last edited by ilovecookies; 01-18-2010 at 03:23 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  3. #3
    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
    SendKeys <3
    its a .net project(2003, should compile fine on 2005/2008, dont know bout 2010)

    initializes a bit slow here, it will ask u for text, use {ENTER} for a newline, {TAB} for a tab etc

    as to your above question, just enter the chat key first(e.g. if F6 opens the chat, use SendKeys::SendWait("{F6}");, then use a sleep of 100-200 MS(to be safe), then SendKeys::SendWait your message
    Ah we-a blaze the fyah, make it bun dem!

  4. #4
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Quote Originally Posted by Hell_Demon View Post
    SendKeys <3
    its a .net project(2003, should compile fine on 2005/2008, dont know bout 2010)

    initializes a bit slow here, it will ask u for text, use {ENTER} for a newline, {TAB} for a tab etc

    as to your above question, just enter the chat key first(e.g. if F6 opens the chat, use SendKeys::SendWait("{F6}");, then use a sleep of 100-200 MS(to be safe), then SendKeys::SendWait your message
    o_O I have no clue what you're going on about. What's the attachment for? I recon it's something to do with these, "Sendkeys" but wouldn't vk's be simpler? o_o Or would that be many countless lines of code?


    Anyways, i'm still at the same place, I need to figure out if it's possible to copy a string that stored in a variable to the clipboard. If this is possible, then I just need to implement that, a keyboard hook, the actual spam loop, and i'm done.

    Once it's done it should work like this, It prompts you for the message you want spammed, you give it input, it stores that as a string, the string gets copied to the clipboard, then once I get in game, or whereever I need to be to spam, I hit the start spam key(shift) and it will press Enter first, then Ctrl + v at the same time. It will repeat this 10 times, 2 times a second, then take a 90 second rest.


    It's changed a bit since my initial idea.
    Last edited by ilovecookies; 01-18-2010 at 04:57 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  5. #5
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by Hell_Demon View Post
    SendKeys <3
    its a .net project(2003, should compile fine on 2005/2008, dont know bout 2010)

    initializes a bit slow here, it will ask u for text, use {ENTER} for a newline, {TAB} for a tab etc

    as to your above question, just enter the chat key first(e.g. if F6 opens the chat, use SendKeys::SendWait("{F6}");, then use a sleep of 100-200 MS(to be safe), then SendKeys::SendWait your message
    That function is awfully specific, and strangely useful . ...

  6. #6
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by ilovecookies View Post
    o_O I have no clue what you're going on about. What's the attachment for? I recon it's something to do with these, "Sendkeys" but wouldn't vk's be simpler? o_o Or would that be many countless lines of code?


    Anyways, i'm still at the same place, I need to figure out if it's possible to copy a string that stored in a variable to the clipboard. If this is possible, then I just need to implement that, a keyboard hook, the actual spam loop, and i'm done.

    Once it's done it should work like this, It prompts you for the message you want spammed, you give it input, it stores that as a string, the string gets copied to the clipboard, then once I get in game, or whereever I need to be to spam, I hit the start spam key(shift) and it will press Enter first, then Ctrl + v at the same time. It will repeat this 10 times, 2 times a second, then take a 90 second rest.


    It's changed a bit since my initial idea.
    He's saying Download his code edit this part:
    Code:
    int _tmain()
    {
        // TODO: Please replace the sample code below with your own.
    	Console::WriteLine("Enter text 2 send");
    	System::String *mySendString = Console::ReadLine();
    	while(1)
    	{
    		if(GetAsyncKeyState(VK_LSHIFT))
    		{
    			System::Windows::Forms::SendKeys::SendWait(mySendString);
    		}
    		Sleep(1);
    	}
    	return 0;
    }
    And compile it.

    And your good to go... but you've got the basic premise down. I Just wonder if the program will create annoying delays in gameplay. I don't think so however.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  7. #7
    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
    SendWait is pretty much the same as SendKeys::Send, altho I couldn't get ::Send to work on notepad(window does not respond to win32 callbacks error I believe)
    Ah we-a blaze the fyah, make it bun dem!

  8. #8
    ctpsolo's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    252
    Reputation
    10
    Thanks
    37
    My Mood
    Amused
    Quote Originally Posted by ilovecookies View Post
    o_O I have no clue what you're going on about. What's the attachment for? I recon it's something to do with these, "Sendkeys" but wouldn't vk's be simpler? o_o Or would that be many countless lines of code?


    Anyways, i'm still at the same place, I need to figure out if it's possible to copy a string that stored in a variable to the clipboard. If this is possible, then I just need to implement that, a keyboard hook, the actual spam loop, and i'm done.

    Once it's done it should work like this, It prompts you for the message you want spammed, you give it input, it stores that as a string, the string gets copied to the clipboard, then once I get in game, or whereever I need to be to spam, I hit the start spam key(shift) and it will press Enter first, then Ctrl + v at the same time. It will repeat this 10 times, 2 times a second, then take a 90 second rest.


    It's changed a bit since my initial idea.
    Hehe I don't understand what you're going on about either. Why do you need to mess around with copy paste when you can simply send the string or whatever to the CA window? And no you won't need any keyboard hook for this one. But seems like you have got good help already in the thread

  9. #9
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Quote Originally Posted by ctpsolo View Post
    Hehe I don't understand what you're going on about either. Why do you need to mess around with copy paste when you can simply send the string or whatever to the CA window? And no you won't need any keyboard hook for this one. But seems like you have got good help already in the thread
    Well I could send the message straight to the CA window but wouldn't that require me to bypass hackshield since it would actually be interacting with the program? And are you saying that this wouldn't require a keyboard hook and/or would a keyboard hook just not be a good idea? Cause I really only need 1 Hot key, and that's to activate the spammer.

    This project has turned into somewhat of a problem because i'm just not having good luck with google on finding the functions/headers I need.

    I need a function that can copy a stored variable to the clip board so my copy past method will work.

    Hot keys shouldn't be too much of a problem if I don't need the keyboard hook.

    And lastly, I just gotta get the Virtual keycode usage down.


    EDIT! Another stab in the dark, instead of trying to find out how to copy something to the clipboard, since the String will already be stored in the program is there anyway to directly paste that into the window? I think this may be what CTPSolo was talking about.
    Last edited by ilovecookies; 01-19-2010 at 12:09 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  10. #10
    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
    Quote Originally Posted by ilovecookies View Post
    Well I could send the message straight to the CA window but wouldn't that require me to bypass hackshield since it would actually be interacting with the program? And are you saying that this wouldn't require a keyboard hook and/or would a keyboard hook just not be a good idea? Cause I really only need 1 Hot key, and that's to activate the spammer.

    This project has turned into somewhat of a problem because i'm just not having good luck with google on finding the functions/headers I need.

    I need a function that can copy a stored variable to the clip board so my copy past method will work.

    Hot keys shouldn't be too much of a problem if I don't need the keyboard hook.

    And lastly, I just gotta get the Virtual keycode usage down.


    EDIT! Another stab in the dark, instead of trying to find out how to copy something to the clipboard, since the String will already be stored in the program is there anyway to directly paste that into the window? I think this may be what CTPSolo was talking about.
    download my app, extract, compile, spam
    Ah we-a blaze the fyah, make it bun dem!

  11. #11
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by ilovecookies View Post
    OMG! OMG! OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!
    OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!OMG! OMG!

    WHAT DO I DO?!
    Calm down cookies... ur overcomplicating this. Just send the keys. I don't think hackshield would keep you from sending keys because, there might be a case where the game would need to process messages. specifically... WM_DESTROY

    Just use HD's program. compile it and run. Don't worry about hackshield. I don't think it would block something like Windows Msg's. I also don't think it would even mind if you did a global Keyboard hook. If u want to do a Hook however check BA's tut on Global Keyboard Hook. Anyway Send keys should work just fine. So use that.

    And for god's sake chill out. It's just a spammer. Not that big a deal. VB makes spammers all the time. It's equally trivial to us ok.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  12. #12
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    Quote Originally Posted by Hell_Demon View Post
    download my app, extract, compile, spam
    Normally I'd be the first person to do this, but from my time here, I don't want to. o_o Because if I do that, then I have no clue how it helped me, or why it worked. I actually wanna work this stuff out. BUT! If you'd like to comment your program so I can get some info from it i'll gladly include ya in the credits once I finish it (if I finish it.)

    I don't wanna seem ungrateful or whatever, I just don't wanna copy paste ANYTHING.

    @Why06 o_o Year i'm freaking out over this cause this will be basically my first actual program (hello world and other test programs don't count). I've been trying to find something simple enough, yet at the same time it would actually be of use.

    AND! throughout trying to find stuff to complete my project, i've found that VB would have been an all around better language to do this program. <_< But i'm not a fag, and I wanna finish this the right way.

    But back on the programming note, i'll look into sendkeys, but the keys aren't really the issue at this point. I need to find out how to use the windows clipboard, and if I can even copy a stored string to it.


    EDIT! Due to my panties being in a bunch, I broke my own rule, READ THE ENTIRE THREAD, and missed some stuff. sendkeys is PERFECT for what I need to do, so no keyboard hook required. Now still the matter of copying a stored string to the clipboard.
    Last edited by ilovecookies; 01-19-2010 at 02:24 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









  13. #13
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Well, I know I've posted this before but it seems the thread got deleted for some reason.

    [php]#include <windows.h>

    char* text = "Clipboard";

    int main()
    {
    OpenClipboard(NULL);

    EmptyClipboard();

    HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE,strlen(text)+1);

    LPTSTR textPointer = (LPTSTR)GlobalLock(hMem);

    memcpy(textPointer,text,strlen(text)+1);

    GlobalUnlock(hMem);

    Se***ipboardData(CF_TEXT,hMem);

    CloseClipboard();
    }
    [/php]

    More information on the clipboard.

    Using the Clipboard

    I'm not sure if that's what you want.

  14. The Following User Says Thank You to Void For This Useful Post:

    why06 (01-19-2010)

  15. #14
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by ilovecookies View Post
    @Why06 o_o
    But back on the programming note, i'll look into sendkeys, but the keys aren't really the issue at this point. I need to find out how to use the windows clipboard, and if I can even copy a stored string to it.
    I'll help you out, because ur so stressed ur starting to stress me out.

    Code:
    int main()
    {
        char* spamMe = "Spam text in here";
        Se***ipboardTextA(test);
        return 0;
    }
    That's it. And that will set ur text into the clipboard. It's a good idea. Very creative. Now You just have to send this paste key combination to CA.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  16. #15
    ilovecookies's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    In the C++ Section
    Posts
    321
    Reputation
    10
    Thanks
    67
    My Mood
    Shocked
    -_- Well all of my points are out the window.

    [php]#include <iostream>
    #include <windows.h>

    using namespace std;

    char* message;

    int main()
    {
    cout<<"Please input the message you wish to be spammed: " << endl;
    getline(cin, message);
    cout<<message<<endl;
    system("pause");
    char* spamMe = message;
    Se***ipboardTextA(test);
    return 0;
    }

    [/php]


    Won't compile, don't know why. Here's the errors. (this is what I get for copy pasting.)

    C:\Documents and Settings\iLoveCookies\Desktop\main.cpp In function `int main()':

    12 C:\Documents and Settings\Michael Roach\Desktop\main.cpp no matching function for call to `getline(std::istream&, char*&)'

    16 C:\Documents and Settings\Michael Roach\Desktop\main.cpp `Se' undeclared (first use this function)

    16 C:\Documents and Settings\Michael Roach\Desktop\main.cpp `test' undeclared (first use this function)

    16 C:\Documents and Settings\Michael Roach\Desktop\main.cpp `ipboardTextA' undeclared (first use this function)

    EDIT! My own two cents here, I don't think the getline function can handle pointers?
    Last edited by ilovecookies; 01-19-2010 at 02:45 PM.
    Quote Originally Posted by Jules Winnfield View Post
    I am the tyranny of evil men, and you are all the weak. But i'm trying Ringo,i'm trying real hard, to become the shepherd.
    excuse me miss, would you kindly reflect some photons off the epidermis covering your sternum directly into the camera iris or vacate the proximity immediately
    [IMG]https://i882.photobucke*****m/albums/ac23/miki_d420/RealizingYoureALeecher2copy.jpg[/IMG]









Page 1 of 3 123 LastLast

Similar Threads

  1. Making my first VB project!
    By melias16 in forum General
    Replies: 21
    Last Post: 09-05-2011, 06:43 PM
  2. Project Blackout - First Look
    By Flash in forum Piercing Blow Discussions
    Replies: 9
    Last Post: 02-10-2011, 12:30 PM
  3. My first VB project ever
    By Mad Mike in forum Visual Basic Programming
    Replies: 20
    Last Post: 07-07-2010, 08:24 AM
  4. * Looking to start making mods*
    By ~G36E~ in forum Combat Arms Mod Discussion
    Replies: 4
    Last Post: 02-24-2010, 11:00 AM
  5. First PS Project. :)
    By 1ups in forum Showroom
    Replies: 13
    Last Post: 02-09-2010, 10:18 PM