Modify

Opened 10 years ago

Closed 10 years ago

#2776 closed Bug (No Bug)

AutoItX: ControlFocus with Handle doesn't work

Reported by: anno1977@… 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 Changed 10 years ago by Jos

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

Jos

comment:2 Changed 10 years ago by anno1977@…

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 Changed 10 years ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.