Sign in to follow this  
Followers 0
TSO

Combo Box output to variable?

3 posts in this topic

This is my first time doing anything with a combobox and I'm a total noob. What I'm looking to do, is to have an item chosen from a combo box dropdown, then when $button1 is clicked, the result is that the text chosen in the combo box is written to a registry key...

For example, say "DCO" is a choice on my combobox.. I want to script it so that when I click $button1, it performs the following:

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "REG_SZ", "DCO")

I can't seem to find the syntax for getting this done, nor am I sure how to approach it really.. I figured I'd need to define a variable for GUICtrlRead($Combo1) or something, but can't finger it out...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Like so?

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "REG_SZ", GUICtrlRead($Combo1))
Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Like so?

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOrganization", "REG_SZ", GUICtrlRead($Combo1))
Oooooooh... man I knew it was going to be so painfully easy that I'd bitchslap myself for not being able to figure it out. Thanks mang :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0