This is the small example:
_trace := true ; , _Trace("_d_") ;show in SysInternals DebugView guipos = x100 y100 [color=blue] guiw = 100 guih = 101 [/color] Gui, +LastFound hwnd := WinExist() _Trace("bshow", guipos, guiw, guih) Gui, Show, %GuiPos% w%GuiW% h%GuiH%, Choose Icons WinGetPos, x, y, w, h, ahk_id %hwnd% _Trace("ashow ", "x" x " y" y, w, h) #include trace.ahk
This is the output log file (trace.log):
11:16:50,459 bshow | x100 y100 | [color=blue]100 | 101[/color] 11:16:50,459 ashow | x100 y100 | [color=blue]106 | 133[/color]
This is the otput from spy:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<< Choose Icons ahk_class AutoHotkeyGUI >>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<< On Screen: 724, 470 (less often used) In Active Window: 624, 370 >>>>>>>>>( Now Under Mouse Cursor )<<<<<<<< Color: 0xD8E9EC (Blue=D8 Green=E9 Red=EC) >>>>>>>>>>( Active Window Position )<<<<<<<<<< left: 100 top: 100 [color=blue] width: 106 height: 133[/color]
U can download Trace.ahk here
BTW, notice the milliseconds in log file. Can it possible be that Gui, Show and WinGetPos and 2 _Traces execute at the same millisec ? Or is it AHK sooooo fast... Now, if i check in debug view (uncoment the first line), i see that thick count is indeed very close...