how do i add a click script per minute?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
xMrDean
Posts: 5
Joined: 20 Aug 2017, 13:46

how do i add a click script per minute?

21 Aug 2017, 05:09

Hello ive trouble to adding a click script per minute at a specific point.
I tried alot of stuff but nothing seems to be working.
the script should be working as the f5 in a specific program
so i want to be surfing the internet while the clicking happens in click raid

this is my script:

Code: Select all

#MaxThreadsPerHotKey 2

F7::
	Toggle := !Toggle
	While Toggle {
		ControlSend, , {F5}, ahk_exe ClickRaid.exe
		Sleep 0
	}
Return

#MaxThreadsPerHotKey 1
I want a leftclick per minute at: absolute: -944, 783 or relative: 984, 791 or client: 976, 760 = dont know wich one to use and in what order
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

Re: how do i add a click script per minute?

21 Aug 2017, 07:23

For doing something every X - see SetTimer.
For clicking see Click and ControlClick. There was something tricky about ControlClick at given coords - I don't remember what was it, but I am unsure if it was doable.
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
obeeb
Posts: 140
Joined: 20 Feb 2014, 19:15

Re: how do i add a click script per minute?

21 Aug 2017, 09:33

Try to use ControlClick, x984 y791, ahk_exe ClickRaid.exe you should use relative coordinates with ControlClick. If you want it to happen every minute you need to Sleep for 60000 or use SetTimer for the same amount of time.
xMrDean
Posts: 5
Joined: 20 Aug 2017, 13:46

Re: how do i add a click script per minute?

21 Aug 2017, 10:07

I have this but it doesnt seem to work?

#MaxThreadsPerHotKey 2

F7::
Toggle := !Toggle
While Toggle {
ControlSend, , {F5}, ahk_exe ClickRaid.exe
Sleep 0
}
{
ControlClick, x984 y791, ahk_exe ClickRaid.exe
Sleep 60000
}
Return

#MaxThreadsPerHotKey 1
obeeb
Posts: 140
Joined: 20 Feb 2014, 19:15

Re: how do i add a click script per minute?

21 Aug 2017, 10:23

Of course it doesn't work. Please read https://autohotkey.com/docs/Tutorial.htm https://autohotkey.com/docs/commands/Block.htm https://autohotkey.com/docs/commands/While.htm
I'm not going to continue to write code for you, you need to learn at least the basics of Autohotkey.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: vysmaty and 181 guests