Jump to content

Recommended Posts

Posted

$i_GUIEntTxtItem = GUICtrlCreateInput(.... ) ; create input box

...

GUICtrlSetState($i_GUIEntTxtItem, $GUI_FOCUS) ; set focus on input box

sets the focus correctly, but also selects all existing text in the input control.

Is it possible to set the focus on the input control without selecting the text?

I want to avoid using a workaround like ControlSend($i_GUIEntHandle, "", $i_GUIEntTxtItem, "{RIGHT}") to achieve this, because ControlSend() should now be avoided within HotKey event handlers.

Thanks

Nick

Posted

Well, you can use the ControlClick() :whistle: ...

$hGui = GuiCreate(....)
$i_GUIEntTxtItem = GUICtrlCreateInput(.... )
...
GUICtrlSetState($i_GUIEntTxtItem, $GUI_FOCUS)

GuiSetState()

ControlClick($hGui, "", $i_GUIEntTxtItem)

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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
  • Recently Browsing   0 members

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