combobox and variable change

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lew046
Posts: 5
Joined: 15 Mar 2019, 09:55

combobox and variable change

15 Mar 2019, 10:36

Code: Select all

Gui, Show , w400 h100, sample gui

Gui, Add, ComboBox, x10 y10 w380 Center vDROPDOWN, Red|Green
return

if DROPDOWN=Red
MyString = {Right 3}{Enter}
return

if DROPDOWN=Green
MyString = {Left 2}{Enter}
return

a::
Send, %MyString%
return

GuiClose:
ExitApp
can somebody help why this script not working?
User avatar
sinkfaze
Posts: 616
Joined: 01 Oct 2013, 08:01

Re: combobox and variable change

15 Mar 2019, 10:41

Where is your gLabel to make that code work? You have to submit the GUI.
lew046
Posts: 5
Joined: 15 Mar 2019, 09:55

Re: combobox and variable change

15 Mar 2019, 10:51

what is gLabel ?
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: combobox and variable change

15 Mar 2019, 11:45

maybe this ?

Code: Select all

Gui, Show , w400 h100, sample gui
Gui, Add, ComboBox, x10 y10 w380 Center vDROPDOWN, Red|Green

a::
gui, submit
if DROPDOWN=Red
MyString = {Right 3}{Enter}
if DROPDOWN=Green
MyString = {Left 2}{Enter}
Send, %MyString%
return

GuiClose:
ExitApp

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Rohwedder and 307 guests