Please help me with this code!1 I would greatly appreciate it!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ZOMBYSPIDER
Posts: 27
Joined: 10 Feb 2018, 01:13

Please help me with this code!1 I would greatly appreciate it!

23 May 2018, 02:21

Could someone please make this code for me? I would greatly appreciate it! Here is the info:


I want this code to repeat infinitely (start when I press L and stop when I press L again).
I also want each move movement to take a specific amount of time that would make it look like an actual person is doing it and not have it finish the script in like a second.


MM = mouse move
C = left click
W = wait / sleep
Code Info
MM) 1041,799
C) 1041, 799
MM) 1185, 689
C) 1185,689
MM) 1301, 606
C) 1301, 606
MM) 1403, 532
C) 1403, 532
MM) 1190, 383
C) 1190, 383
MM) 1040, 855
C) 1040, 855
MM) 1301, 467
C)1301, 467
MM) 1040, 855
C) 1040, 855
MM) 194, 707
C) 194, 707
MM) 1040, 855
C)1040,855
MM) 543, 668
C) 543, 668
MM) 1040, 855
C) 1040, 855
MM) 577, 637
C) 577, 637
MM) 1040, 855
C) 1040, 855
MM) 610, 607
C) 610, 607
MM) 1040, 855
C) 1040, 855
MM) 1107, 646
C) 1107, 646
MM) 1040, 855
C) 1040, 855
W) 70 minutes
MM) 957, 615
C) 957, 615
W) 1 minute

Thanks a lot if you helped me with this code!
Last edited by ZOMBYSPIDER on 23 May 2018, 04:24, edited 1 time in total.
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Please help me with this bot! I would greatly appreciate it!

23 May 2018, 03:23

Hallo,
try:

Code: Select all

#SingleInstance Force
#NoEnv
CoordMode, Mouse ,Screen
CoordMode, Pixel ,Screen
*l:: ;On/Off with key L
    If Bot := !Bot
        SetTimer Bot, -100
    Else
        Reload
Return
Bot:
Loop
{
	Random, Ran, 3, 10
	MouseMove, 1041,799, %Ran%
	Click, 1041, 799
	Random, Ran, 3, 10
	MouseMove, 1185, 689, %Ran%
	Click, 1185,689
	;...
	Sleep, % 70*60000 ;W) 70 minutes
	Random, Ran, 3, 10
	MouseMove, 957, 615, %Ran%
	Click, 957, 615
	Sleep, 60000 ;W) 1 minute
}
Return
ZOMBYSPIDER
Posts: 27
Joined: 10 Feb 2018, 01:13

Re: Please help me with this bot! I would greatly appreciate it!

23 May 2018, 03:45

Rohwedder wrote:Hallo,
try:

Code: Select all

#SingleInstance Force
#NoEnv
CoordMode, Mouse ,Screen
CoordMode, Pixel ,Screen
*l:: ;On/Off with key L
    If Bot := !Bot
        SetTimer Bot, -100
    Else
        Reload
Return
Bot:
Loop
{
	Random, Ran, 3, 10
	MouseMove, 1041,799, %Ran%
	Click, 1041, 799
	Random, Ran, 3, 10
	MouseMove, 1185, 689, %Ran%
	Click, 1185,689
	;...
	Sleep, % 70*60000 ;W) 70 minutes
	Random, Ran, 3, 10
	MouseMove, 957, 615, %Ran%
	Click, 957, 615
	Sleep, 60000 ;W) 1 minute
}
Return
@Rohwedder that doesn't work, I just want it to click on the positions and do what I said above thanks!
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: please help me I really need it

23 May 2018, 04:51

You have the code structured just fine. I do encourage you to read over the documentation. And look over these couple posts that give you instructions on setting up an "autofire", even though yours is more complex.

(Note: The first link is from the old forums, the second link is on these forums) http://www.autohotkey.com/board/topic/6 ... re-thread/ or https://autohotkey.com/boards/viewtopic.php?f=7&t=11952

Using the above links, you'll start out your code with a hotkey l:: for turning on and off this script.

These are all the commands you need:

Loop (and Blocks) ; However, you may be interested instead of Loop to use SetTimer because of that 70 minute wait.
CoordMode (for the next two commands)
MouseMove
Click
Sleep ; this works in Milliseconds, 1 minute is 60 seconds or 60000 milliseconds
ZOMBYSPIDER
Posts: 27
Joined: 10 Feb 2018, 01:13

Re: please help me I really need it

23 May 2018, 04:58

Exaskryz wrote:You have the code structured just fine. I do encourage you to read over the documentation. And look over these couple posts that give you instructions on setting up an "autofire", even though yours is more complex.

(Note: The first link is from the old forums, the second link is on these forums) http://www.autohotkey.com/board/topic/6 ... re-thread/ or https://autohotkey.com/boards/viewtopic.php?f=7&t=11952

Using the above links, you'll start out your code with a hotkey l:: for turning on and off this script.

These are all the commands you need:

Loop (and Blocks) ; However, you may be interested instead of Loop to use SetTimer because of that 70 minute wait.
CoordMode (for the next two commands)
MouseMove
Click
Sleep ; this works in Milliseconds, 1 minute is 60 seconds or 60000 milliseconds
I don't get what you mean, could you write out the script please?
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Please help me with this code!1 I would greatly appreciate it!

23 May 2018, 05:52

Hallo,
first add the missing MM = mouse move and C = left click
and then start the bot in a Notepad window. If it works in Notepad, try it with your game.
Read: https://autohotkey.com/docs/Tutorial.htm#s31
Guest

Re: please help me I really need it

23 May 2018, 06:38

@ZOMBYSPIDER what Exaskryz means to say is that YOU HAVE ALREADY WRITTEN YOUR SCRIPT. All you need to do is replace your "SHORTHAND CODES":

MM = mouse move
C = left click
W = wait / sleep

with the correct command. Exaskryz gave you the links.

Just take your "script" and literally replace "MM)" with "MouseMove" and that is a working command. Same goes for "C" and "W".

Given that it is so easy I doubt anyone will take the trouble of writing the script for you unless you've shown some effort.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, filipemb, Rohwedder and 299 guests