Jump to content

Add Hotkeys to This text spammer?


eliteapu
 Share

Recommended Posts

Hey, I found a source for a text spammer that works quite well in Battlefield2. My question is, could somebody edit it for me so that it works on hotkey instead of a timer...?

Heres exactly what I want changed...

Have a Hotkey/Timer Button switch (toggle from using hotkeys to timer spamming)

Hotkeys should be as follows::

NumPad 1 =Line1 of text spam

NumPad 2 =Line2 of text spam

ect ect.. through numpad 9

Still allow/keep 1-6 inputs lines of text

Fix any errors/Optimize the script where you feel it needs it...

and keep mostly everything else the same...

So, heres the source...

GuiCreate("aPu's Text Spammer", 365, 255,-1, -1 , $WS_POPUPWINDOW)
$label0=GUICtrlCreateLabel("V 1.1",10,2,40,20);;;;;;;;;;;;;;;;;;;
GUICtrlSetColor(-1,0xFFFF99)
$label9=GUICtrlCreateLabel("Updated",150,2,60,20)
$label9=GUICtrlCreateLabel("Nov 22,06",250,2,50,20)
GUICtrlSetColor(-1,0xFFFF99)
$label1=GuiCtrlCreateLabel("Line 1", 10, 20, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$label2=GuiCtrlCreateLabel("Line 2", 10, 50, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$label3=GuiCtrlCreateLabel("Line 3", 10, 80, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$label4=GuiCtrlCreateLabel("Line 4", 10, 110, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$label5=GuiCtrlCreateLabel("Line 5", 10, 140, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$label6=GuiCtrlCreateLabel("Line 6", 10, 170, 50, 20)
GUICtrlSetColor(-1,0xFFFF99)
$group=GuiCtrlCreateLabel("aPu's Text Spammer", 110, 2, 100, 20)
$label7=GuiCtrlCreateLabel("Interval (ms)", 10, 195, 60, 15)
$label8=GuiCtrlCreateLabel("Prefix", 230, 198, 50, 20)
$btnclose=GUICtrlCreatePic(@ProgramsDir & "\RTS\BEN.jpg",361-18,2,16,16)
$btnminimize=GUICtrlCreatePic(@ProgramsDir & "\RTS\BMN.jpg",361-36,2,16,16)
;;;;;;;;;;;;;;;;;;;;;;;VARIABLES;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Input1 = GuiCtrlCreateInput("", 70, 20, 280, 20)
$Input2 = GuiCtrlCreateInput("", 70, 50, 280, 20)
$Input3 = GuiCtrlCreateInput("", 70, 80, 280, 20)
$Input4 = GuiCtrlCreateInput("", 70, 110, 280, 20)
$Input5 = GuiCtrlCreateInput("", 70, 140, 280, 20)
$Input6 = GuiCtrlCreateInput("", 70, 170, 280, 20)
$InputDelay = GuiCtrlCreateInput("2500", 10, 210, 58, 20, $ES_NUMBER)
GUICtrlSetTip(-1,"Delay between each message in milliseconds (1000 = 1 second)")
$InputRepeat = GuiCtrlCreateCheckbox("Repeat Once", 130, 195, 90, 20)
GUICtrlSetTip(-1,"Each line will be displayed twice")
$InputRandom = GuiCtrlCreateCheckbox("Random Order", 130, 212, 90, 20)
GUICtrlSetTip(-1,"Lines will appear in random order")
$InputPrefix = GuiCtrlCreateCombo("None", 220, 212, 50, 20)
GUICtrlSetData(-1,"Enter|J|K|L|T|~")
$InputType = GuiCtrlCreateRadio("Type", 70, 195, 60, 20)
GUICtrlSetTip(-1,"Text will be typed automatically")
$InputPaste = GuiCtrlCreateRadio("Paste", 70, 212, 60, 20)
GUICtrlSetTip(-1,"Text will be copied and pasted")
$InputStart = GuiCtrlCreateButton("Start", 275, 195, 75, 40)
GUICtrlSetTip(-1,"Begins spamming after a small delay to select your windo")
$PlayOn = 0
$RandomOn = 4
$RepeatOn = 4
$Method = "Type"
$Waiting = 0
$Wait = 0
$Delay = 2500
$Next = ""
$LineVal = ""
$Current = 0
$Step = 0
$InitEnable = 0
$i = 0
$coord = 0
$RandomOrder = "012345"
$RandomCurrent = "0"
$RandomUsed = ""
Dim $LineVal[6]
;;;;;;;;;;;;;;;;;;;;;;;SETUP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GUICtrlSetLimit($Input1,60)
GUICtrlSetLimit($Input2,60)
GUICtrlSetLimit($Input3,60)
GUICtrlSetLimit($Input4,60)
GUICtrlSetLimit($Input5,60)
GUICtrlSetLimit($Input6,60)
GUICtrlSetState($InputType,$GUI_CHECKED)
;;;;;;;;;;;;;;;;;;;;;;;COLORS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GUISetBKColor(0x3300FF)
;;;;;;;;;;;;;;;;;;;;;;;ACTIONS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GuiSetState()
SoundPlay(@ProgramsDir & "\RTS\SRT.wav")
While 1
    $msg = GuiGetMsg()
    If $msg = $InputStart And $Waiting = 0 Then 
        If $PlayOn = 1 Then 
            $PlayOn = 0 
            GUICtrlSetData($InputStart,"Start")
            GUICtrlSetState($Input1,$GUI_ENABLE)
            GUICtrlSetState($Input2,$GUI_ENABLE)
            GUICtrlSetState($Input3,$GUI_ENABLE)
            GUICtrlSetState($Input4,$GUI_ENABLE)
            GUICtrlSetState($Input5,$GUI_ENABLE)
            GUICtrlSetState($Input6,$GUI_ENABLE)
            GUICtrlSetState($InputDelay,$GUI_ENABLE)
            GUICtrlSetState($InputRepeat,$GUI_ENABLE)
            GUICtrlSetState($InputRandom,$GUI_ENABLE)
            GUICtrlSetState($InputType,$GUI_ENABLE)
            GUICtrlSetState($InputPaste,$GUI_ENABLE)
            GUICtrlSetState($InputPrefix,$GUI_ENABLE)
            GUICtrlSetState($label8,$GUI_ENABLE)
            GUICtrlSetState($InputStart,$GUI_DISABLE)
            Sleep(1200)
            GUICtrlSetState($InputStart,$GUI_ENABLE)
        Else
            Starting()
        Endif
    Endif
        If $Waiting = 1 Then
            $RandomOrder = Random(0,5)
            Sleep(20)
            $Wait = $Wait - 20
            GUICtrlSetData($InputStart,"(" & $Wait & ") Starting")
            If $Wait = 0 Or $Wait < 0 Then
                GUICtrlSetData($InputStart,"Stop")
                $Waiting = 0
                $Next = $LineVal[0]
                GUICtrlSetState($InputStart,$GUI_ENABLE)
            Endif
        Endif
    If $PlayOn = 0 Then 
        If $msg = $InputType Then $Method = "Type"
        If $msg = $InputPaste Then $Method = "Paste"
        If $msg = $Input1 Then $LineVal[0] = GUICtrlRead($Input1)
        If $msg = $Input2 Then $LineVal[1] = GUICtrlRead($Input2)
        If $msg = $Input3 Then $LineVal[2] = GUICtrlRead($Input3)
        If $msg = $Input4 Then $LineVal[3] = GUICtrlRead($Input4)
        If $msg = $Input5 Then $LineVal[4] = GUICtrlRead($Input5)
        If $msg = $Input6 Then $LineVal[5] = GUICtrlRead($Input6)
        If $msg = $InputDelay Then $Delay = GUICtrlRead($InputDelay)
        If $msg = $InputRandom Then $RandomOn = GUICtrlRead($InputRandom)
        If $msg = $InputRepeat Then $RepeatOn = GUICtrlRead($InputRepeat)
    Endif
    If $Waiting = 0 Then
        If $PlayOn = 1 Then
            If $RandomOn = 1 Then
                If $RepeatOn = 1 Then
                    If $Step = 0 Then
                        $Step = 1
                        $Next = $Next
                    Else
                        $Step = 0
                        $Next = $LineVal[Random(0,5)]
                        $InitEnable = 1
                    EndIf
                Else
                $Next = $LineVal[Random(0,5)]
                $InitEnable = 1
                EndIf
            Else
                If $RepeatOn = 1 Then
                    If $Step = 0 Then
                        $Step = 1
                    Else
                        $Step = 0
                        $Next = $LineVal[$Current]
                        $InitEnable = 1
                        $Current = $Current + 1
                        If $Current = 6 Then $Current = 0
                    EndIf
                Else
                $Next = $LineVal[$Current]
                $InitEnable = 1
                $Current = $Current + 1
                If $Current = 6 Then $Current = 0
                EndIf
            Endif
            If $InitEnable = 1 And $Next <> "0" And WinActive("aPu's Text Spammer") = 0 Then
                If GUICtrlRead($InputPrefix) = "Enter" Then Send("{ENTER}")
                If GUICtrlRead($InputPrefix) = "J" Then Send("{J}")
                If GUICtrlRead($InputPrefix) = "K" Then Send("{K}")
                If GUICtrlRead($InputPrefix) = "L" Then Send("{L}")
                If GUICtrlRead($InputPrefix) = "T" Then Send("{T}")
                If GUICtrlRead($InputPrefix) = "~" Then Send("{~}")
                If $Method = "Paste" Then
                    $TempClip = ClipGet()
                    ClipPut($Next)
                    Send("{CTRLDOWN}")
                    Send("{v}")
                    Send("{CTRLUP}")
                    Send("{Enter}")
                    ClipPut($TempClip)
                    Sleep($Delay)
                Endif
                If $Method = "Type" Then
                    For $i=0 to StringLen($Next)
                        Send(StringMid($Next,$i,1), 1)
                    Next
                    Send("{ENTER}")
                    Sleep($Delay)
                Endif
            Endif
        Endif
    Endif
    
    
    $Mouse=MouseGetPos()
    $Window=WinGetPos("aPu's Text Spammer")
    Dim $coord[2]
    $coord[0] = $Mouse[0] - $Window[0]
    $coord[1] = $Mouse[1] - $Window[1]
;Minimize
    If $coord[0] > 326 AND $coord[1] > 3 AND $coord[0] < 341 AND $coord[1] < 18 Then 
        GUICtrlSetImage($btnminimize,@ProgramsDir & "\RTS\BMH.jpg")
    Else
        GUICtrlSetImage($btnminimize,@ProgramsDir & "\RTS\BMN.jpg")
    Endif
;Exit
    If $coord[0] > 346 AND $coord[1] > 3 AND $coord[0] < 359 AND $coord[1] < 18 Then  
        GUICtrlSetImage($btnclose,@ProgramsDir & "\RTS\BEH.jpg")
    Else
        GUICtrlSetImage($btnclose,@ProgramsDir & "\RTS\BEN.jpg")
    Endif
    
    
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If $msg = $btnclose Then 
        GUICtrlSetImage($btnclose,@ProgramsDir & "\RTS\BEC.jpg")
        Sleep(100)
        GUICtrlSetImage($btnclose,@ProgramsDir & "\RTS\BEN.jpg")
        Sleep(100)
        GUISetState(@SW_HIDE)
        SoundPlay(@ProgramsDir & "\RTS\EXI.wav")
        Sleep(500)
        Exit
    EndIf
    If $msg = $GUI_EVENT_RESTORE Then SoundPlay(@ProgramsDir & "\RTS\RES.wav")
    If $msg = $btnminimize Then 
        SoundPlay(@ProgramsDir & "\RTS\MIN.wav")
        GUICtrlSetImage($btnminimize,@ProgramsDir & "\RTS\BMC.jpg")
        Sleep(100)
        GUICtrlSetImage($btnminimize,@ProgramsDir & "\RTS\BMN.jpg")
        Sleep(100)
        GUISetState(@SW_MINIMIZE)
    EndIf
    
    
WEnd    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Func  Starting()
    $test = msgbox(1,"Begin","Are You Sure You Want To Start Spamming?")
    If $test = 1 Then
        $Waiting = 1
        $PlayOn = 1
        GUICtrlSetData($InputStart,"(2500) Starting")
        GUICtrlSetState($InputStart,$GUI_DISABLE)
        $Wait = 2500
        GUICtrlSetState($Input1,$GUI_DISABLE)
        GUICtrlSetState($Input2,$GUI_DISABLE)
        GUICtrlSetState($InputPrefix,$GUI_DISABLE)
        GUICtrlSetState($label8,$GUI_DISABLE)
        GUICtrlSetState($Input3,$GUI_DISABLE)
        GUICtrlSetState($Input4,$GUI_DISABLE)
        GUICtrlSetState($Input5,$GUI_DISABLE)
        GUICtrlSetState($Input6,$GUI_DISABLE)
        GUICtrlSetState($InputDelay,$GUI_DISABLE)
        GUICtrlSetState($InputRepeat,$GUI_DISABLE)
        GUICtrlSetState($InputRandom,$GUI_DISABLE)
        GUICtrlSetState($InputType,$GUI_DISABLE)
        GUICtrlSetState($InputPaste,$GUI_DISABLE)
    Endif
Endfunc

To anyone who helps out if I approve the fixes/changed I can give you some sort of reward for your services..

Please PM me with finished script and i will pm you back with your PRIZE info

Link to comment
Share on other sites

To anyone who helps out if I approve the fixes/changed I can give you some sort of reward for your services..

Just to make sure I understand. You don't know how to make the changes, you want someone else to make the changes for you and when they are done, you need to approve the changes? If you don't know how to make the changes how are you going to know if the changes have been done correctly so you can 'approve' the changes...?

I seriously dobt you are going to get any (slaves) help on this project. Good luck though.

A little reading goes a long way. Post count means nothing.

Link to comment
Share on other sites

Just to make sure I understand. You don't know how to make the changes, you want someone else to make the changes for you and when they are done, you need to approve the changes? If you don't know how to make the changes how are you going to know if the changes have been done correctly so you can 'approve' the changes...?

I seriously dobt you are going to get any (slaves) help on this project. Good luck though.

LOL...no approve as in i just want to make sure you/someone does it right, and its not a slave if i pay them... :lmao:

EDIT: ALSO, iam not completely dumb on this sort of topic, i can do somethings, and i can do this things (minus the gui) in autohotkey, but as we all know, its just not as good and incomparable...

And please, anyone reading, note that as i said, you WILL BE REWARDED IF THE SCRIPT WORKS AFTER I COMPILE IT...weither it be money or other, i will reward you... ;) thanks for reading

Edited by eliteapu
Link to comment
Share on other sites

  • Moderators

LOL...no approve as in i just want to make sure you/someone does it right, and its not a slave if i pay them... :lmao:

EDIT: ALSO, iam not completely dumb on this sort of topic, i can do somethings, and i can do this things (minus the gui) in autohotkey, but as we all know, its just not as good and incomparable...

And please, anyone reading, note that as i said, you WILL BE REWARDED IF THE SCRIPT WORKS AFTER I COMPILE IT...weither it be money or other, i will reward you... ;) thanks for reading

What a loop...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

And please, anyone reading, note that as i said, you WILL BE REWARDED IF THE SCRIPT WORKS AFTER I COMPILE IT...weither it be money or other, i will reward you... :lmao: thanks for reading

Red- http://www.rentacoder.com

Blue- Meet me in West Virginia at 375 Mulberry Lane at 6:00 PM sharp next Thurs. :evil::mad: I'll get your code working after you make a "deposit" :o:D

;)

Edited by Paulie
Link to comment
Share on other sites

LOL...no approve as in i just want to make sure you/someone does it right

Just to belabor a deceased equine. Once again, if you don't know the language how do you know if someone has done it correctly?

A little reading goes a long way. Post count means nothing.

Link to comment
Share on other sites

Are you capable of playing the game?

I mean all I had to do was open the help file and enter hot in the index sidebar. :lmao:

You probably spent more time writing your posts here than you would fixing the script. ;)

Link to comment
Share on other sites

You need to know how to edit the script to edit the script though =)

Im suprised you found me lol, im wondering where you downloaded this old script though i dont remember uploading anywhere

Im still working on it, remaking it again xD

third times the charm!

Link to comment
Share on other sites

:lmao: see, least someone is helping me, and everyone else IS A FUCKING ASSHOLE!

but yeah, i googled "text spammer" +bf2 or something similar and you put it on a site you put your 'tick tack toe' game :evil:

I think that you would do well to mind your language ;)


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

;) see, least someone is helping me, and everyone else IS A FUCKING ASSHOLE!

but yeah, i googled "text spammer" +bf2 or something similar and you put it on a site you put your 'tick tack toe' game :lmao:

I think most of us would rather be an asshole than a dumbass. Not that I'm calling you a dumbass or anything... dumbass.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...