I'm new to AutoHotkey and having a bit of trouble getting my script set up to do what I'd like. I'm trying to create a drop down list that contains each of the game's 3 classes (Dragon Knight, Spellweaver, Ranger) and depending on which is chosen the hotkeys sent would be different.
WinGet, ID, List, Drakensang Online: The online fantasy game in your browser
#IfWinActive, Drakensang Online: The online fantasy game in your browser
Gui, Add, Text, cGreen, Choose Your Class:
Gui, Add, DropDownList, vClass, Dragon Knight|Spellweaver|Ranger
Gui, Add, Button, Default, Go
Gui, Show
return
ButtonGo:
Gui, Submit, NoHide
MsgBox, You have selected %Class%
if Class = "Dragon Knight"
{
$1::
while GetKeyState("1", "P")
{
SendPlay {1}
}
return
}Currently no matter which class I select it still sends 1 to the game client.
I tried adding the other 2 classes:
else if Class = "Spellweaver"
{
$1::
while GetKeyState("1", "P")
{
SendPlay {2}
}
return
}
else if Class = "Ranger"
{
$1::
while GetKeyState("1", "P")
{
SendPlay {3}
}
return
}However, this gives me a 'Duplicate Hotkey' error.
If anyone could point me in the right direction to correct this it would be greatly appreciated




