Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

A very basic mouse click script



  • Please log in to reply
6 replies to this topic
Feleran
  • Members
  • 5 posts
  • Last active: Oct 05 2013 08:39 AM
  • Joined: 02 Oct 2013

Hello, I just discovered autohotkey today and couldn't even create a simple script to switch left and middle mouse buttons.

 

Here's what I tried:

 

Click, Middle::MouseClick, Left
Click, Left::MouseClick, Middle
 
and it compiles. But doesn't work. (I need it to use in a game.)
What did I do wrong?


Temil2008
  • Members
  • 364 posts
  • Last active: Jun 14 2015 09:02 PM
  • Joined: 10 Dec 2012
✓  Best Answer

"Click" is an action to left click at the mouses location. http://www.autohotke...mands/Click.htm

"MouseClick" is to click the button you want, at a location you specify http://www.autohotke.../MouseClick.htm

 

both of those are actions, they are NOT key names.

 

please refer to the following link for list of key : http://www.autohotke...ocs/KeyList.htm

 

that being said, try..

MButton::LButton
LButton::MButton

________________________________________________________________

Did a solution provided fix your issue? please mark as "Answered" if so. thank you!


Feleran
  • Members
  • 5 posts
  • Last active: Oct 05 2013 08:39 AM
  • Joined: 02 Oct 2013

Thanks, although it still does not work in LoL :(



Retro Gamer
  • Members
  • 24 posts
  • Last active: Aug 25 2018 12:28 AM
  • Joined: 15 Feb 2011

That's VERY vague, but its a simple script so I'm assuming by "not working" you notice the buttons don't swap when running that script. Did you run the script as administrator? That can make a lot of scripts work that sometimes don't want to work properly with out administrator rights.

 

 

Thanks, although it still does not work in LoL sad.png


/*
For my scripts I prefer most current AutoHotkey_L 64bit Unicode mostly and 32bit Unicode secondary.
*/

Temil2008
  • Members
  • 364 posts
  • Last active: Jun 14 2015 09:02 PM
  • Joined: 10 Dec 2012

also, does it work while NOT in game?


________________________________________________________________

Did a solution provided fix your issue? please mark as "Answered" if so. thank you!


Mythological
  • Members
  • 91 posts
  • Last active: Jul 05 2014 06:43 PM
  • Joined: 05 Feb 2013

LoL Might have AHK blocked.



brothersadcase
  • Members
  • 4 posts
  • Last active: Dec 27 2013 01:22 PM
  • Joined: 01 Jun 2013

You can actually change the mouse buttons around in the LoL input.in, which is in Riot games\config.  Try entering under [GameEvents]: 

evtOnUIMouse4Pan = [button 1]

evtPlayerSelectClick=[button 3]

 

That will let you select spells with middle mouse and scroll the screen with left click.