DDL not setting proper text to clipboard Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mlVCOzjcGHazCBzBZBaM
Posts: 4
Joined: 10 Apr 2018, 21:51

DDL not setting proper text to clipboard

10 Apr 2018, 22:00

When I select different items from a drop down list, the clipboard text is always set to the first item in the drop down list :(

Code: Select all

#SingleInstance force
#Persistent
#InstallMouseHook
#InstallKeybdHook
SetKeyDelay , -1
CoordMode, Mouse, Screen
Gui, +AlwaysOnTop

Gui, Add, DropDownList, x12 y29 w760 h20 gDynoCommandHelp R20, addmod|addrank|addrole|adorable|afk|announce|automod|autopurge|avatar|ban|bird|blacklist|botlist|cat|catfact|clean|clearwarn|command|country|customs|dadjoke|deafen|define|delmod|delrank|delrole|diagnose|discrim|distance|dog|dogfact|dynoavatar|dynonorris|flipcoin|flipcoin|github|google|ignorechannel|ignored|ignorerole|ignoreuser|info|inviteinfo|itunes|joke|kick|listmods|lock|math|membercount|members|mentionable|moderations|modlogs|module|modules|mute|nick|nowplaying|ow|ping|play|pokemon|prefix|premium|pug|purge|queue|quote|randomcolor|rank|ranks|reason|remindme|role|rolecolor|roleinfo|rolename|rolepersist|roles|roll|rps|seek|serverinfo|serverinvite|setnick|skip|slots|slowmode|softban|space|stats|steamstatus|stop|support|tag|tags|unban|undeafen|unlock|unmute|up|volume|warn|warnings|weather|whitelist|whois|yt

Gui, Add, DropDownList, x12 y89 w760 h20 gDynoServerTag R20, ;tag $N|;tag 8ball|;tag advanceagree|;tag advancesay|;tag askaboutdyno|;tag automod|;tag autorole|;tag benefits|;tag blacklist|;tag ccdonts|;tag change|;tag choose|;tag cleverbot|;tag cmd|;tag correctchan|;tag customcommand|;tag customemotes|;tag day1|;tag discordlogin|;tag dj|;tag dm|;tag donate|;tag downcommands|;tag dynodev|;tag dynohex|;tag dynojoined|;tag dynos|;tag dynotriggered|;tag embedded|;tag Fast|;tag fine|;tag general-perms|;tag google|;tag googleit|;tag hex|;tag hoist|;tag how2actionlog|;tag how2announce|;tag how2automod|;tag how2autorespond|;tag how2autorole|;tag how2cc|;tag how2mod|;tag how2music|;tag how2overseers|;tag how2region|;tag how2regular|;tag how2server|;tag how2userid|;tag invite|;tag links|;tag logout|;tag longcommand|;tag magic|;tag malwarelinks|;tag markdown|;tag messages|;tag misconfigured|;tag musiccommands|;tag musicerror|;tag musichelp|;tag musiclag|;tag mute|;tag n-example|;tag nofree|;tag noteveryone|;tag notresponding|;tag nudes|;tag opensource|;tag pasta|;tag plshelp|;tag premium|;tag premiumprice|;tag pretty|;tag protocoal|;tag purge|;tag randomrole|;tag ranks|;tag report|;tag roblox|;tag rolecommands|;tag roles|;tag saycommand|;tag secretmute|;tag serverid|;tag shardcalc|;tag shards|;tag softban|;tag soon|;tag staff|;tag support|;tag support_warning|;tag tags|;tag trello|;tag tutorial|;tag upgrade|;tag verify|;tag web_actionlog|;tag web_announcements|;tag web_automod|;tag web_autorespond|;tag web_autorole|;tag web_cc|;tag web_commands|;tag web_coords|;tag web_mod|;tag web_modules|;tag web_music|;tag web_settings|;tag web_tag|;tag whatsaprefix|;tag whynotopensource|;tag wolke|;tag zws|;tagdashboard

Gui, Add, Text, x12 y9 w110 h20 , Dyno Command Help
Gui, Add, Text, x12 y69 w110 h20 , Dyno Server Tags
Gui, Show, x2800 y688 h125 w787 , Dyno Server
Return

DynoCommandHelp:
Gui, Submit, NoHide

If DDL = addmod
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addmod
		Gosub, Entercommand
		return
		
If DDL = addrank
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addrank
		Gosub, Entercommand
		return
		
If DDL = addrole
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addrole
		Gosub, Entercommand
		return
		
If DDL = adorable
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help adorable
		Gosub, Entercommand
		return
		
If DDL = afk
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help afk
		Gosub, Entercommand
		return
		
If DDL = announce
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help announce
		Gosub, Entercommand
		return
		
If DDL = automod
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help automod
		Gosub, Entercommand
		return
		
If DDL = autopurge
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help autopurge
		Gosub, Entercommand
		return
		
If DDL = avatar
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help avatar
		Gosub, Entercommand
		return
		
DynoServerTag:
Gui, Submit, NoHide

If DDL = ?blacklist
WinActivate, 0xc706e4
		clipboard =
		clipboard = `;tag blacklist
		MouseMove, 2405,  980, 0
		MouseClick, left,  2405,  980
		Send, {CTRLDOWN}v{CTRLUP}{Enter}
		return
		
EnterCommand:
		MouseMove, 2405,  980, 0
		MouseClick, left,  2405,  980
		Send, {CTRLDOWN}v{CTRLUP}{Enter}
		Return
		
CloseGui:
ExitApp
donovv
Posts: 108
Joined: 15 Apr 2017, 21:06

Re: DDL not setting proper text to clipboard

10 Apr 2018, 23:17

you never declared a variable for you ddl

Code: Select all

Gui, Add, DropDownList, x12 y29 w760 h20 vDDL gDynoCommandHelp R20
mlVCOzjcGHazCBzBZBaM
Posts: 4
Joined: 10 Apr 2018, 21:51

Re: DDL not setting proper text to clipboard

10 Apr 2018, 23:32

Thank you.

I made some changes but it is not working. I am not sure I made the right changes. If you could provide any more information that would help a great deal. v.v

I Changed it to:

Code: Select all

Add, DropDownList, x12 y29 w760 h20 vDDLCommands gDynoCommandHelp R20,

If DDLCommands = addmod
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addmod
		Gosub, Entercommand
		return
		
If DDLCommands = addrank
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addrank
		Gosub, Entercommand
		return
somhairle
Posts: 11
Joined: 09 Apr 2018, 12:05

Re: DDL not setting proper text to clipboard

10 Apr 2018, 23:40

I don't know much about GUIs, but changing your if to check for string worked for me.

Code: Select all

Add, DropDownList, x12 y29 w760 h20 vDDLCommands gDynoCommandHelp R20,

If DDLCommands = "addmod"
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addmod
		Gosub, Entercommand
		return
		
If DDLCommands = "addrank"
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addrank
		Gosub, Entercommand
		return
somhairle
Posts: 11
Joined: 09 Apr 2018, 12:05

Re: DDL not setting proper text to clipboard  Topic is solved

10 Apr 2018, 23:46

Edit:
I had to change more than I thought I did:

Code: Select all

Add, DropDownList, x12 y29 w760 h20 vDDLCommands gDynoCommandHelp R20,

If (DDLCommands = "addmod") {
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addmod
		Gosub, Entercommand
		}
		
If (DDLCommands = "addrank") {
WinActivate, 0xc706e4
		clipboard =
		clipboard = ?help addrank
		Gosub, Entercommand
		}
mlVCOzjcGHazCBzBZBaM
Posts: 4
Joined: 10 Apr 2018, 21:51

Re: DDL not setting proper text to clipboard

10 Apr 2018, 23:57

donovv wrote:you never declared a variable for you ddl

Code: Select all

Gui, Add, DropDownList, x12 y29 w760 h20 vDDL gDynoCommandHelp R20
Thank You for your help. This did help me a lot.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 358 guests