SetTimer issues following latest commit. See also Issue #69

Issue #71 closed
Winter Laite created an issue

SetTimer_Tests.ahk

MyGui := Gui()

MousePosText := MyGui.Add("Text", "x10 y+10 cBlue s10 w200", "Uses SetTimer to show mouse position")
CoordText := MyGui.Add("Text", "x10 y+10 cLime", "")
SetTimer("UpdateOSD", 200)
UpdateOSD()  ; Make the first update immediate rather than waiting for the timer.

MyGui.Show()

; ┌──────────────┐
;   Update OSD  
; └──────────────┘

UpdateOSD()
{
    Result := MouseGetPos()
    CoordText.SetFont("bold s20")
    CoordText.Text := ("X: " Result["X"] " Y: " Result["Y"])
}

Note: Works in clone after ‘git reset --hard e99986d

Error message:

Uncaught exception: 
Message: Input string was not in a correct format. 
Stack:    at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) 
at System.String.System.IConvertible.ToInt32(IFormatProvider provider) 
at System.Convert.ToInt32(Object value) 
at Keysharp.Scripting.Script.ForceInt(Object input) in C:\Users\HP6300\Documents\repos\keysharp_debug\keysharp\Keysharp.Core\Scripting\Script\Conversion.cs:line 192 
at Keysharp.Scripting.Script.IndexAt(Object item, Object index) in C:\Users\HP6300\Documents\repos\keysharp_debug\keysharp\Keysharp.Core\Scripting\Script\Objects.cs:line 420 
at Keysharp.Scripting.Script.Index(Object item, Object key) in C:\Users\HP6300\Documents\repos\keysharp_debug\keysharp\Keysharp.Core\Scripting\Script\Objects.cs:line 108 
at Keysharp.CompiledMain.Program.UpdateOSD() 
at Keysharp.CompiledMain.Program.Main(String[] args) 

Comments (3)

  1. Log in to comment