Hi everyone, Im new on AHK and learning I'm looking for a very basic bot. I know Im asking for a full code, but its pretty simple, once I understand how its done I will be able to do it more complex or change it at will.
I tryed to do it myself but first I cant make it start deactivated, second Im not able to press the key but send it (it "write" the letters)
What I want to do the bot its the next:
The script start deactivated and use a key to initiate and the same key to pause
D, D, D, D, D, A, A, A (repeat) (250ms between keys)
Click, wait 1 sec, Click (repeat every 5 sec)
The clicks on screen coordinates.
Clicks and Keys work at the same time, not in order.
Thank you in advance.
Simple "BOT" Script, need full code.
Re: Simple "BOT" Script, need full code.
Hallo,
if you are in an editor window and press a key, you will write the key!
Try:
if you are in an editor window and press a key, you will write the key!
Try:
Code: Select all
CoordMode, Mouse, Screen
Counter = 0
Return ;End of Auto-execute Section
F4:: ;On/Off with key F4
If F4Active:=!F4Active
{
Keys = dddddaaa
SetTimer Keys, 250
SetTimer Clicks, 5000
}
Else
{
SetTimer Keys, Off
SetTimer Clicks, Off
}
Return
Keys:
Counter := Mod(Counter,StrLen(Keys))+1
Send, % SubStr(Keys,Counter,1)
Return
Clicks:
Click
Sleep, 1000
Click
Return
Re: Simple "BOT" Script, need full code.
Almost there, you did exactly what I asked for but I was wrong, instead of sending dddddaaa I need something like:
But adapted to the previous scrip, I tryed to do tha with "keys" but its a label and doesn't work that way. (writed the whole thing instead)
Thank you.
Code: Select all
Loop
Send, {d down}
Sleep, ;d time
Send, {d up}
Send, {a down}
Sleep, ;a time
Send, {a up}
Thank you.