Jump to content

GuiCtrlCreateInput to sendkey


 Share

Recommended Posts

$Input_1 = GuiCtrlCreateInput("filename.txt", 0, 0, 150, 20)

Send("$Input_1")

I want to put the var Input_1 to the send key ( which is filename.txt) but i end up

getting Input_1 instead of filename.txt

I had read the faq

10. When I use Send() to send a variable odd things happen?

If you are sending the contents of a variable then be mindful that if it contains special send characters like ! ^ + {SPACE} then these will be translated into special keystrokes - rarely what is wanted. To overcome this use the RAW mode of Send() that does not translate special keys:

Send($myvar, 1)

but it giving me 3 ( just 3 ) . Why 3 instead of filename.txt ???

please help ., thanks in advance

Edited by victor
Link to comment
Share on other sites

$Input_1 = GuiCtrlCreateInput("filename.txt", 0, 0, 150, 20)

Send("$Input_1")

I want to put the var Input_1 to the send key ( which is filename.txt) but i end up

getting Input_1 instead of filename.txt

I had read the faq

10. When I use Send() to send a variable odd things happen?

If you are sending the contents of a variable then be mindful that if it contains special send characters like ! ^ + {SPACE} then these will be translated into special keystrokes - rarely what is wanted. To overcome this use the RAW mode of Send() that does not translate special keys:

Send($myvar, 1)

but it giving me 3 ( just 3 )

please help ., thanks in advance

to get the value from the input, you'll need to do something like:

$val = guictrlread($Input_1)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Or, you can combine the two and get this:

$Input_1 = GuiCtrlCreateInput("filename.txt", 0, 0, 150, 20)

Send ( GUICtrlRead ( $Input_1))

(This is what gafrost said, I'm just expanding on it.)

Also, victor: By putting the text in "" inside the Send command, you are sending exactly what is in the quotes, not the actual info.

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