Hi! I am new here, and I want to share a finding which bugs me a lot.
I want to activate Sticky Notes on WIN10x64 using AHKx64Unicode script, then I check with Spy and find this program has empty title.
So, I use following functions to check the existance of Sticky Notes, but strange thing is their results are not the same.
Code: Select all
id_win := ControlExist("Windows.UI.Core.CoreWindow1", "Sticky Notes")
if ( id_win )
{
msgbox, %id_win% ; NOT OK
}
id_win2 := ControlExist2("Windows.UI.Core.CoreWindow1", "Sticky Notes")
if ( id_win2 )
{
msgbox, %id_win2% ; OK
}
ControlExist( Control = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "" )
{
ControlGet out, Hwnd, , %Control%, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
Return ! ErrorLevel
}
ControlExist2( Control = "", WinTitle = "", WinText = "", ExcludeTitle = "", ExcludeText = "" )
{
WinGet, id_win, ID,, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
ControlGet out, Hwnd, , %Control%, ahk_id %id_win%
Return ! ErrorLevel
}