Jump to content

RegWrite a $variable?


Recommended Posts

Forgive me, but I am learning AutoIT, so maybe I just missed something obvious here. Here is my code:

GuiCreate("Citrix Server System Setup GUI",500, 700)

$ServerName = GuiCtrlCreateLabel("Server Name", 5, 5, 150, 18)

$Input_ServerName = GuiCtrlCreateInput("", 75, 5, 100, 18)

$DomainName = GuiCtrlCreateLabel("Domain Name", 5, 35, 150, 18)

$Input_DomainName = GuiCtrlCreateInput("", 75, 35, 100, 18)

...More Stuff...

$SubmitButton = GUICtrlCreateButton ("Submit", 25, 660, 70,20)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $SubmitButton

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\CCS", "Servername", "REG_SZ", $Input_ServerName)

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\CCS", "Domain", "REG_SZ", $Input_DomainName)

ExitLoop

Case Else

;;;

EndSelect

WEnd

What I THOUGHT I was doing was dumping whatever the user typed into the input field defined in the first few lines and writing them to the registry when they clicked on SUBMIT. Indeed, the keys are written, the valuename is written, but no matter what I type in those fields what I actually see written for a value is a number (so when I type "TESTSERVER" in that first field I get "6" in HKLM\Software\CCS\ServerName). Very bizarre.

I will also post a question in the GUI support forum that is related - I need to make nice little radio buttons, let the user click on the value in each group, and dump the value to the same set of reg keys.

Thanks,

-Chris

Edited by AramisResearch
Link to comment
Share on other sites

You create a new control

$Input_ServerName = GuiCtrlCreateInput("", 75, 5, 100, 18)oÝ÷ Ù©Ýëmèz{b~'«rí®HíéÞÁÊ'¶º%|¨º»Ú®&äèëm触ën±íýB¶¹Qy§¢{k¢RiÛÚÇßÑڽ楢¶¥¥ø¥y&¦¦WºÚ"µÍÌÍÒ[]ÔÙ[YHHÝZPÝÜX]R[]
    ][ÝÉ][ÝË
ÍK
KLN
BÌÍÚ[]HÕRPÝXY
    ÌÍÒ[]ÔÙ[YH
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...