﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
758	ControlGetHandle() does not work if controlID is passed as string type variable	shEiD		"In my script, I get controlID variable from registry with RegRead(). RegRead() returns value as string, although it is a number.
After some confusing errors, I found, that ControlGetHandle(""title"", ""text"", controlID) function does not work, if you pass a string type variable for controlID.

In the example I simply set the controlID variable and change it to string and back to int:

{{{
#include <GuiToolBar.au3>
Opt(""WinTitleMatchMode"", 2)

$toolbar_id = 59392
$h_wnd = WinGetHandle($win_title)

; does not work
$toolbar_id = String($toolbar_id)
$h_toolbar = ControlGetHandle($h_wnd, """", $toolbar_id)
ConsoleWrite('$h_toolbar = ' & $h_toolbar & @CRLF)

; convert back to Int and it works!
$toolbar_id = Int($toolbar_id)
$h_toolbar = ControlGetHandle($h_wnd, """", $toolbar_id)
ConsoleWrite('$h_toolbar = ' & $h_toolbar & @CRLF)
}}}

The console output after running this code:
$h_toolbar = 
$h_toolbar = 0x008908D6


"	Bug	closed		AutoIt	3.3.0.0	None	No Bug		
