Delete this please

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
imageclicks
Posts: 4
Joined: 16 Jun 2021, 18:36

Delete this please

16 Jun 2021, 19:10

Delete this please
Last edited by imageclicks on 19 Jun 2021, 22:45, edited 1 time in total.
Rohwedder
Posts: 7626
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Script randomly starts clicking at edge of window/screen

17 Jun 2021, 01:54

Hallo,
try (untested):

Code: Select all

; <COMPILER: v1.1.32.00>
#SingleInstance, Force
#Persistent
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
InputBox, delay,,Enter the delay between each check click.
f1::
Loop
{
	ImageSearch,x4,y4,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
	if(ErrorLevel == 0)
	{
		MouseMove,%x4%,%y4%,0
		sleep, 10
		Click
		sleep, 500
	}
	ImageSearch,x1,y1,0,0,A_ScreenWidth,A_ScreenHeight,Capture1.png
	if(ErrorLevel == 0)
	{
		MouseMove,%x1%,%y1%,0
		sleep, 10
		Click
		sleep, 500
		ImageSearch,x5,y5,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
		if(ErrorLevel == 0)
		{
			MouseMove,%x5%,%y5%,0
			sleep, 10
			Click
			sleep, 500
		}
		ImageSearch,x2,y2,0,0,A_ScreenWidth,A_ScreenHeight,Capture2.png
		if(ErrorLevel == 0)
		{
			MouseMove,%x2%,%y2%,0
			Click
			ImageSearch,x6,y6,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
			if(ErrorLevel == 0)
			{
				MouseMove,%x6%,%y6%,0
				sleep, 10
				Click
				sleep, 500
			}
			ImageSearch,x3,y3,0,0,A_ScreenWidth,A_ScreenHeight,Capture3.png
			if(ErrorLevel == 0)
			{
				MouseMove,%x3%,%y3%,0
				Click
				ImageSearch,x7,y7,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
				if(ErrorLevel == 0)
				{
					MouseMove,%x7%,%y7%,0
					sleep, 10
					Click
					sleep, 500
				}
				break
			}
		}
	}
	x1 -= 10
	y1 -= 10
	MouseMove,%x1%,%y1%,0
	sleep, %delay%
}
Return
f2::
Reload
Return
Esc:: ExitApp
User avatar
WalkerOfTheDay
Posts: 710
Joined: 24 Mar 2016, 03:01

Re: Script randomly starts clicking at edge of window/screen

17 Jun 2021, 02:14

Hope you didn't pay to much. I'm sure someone on this board would have done it for free, or
would have given you pointer how to do it yourself.

I see a lot of repetitive code, which could have easily been replaced by a function.
imageclicks
Posts: 4
Joined: 16 Jun 2021, 18:36

Re: Script randomly starts clicking at edge of window/screen

17 Jun 2021, 17:36

Rohwedder wrote:
17 Jun 2021, 01:54
Hallo,
try (untested):

Code: Select all

; <COMPILER: v1.1.32.00>
#SingleInstance, Force
#Persistent
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
InputBox, delay,,Enter the delay between each check click.
f1::
Loop
{
	ImageSearch,x4,y4,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
	if(ErrorLevel == 0)
	{
		MouseMove,%x4%,%y4%,0
		sleep, 10
		Click
		sleep, 500
	}
	ImageSearch,x1,y1,0,0,A_ScreenWidth,A_ScreenHeight,Capture1.png
	if(ErrorLevel == 0)
	{
		MouseMove,%x1%,%y1%,0
		sleep, 10
		Click
		sleep, 500
		ImageSearch,x5,y5,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
		if(ErrorLevel == 0)
		{
			MouseMove,%x5%,%y5%,0
			sleep, 10
			Click
			sleep, 500
		}
		ImageSearch,x2,y2,0,0,A_ScreenWidth,A_ScreenHeight,Capture2.png
		if(ErrorLevel == 0)
		{
			MouseMove,%x2%,%y2%,0
			Click
			ImageSearch,x6,y6,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
			if(ErrorLevel == 0)
			{
				MouseMove,%x6%,%y6%,0
				sleep, 10
				Click
				sleep, 500
			}
			ImageSearch,x3,y3,0,0,A_ScreenWidth,A_ScreenHeight,Capture3.png
			if(ErrorLevel == 0)
			{
				MouseMove,%x3%,%y3%,0
				Click
				ImageSearch,x7,y7,0,0,A_ScreenWidth,A_ScreenHeight,Capture4.png
				if(ErrorLevel == 0)
				{
					MouseMove,%x7%,%y7%,0
					sleep, 10
					Click
					sleep, 500
				}
				break
			}
		}
	}
	x1 -= 10
	y1 -= 10
	MouseMove,%x1%,%y1%,0
	sleep, %delay%
}
Return
f2::
Reload
Return
Esc:: ExitApp
hey thank you for your reply but this doesn't resolve the issue. it can run for hours on end then it starts clicking at 0 0
imageclicks
Posts: 4
Joined: 16 Jun 2021, 18:36

Re: Script randomly starts clicking at edge of window/screen

17 Jun 2021, 17:40

WalkerOfTheDay wrote:
17 Jun 2021, 02:14
Hope you didn't pay to much. I'm sure someone on this board would have done it for free, or
would have given you pointer how to do it yourself.

I see a lot of repetitive code, which could have easily been replaced by a function.
I paid one person $20 the script was having issues so I paid another $10 and it still is
just me
Posts: 9451
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Script randomly starts clicking at edge of window/screen

18 Jun 2021, 04:56

Code: Select all

; <COMPILER: v1.1.32.00>
#SingleInstance, Force
#Persistent
...
Seemingly this code has been extracted from an exe file. Did you do it?
imageclicks
Posts: 4
Joined: 16 Jun 2021, 18:36

Re: Script randomly starts clicking at edge of window/screen

18 Jun 2021, 07:08

just me wrote:
18 Jun 2021, 04:56

Code: Select all

; <COMPILER: v1.1.32.00>
#SingleInstance, Force
#Persistent
...
Seemingly this code has been extracted from an exe file. Did you do it?
yeah the person i paid wouldn't give me the source code so i looked into extracting it

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Lamron750 and 262 guests