Modify ↓
Opened 12 years ago
Closed 12 years ago
#2776 closed Bug (No Bug)
AutoItX: ControlFocus with Handle doesn't work
| Reported by: | Owned by: | Jon | |
|---|---|---|---|
| Milestone: | Component: | AutoItX | |
| Version: | 3.3.12.0 | Severity: | None |
| Keywords: | Cc: |
Description
Calling ControlFocus in AutoItX3.Control and control handle as first parameter doesn't work, but with AutoIt3.exe it work properly.
FocusEditor.au3
$hControl = ControlGetHandle("Unbenannt - Editor", "", "Edit1")
ControlFocus($hControl, "", "")
FocusEditor.vbs
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
hControl = oAutoIt.ControlGetHandle("Unbenannt - Editor", "", "Edit1")
oAutoIt.ControlFocus hControl, "", ""
Attachments (0)
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
its written in ControlFocus Documentation...
Parameters
| title | The title/hWnd/class of the window to access |
|---|
I think, there is a misunderstanding on my side, because I coded in Delphi and my function returning an integer handle, instead of hex string 0x00000000
this sourcecode works...
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
hControl = oAutoIt.ControlGetHandle("Unbenannt - Editor", "", "Edit1")
oAutoIt.ControlFocus "[HANDLE:" + hControl + "]", "", ""
this ticket can be closed now
comment:3 by , 12 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Where does it state in the helpfile that this is supported?
The format is:
ControlFocus ( "title", "text", controlID )
-and-
ControlFocus "title", "text", "controlID"
Jos