Jump to content

Send the value of a variable


Recommended Posts

I just included a small excerpt of a script I am working on. The short story is there is a Combo Box/drop-down list where you select a server name and then there is a "save" button that will append the server name selected to a text file. Now I can have it do this as well as send a message box where it will show the server name, but what I can't do is have it actually type out the server name I selected.

And example would be is after I select the server and click on the "save" button, I would like to have it call up notepad as an example and then type the name of the server into the notepad window.

However, when I run the following command of:

send($ServName, 1)

Instead of actually typing out "Server1" as an example in notepad, it types a value of 4 or 5 depending on what server is selected.

Here is part of the script:

$ServName = GUICtrlCreateCombo("------------------------------------", 120, 110, 160, 21)

GUICtrlSetData(-1, "Server1|Server2|Server3", "------------------------------------")

$Label1 = GUICtrlCreateLabel("Server Name", 20, 110, 90, 20)

Any ideas?

I am basically just wanting to select an item from the drop-down list, then click on the "save" button, which will then call up whatever window allows text entry and then have it type out the actual value of the "$ServName" variable instead of the 4 or 5 that it types instead.

It seems simple, but I am not having any luck.

Thanks in advance!

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...