trying to use RandomBezier.ahk to randomize the mouse path Topic is solved

Ask gaming related questions (AHK v1.1 and older)
TFH
Posts: 1
Joined: 26 Mar 2020, 21:41

trying to use RandomBezier.ahk to randomize the mouse path

26 Mar 2020, 21:53

First time poster, I'm trying to use RandomBezier.ahk (https://github.com/MasterFocus/AutoHotkey/tree/master/Functions/RandomBezier) to randomize the mouse path to click on things in game.
The Example.ahk in that github works, but when trying to use it in my own program, it doesn't work when calling the RandomBezier function.
I have the files in the same local directory.

Any help on getting this function to work?

Code: Select all

#SingleInstance force
#Include RandomBezier.ahk

^j::
screenWidth := A_ScreenWidth
screenHeight := A_ScreenHeight

//I'm using ratios so that I'm not hardcoding based on a given display resolution
Play_X := floor(0.02604*A_ScreenWidth)
Play_Y := floor(0.37037*A_ScreenHeight)
RandomBezier(0, 0, %Play_X%, %Play_Y%, "T1200 RO RD OT100 OB-100 OL0 OR0 P4-3") //<-- this line doesn't do anything. the mouse doesn't move.
;MouseMove, %Play_X%, %Play_Y%, 10 <--this line works 
Sleep 50
Click 
Thanks

EDIT: Removing the % from the parameters does make it work. Thanks!
Last edited by TFH on 27 Mar 2020, 00:20, edited 1 time in total.
gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: trying to use RandomBezier.ahk to randomize the mouse path  Topic is solved

26 Mar 2020, 23:47

Welcome to the forums!

I don't know the specific function, but try

Code: Select all

RandomBezier(0, 0, Play_X, Play_Y, "T1200 RO RD OT100 OB-100 OL0 OR0 P4-3")
(The parameter section of a function call is an expression, hence you wouldn't use %s around variable names.)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: slowwd and 90 guests