Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Via autohotkey I'm trying to

  1. Read the contents from a dropdown box
  2. Present the content to the user in a AHK GUI dropdown box
  3. Select the correct item in the original dropdown box via the input from the AHK dropdown box.

I have the following code so far:

CClass  = fpOCXComboBox209
Title   = ahk_class ThunderRT6FormDC

ControlGet, ItemList, List,, % CClass, % Title
Gui, Add, DropDownList, vDDL, % RegExReplace(ItemList,"`n","|")
Gui, Add, Button, gSetChoice, Select ; gLabel jumps to action.
Gui, Show, w300
return

SetChoice:
    GuiControlGet, CurItem,, DDL
    Control, ChooseString, % CurItem, % CClass, % Title
return

GuiClose: ExitApp

The behavior when I test it, is when i press "Select" in the Gui dropdown box, the original dropdownbox is blanked (as if AHK tries to add a blank variable or something like that)

I believe the error might be in the last line "Control, ChooseString, % CurItem, % CClass, % Title", but I can't see why.

Anyone able to help me out?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.