How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Ask gaming related questions (AHK v1.1 and older)
Cheater
Posts: 6
Joined: 09 Feb 2016, 08:08

How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by Cheater » 07 Sep 2020, 05:46

It needs to type 0000, then 3 seconds later 0001, but the previous number needs to be removed or edited to the next bigger one.

gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by gregster » 07 Sep 2020, 05:51

Sounds like brute-force, not good - even if it's for a game, it's cheating - although trivial in this case.
I am sure you can do it yourself, if you try. Don't pull the AHK forums into it.

Cheater
Posts: 6
Joined: 09 Feb 2016, 08:08

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by Cheater » 07 Sep 2020, 05:56

gregster wrote:
07 Sep 2020, 05:51
Sounds like brute-force, not good - even if it's for a game, it's cheating - although trivial in this case.
I am sure you can do it yourself, if you try. Don't pull the AHK forums into it.
Wtf really? I cheated on runescape with a script that I made in 2016 with ahk, why is that not allowed? I thought it was fine...

gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by gregster » 07 Sep 2020, 06:02

Well, this is a support forum, not make-me-a-script.
If you are not motivated to work yourself with AHK, where's the fun in cheating? Is there no cheater's pride to - at least - do basic things yourself ? Imagine the bragging rights... :shock: ;)

Btw, gaming requests belong in the 'Gaming' subforum (yours has been moved now, but that wasn't fully clear from your initial post in the general 'Ask For Help' forum).
I'll leave the topic open for its triviality (re brute-force approach) - if another team member wants to overrule, please feel free. But I imagine that one can find similar things with a forum search.

User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by Xtra » 07 Sep 2020, 11:35

Hint: this has been posted and done many times before search for it. (old forum too)

Have fun

ibsplayz223
Posts: 49
Joined: 02 Sep 2020, 21:54

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by ibsplayz223 » 07 Sep 2020, 12:21

Code: Select all

y=9999
x=0000
loop{
sleep, 300
send, %x%{enter}
if (y>x)
x :=x+1
Kind of works, I'm still working on it.

ibsplayz223
Posts: 49
Joined: 02 Sep 2020, 21:54

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by ibsplayz223 » 07 Sep 2020, 12:46

Code: Select all

thing1=10
thing2=100
thing3=1000
y=9999
x=0000
loop{
x :=x+1
sleep, 3000
if (thing1>x)
send, 000%x%{enter}
else if (thing2>x)
send, 00%x%{enter}
else if (thing3>x)
send, 0%x%{enter}
else if (x>1000)
send, %x%{enter}
else if (x>y)
exitapp
}

esc::exitapp
This should work, press esc to cancel script if needed.

User avatar
Yakshongas
Posts: 590
Joined: 21 Jan 2020, 08:41

Re: How to make a script, that keeps typing 0000 - 9999 with a delay of 3 second between each number?

Post by Yakshongas » 07 Sep 2020, 15:58

Code: Select all

Num := 0 

F1::
Loop
{
    If Num between 0 and 9
    {
        Send, % "000" . Num
    }
    Else If Num between 10 and 99
    {
        Send, % "00" . Num
    }
    Else If Num between 100 and 999
    {
        Send, % "0" . Num
    }
    Else If Num between 1000 and 9999
    {
        Send, % Num
    }
    Num++
    Sleep, 3000
    Send, {BackSpace 4}
}
Return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹

Post Reply

Return to “Gaming Help (v1)”