Why Dont Work? [C#]

Posts 1–15 of 16 · Page 1 of 2
Why Dont Work? [C#]
This is my TEST spammer's code... The problem, that it is dont work...

The program is running, cant see it ( what i want) but dont spam the text

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    static class Program
    {
        /// <summary>
        /// </summary>
        [STAThread]
        static void Main(string[] spamtext)
        {
            do{
            for (int i = 0; i<spamtext.Length; i++)
            {
                SendKeys.Send("a");
            }
            }while(true);
        }
    }
}
The do..While need for the testing only...
This isnt the full code...
What should do:
-spamming the text in the running parameter...
Code:
Like this::
spammer.exe -text
text
text
text
text
text
text
text
...
@rabir007 Why dont you try with an infinite loop?
Like
Code:
while(1) or for(;;)
I am not sure if that is possible in C# but I assume so because in C# there is also for(int blabla)
Quote Originally Posted by A$IAN View Post
@rabir007 Why dont you try with an infinite loop?
Like
Code:
while(1) or for(;;)
I am not sure if that is possible in C# but I assume so because in C# there is also for(int blabla)
He already has

Code:
do{
}while(true);
He runs the code, and repeats it till while(true) returns false.
But why are you doing a do while loop that alway's return's true?

But what is not correct? I can't see your problem.

Btw, what does spamtext.Length return?
@A$IAN

Not the loop is the problem, the loop is working, the problem, that it isnt do the Sendkeys.Send command, and i dont know, why dont do it...
Sorry, then I dont know how to solve it. I dont know much about C#
Good luck though
@Brimir

The infinity loop only need for testing...
the "spamtext" is the running parameter of the .exe...

spammer.exe -[spamtext]
But what does spamtext.Length return? That way you can know if he enters the for loop. Maby spamtext.Length is not valid. Becouse of the L. Btw, I don't know mutch about c#. But I know all types are an object so you can get the lengt.
You can't send keys to crossfire, it won't let you. I read somewhere on google that you need to hook the function ingame and call it to do what you want.
Now I know what you mean. its easy in c++ with an dll

There are codes for c++ on the internet:
SendKeys in C++ - CodeProject®

Why do you want to use c# for this?
Quote Originally Posted by Brimir View Post
Now I know what you mean. its easy in c++ with an dll

There are codes for c++ on the internet:
SendKeys in C++ - CodeProject®

Why do you want to use c# for this?
You can't do this in crossfire. Yes it will normally work, but crossfire blocks it.
I made a working loop, you need to be creative.
Quote Originally Posted by Brimir View Post
I made a working loop, you need to be creative.
have made one too, i was just telling you that the obvious approach doesn't work cuz the op thinks that's what you said.

---------- Post added at 07:50 PM ---------- Previous post was at 07:41 PM ----------

Quote Originally Posted by rabir007 View Post
And, if i save it in a DLL, and put sxs.dll in Crossfire folder?
@258456
I think cf now detects sxs.dll. So you need an injector.
@Brimir ... C# dont need 'return" for for loop... Anyway:
The loop is work correctly, but dont spam the "a" key...
Maybe yes, the spamtext.Length isnt correct, i will see, how to solve...
Do you mean that you can't make an inf loop in c++?
You can
And, if i save it in a DLL, and put sxs.dll in Crossfire folder?
@258456
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us