SCRIPT HELP

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
taton
Posts: 4
Joined: 06 Mar 2019, 08:56

SCRIPT HELP

06 Mar 2019, 09:04

Hello this is my script which starts with pressing F12 clicking every 10 seconds on screen set by coordinates and stops when I press ESC.

But I am running it on HP ThinClient with windows XP on it. So first when I press F12 in press on the correct field set by coordinates but then for yhe next click it just go on the wrong coordinates and don't know how to explain this but maybe is something wrong with script. I there anyone who is willing to help me.

SCRIPT

Code: Select all

#NoEnv
#Persistent
#SingleInstance, force
SetMouseDelay, 10
SendMode, event

 

 

f12:: ;<- use the f12 key to start/stop the clicking routine
clicktoggle := !clicktoggle
if	(!clicktoggle)
{
	SetTimer, startclick, off
	tooltip
	return
}

; drops through into the click timer

startclick:
tooltip, auto-clicking is on
MouseClick, left, 259, 558
SetTimer, startclick, -10000
return

 

Esc:: Exitapp ;<- use the esc key to end the script
Moderator Note: Added code tags. ~ sinkfaze
MannyKSoSo
Posts: 440
Joined: 28 Apr 2018, 21:59

Re: SCRIPT HELP

06 Mar 2019, 09:07

on your f12 hotkey you go straight into the startclick hotkey when you toggle the key. You need to put another return before the startclick to fix this issue. (I didn't test anything, but that is the first thing I notice).
taton
Posts: 4
Joined: 06 Mar 2019, 08:56

Re: SCRIPT HELP

06 Mar 2019, 09:28

Hi, thank you for your response. You mean it like this

clicktoggle := !clicktoggle

if (!clicktoggle)

return

{ SetTimer, startclick, off

tooltip

return
MannyKSoSo
Posts: 440
Joined: 28 Apr 2018, 21:59

Re: SCRIPT HELP

06 Mar 2019, 09:33

Code: Select all

#NoEnv
#Persistent
#SingleInstance, force
SetMouseDelay, 10
SendMode, event

f12:: ;<- use the f12 key to start/stop the clicking routine
	clicktoggle := !clicktoggle
	if (!clicktoggle) { 
		SetTimer, startclick, off
		tooltip
		return
	}
return

startclick:
	tooltip, auto-clicking is on
	MouseClick, left, 259, 558
	SetTimer, startclick, -10000
return



Esc:: Exitapp ;<- use the esc key to end the script
taton
Posts: 4
Joined: 06 Mar 2019, 08:56

Re: SCRIPT HELP

07 Mar 2019, 07:20

Script looks like this now but is not working

#NoEnv
#Persistent
#SingleInstance, force
SetMouseDelay, 10
SendMode, event

F12:: ;<- use the f12 key to start/stop the clicking routine
clicktoggle := !clicktoggle
if (!clicktoggle) {
SetTimer, startclick, off
tooltip
return
}
return

startclick:
tooltip, auto-clicking is on
MouseClick, left, 259, 558
SetTimer, startclick, -10000
return



Esc:: Exitapp ;<- use the esc key to end the script

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: aitaixy, Anput, Google [Bot], Nerafius and 188 guests