I have a script built that works for me, but if a friend wants to use it they have to change their keybinds to match mine. To overcome this, I made a gui dropdown list with selections of F-keys.
How do I tell my script to remap the right mouse button to the drop down selection? Currently it's just hard coded to F2 until I can figure out a way to change it.
Here is what I have -
Code: Select all
; Generated by Auto-GUI 3.0.1
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gui Font, s9, Segoe UI
Gui Add, Tab3, Settings
Gui Tab, 1
Gui Font
Gui Font, cGreen
Gui Add, Button, vStart gstart x216 y40 w155 h40, START
Gui Font
Gui Font, s9, Segoe UI
Gui Font
Gui Font, cRed
Gui Add, Button, vStop gstop x216 y88 w155 h40, STOP
Gui Font
Gui Font, s9, Segoe UI
Gui Add, Text, x24 y32 w120 h23 +0x200 +0x400000, Inventory hotkey:
Gui Add, Button, vChange gkeys x24 y96 w122 h23, SUBMIT
Gui Add, DropDownList, gkeys x24 y64 w120, F1|F2||F3|F4|F5|F6|F7|F8|F9|F10|F11|F12
Gui Font
Gui Font, s20
Gui Add, Button, vQuit gover x16 y136 w391 h51, QUIT
Gui Font
Gui Font, s9, Segoe UI
Gui Tab
Gui Show, w419 h210, Remapper
Return
start:
GuiControl, Enable, Stop
GuiControl, Disable, Start
stopped := 0
{
#IfWinActive ahk_class client
RButton::F2
process_watcher:
Process Exist, client.exe ; check to see if PoE is still open
If ErrorLevel = 0
Exitapp ; if it's closed, exit the .ahk file
if stopped
return
}
stop:
Return
keys:
Return
over:
Return
GuiEscape:
GuiClose:
ExitApp
stop:
GuiControl, Enable, Start
GuiControl, Disable, Stop
stopped := 1
return
Keys:
if Choice
Hotkey, % Choice, Off
Gui, Submit, NoHide
Hotkey,% Choice, Choice
ToolTip, now use the chosen inventory hotkey!
SetTimer, ToolTipOff, -4000
return
ToolTipOff:
ToolTip
return
[Mod edit: Changed inline code tags (c) to [code][/code] tags. Please use them yourself when posting code.]