Require help "can this be done".. Mouse Coodinates

Ask gaming related questions (AHK v1.1 and older)
GratefulJim
Posts: 4
Joined: 04 Nov 2019, 14:10

Require help "can this be done".. Mouse Coodinates

16 Feb 2021, 15:44

I'm working on an automated tool.. for use in my Diablo 3 game.

Basicly i have it working... it clicks each paragon tab ( Core / Offense / Defense / Utility ).. and in each tab,... clicks the buttons to spend all unused paragon points.
I'm doing this to save time.. when you make new toon.. and need to spend thousands of unused paragon points ( saeaonal ).. it can take a long time... my scvript des it in seconds....

The issue at hand.. is i want to REPLACE the x / y coodinartes for the mouse location.. with a variable string... so instead of repeating the coordinate.. i can use the associated variable.



Example:

Code: Select all

	
	; --------------------------------------------------------------
	; --- Move Mouse to Paragon Window, Click on UTILITY Tab.
	MouseMove, 1029, 130
	Click, 1029, 130
	
	MouseMove, 1004, 340
	Click, 1004, 340, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.
	
	MouseMove, 1004, 427
	Click, 1004, 427, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.	
	
	MouseMove, 1004, 511
	Click, 1004, 511, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.	
	
	MouseMove, 1004, 599
	Click, 1004, 599, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.
	; --------------------------------------------------------------
	
	; --------------------------------------------------------------
	; --- Move Mouse to Paragon Window, Click on DEFENSE Tab.
	MouseMove, 835, 130
	Click, 835, 130
	
	MouseMove, 1004, 340
	Click, 1004, 340, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.
	
	MouseMove, 1004, 427
	Click, 1004, 427, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.	
	
	MouseMove, 1004, 511
	Click, 1004, 511, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.	
	
	MouseMove, 1004, 599
	Click, 1004, 599, 50
	Sleep, %SendSLeepDelay%  ; sleep for X miliseconds.	
	; --------------------------------------------------------------
	

I wan to set the position as a variable...

; WinParaTabPos4 := "1029, 130" UTILITY
; WinParaTabPos3 := "835, 130" DEFENSE
; WinParaTabPos2 := "650, 130" OFFENSE
; WinParaTabPos1 := "465, 130" CORE

And use :


MouseMove, %WinParaTabPos4%

With all the iterations and repeats of the procedures.. it makes or MUCH more universal for others to use... if they can simply alter the variable oordinated for the 4 main tabs. and the 4 buoons per tab to push.. by just updating those simple coodinates.. since it will be dependant on thier own unique screen size ....


It just tells me errors .. am i doing it wrong?? can it be done at all ?
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Require help "can this be done".. Mouse Coodinates

16 Feb 2021, 19:20

Code: Select all

WinParaTabPos4 := [509, 409]
move(WinParaTabPos4)

move(xy) {
 MouseMove, xy.1, xy.2
}
GratefulJim
Posts: 4
Joined: 04 Nov 2019, 14:10

Re: Require help "can this be done".. Mouse Coodinates

17 Feb 2021, 12:00

Thank you so much... syntax syntax.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Rxbie and 79 guests