topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 12:56 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: AutoHotKey script to assign mouse button to Esc playing Gems of War  (Read 6446 times)

StarliteLemming

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
I could try to learn how to do this myself, but it seems a waste of time when I'm sure there's people here who know how to do this in a few minutes.  Here's hoping!

The idea is to use a program like AutoHotKey (other options are welcome) to provide an alternative way of closing dialog boxes in the game Gems of War, launched from Steam. Basically, the near thumb button on my mouse will go Back in browsers, and I want it to do the same in Gems of War.

Here's the technical detail (please ask if I've missed anything):
- Assign near mouse thumb button to generate Esc-key keystroke.
- Diablo III designates this mouse button as Mouse4.
- Only active while GemsOfWar.exe is running, and preferably only while in the foreground.

Thanks in advance!

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,629
    • View Profile
    • Donate to Member
Re: AutoHotKey script to assign mouse button to Esc playing Gems of War
« Reply #1 on: October 04, 2018, 01:36 PM »
Doesn't your mouse supplier provide software for that? Most major brands do, AFAIK

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: AutoHotKey script to assign mouse button to Esc playing Gems of War
« Reply #2 on: October 04, 2018, 01:57 PM »
I have no way of testing this since I do not have that game, but you can try the following:

Code: Autohotkey [Select]
  1. #IfWinActive, ahk_exe GemsOfWar.exe
  2. {
  3.     XButton1::Esc  ; XButton1 is typically the fourth mouse button.  XButton2 is typically the fifth mouse button.
  4. }

Also, keep in mind that many games try to detect this sort of behaviour and will actively prevent it from working.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: AutoHotKey script to assign mouse button to Esc playing Gems of War
« Reply #3 on: October 04, 2018, 02:08 PM »
Many games actively sense if AutoHotkey is working period.  If you can get your mouse software to remap, that would be your best option.  What kind of mouse do you have?

StarliteLemming

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: AutoHotKey script to assign mouse button to Esc playing Gems of War
« Reply #4 on: October 04, 2018, 09:50 PM »
Thanks heaps!

I'll definitely try both.

My mouse is a Cougar (German brand).  I didn't install the software because my previous mouse's Razer software did little more than make it *too* sensitive.  Maybe I now have reason to!