How to disable left mouse click in League of Legends

Ask gaming related questions
Posts: 2
Joined: 19 Sep 2020, 05:28

How to disable left mouse click in League of Legends

19 Sep 2020, 05:52


Context: I want to fix a bug that makes me cast a spell in a random direction when I click on the HUD portrait in a League of Legends game.

So, I am trying to write a script that will disable the left click on the area that contains the HUD portrait.

That is what I coded:

Code: Select all

#ifwinactive League of Legends (TM) Client

	MouseGetPos, Px, Py, Win
	IF (Px >= 544 AND Px<= 646 AND Py >= 948 AND Py<= 1048)
		LogMouseClick(Px, Py, Win, "Return")
	} ELSE {
		LogMouseClick(Px, Py, Win, "Click")

LogMouseClick(Px, Py, Win, Action){
	logTxt := A_Hour . ":" . A_Min . ":" . A_Sec . " - New click detected : MouseX: " . Px . ", MouseY: " . Py . ", Win: " . Win . ", Action: " . Action . "`r`n"
	date := A_YYYY . "." . A_MM . "." . A_DD
	filename := "ultProtection-" . date . ".txt"
	path := "C:\Users\Lain\Desktop\Jeux\ahk\logs\"
	fullPath := path . filename
	FileAppend, %logTxt%, %fullPath%
But it does not seem to work ingame, it's just being ignored.
The logs shows that the script is working as intended, but it seems like the game just ignores that.
It is weird because I also disabled the ENTER key in another script and it works perfectly ingame.
Maybe it's related to the mouse only ?
I tried just disabling the Right click in the whole game and it didn't work either.

Is there another way of doing that ?

Return to “Gaming”

Who is online

Users browsing this forum: Bing [Bot], destroymp and 16 guests