control send and control click.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

control send and control click.

20 May 2017, 02:44

So I made this script with reference to another script made by a forumer for another game of mine.

Here's the script.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#MaxThreadsPerHotkey, 2
^w::

ControlSend, ahk_parent, {f2}, ahk_exe javaw.exe 
Sleep 4500
ControlClick, x822 y279, ahk_exe javaw.exe
Sleep 1000

ControlSend, ahk_parent, {f2}, ahk_exe javaw.exe 
Sleep 4500
ControlClick, x822 y279, ahk_exe javaw.exe
Sleep 1000

ControlSend, ahk_parent, {f2}, ahk_exe javaw.exe 
Sleep 4500
ControlClick, x822 y279, ahk_exe javaw.exe
Sleep 1000

ControlSend, ahk_parent, {f2}, ahk_exe javaw.exe 
Sleep 4500
ControlClick, x822 y279, ahk_exe javaw.exe
Sleep 8000

ControlClick, x430 y430, ahk_exe javaw.exe
Sleep 1000
ControlClick, x430 y430, ahk_exe javaw.exe
Sleep 9500
ControlClick, x600 y450, ahk_exe javaw.exe
Sleep 1000
ControlClick, x617 y433, ahk_exe javaw.exe
Sleep 1000
ControlClick, x617 y433, ahk_exe javaw.exe
Sleep 1000
ControlClick, x530 y460, ahk_exe javaw.exe
Sleep 15000
ControlClick, x932 y305, ahk_exe javaw.exe
Sleep 2000









Return

^Esc::ExitApp
The other script seems to work even when the game is minimized,
so I thought control click and send was for that function.

I want to be able to do other stuff while the script is running on the game in other words.

However I've hit some bricks while writing this,

1) For ahk_exe, what should I write? wintitle class or process?
javaw is the process.

I need help perfecting this script.

So this happend when I ran the script.

The control send would happen only if I was in the game,
it would not send if the game was minimized.

The controlclick never worked at all.
do I need to put ......d or something?
What do I need to put?


Can somebody rewrite the script in teh correct way,
and guide me?

Thanks alot.
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: control send and control click.

22 May 2017, 07:03

bump
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: control send and control click.

28 May 2017, 04:57

bump
I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, DiegoSouto, mikeyww, robnicholson, Rohwedder, Swiftly9767 and 348 guests