-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
There's a bug in Static variables declaration, they are deparsed back to Const values
Source script:
#include <Timers.au3>
$hWnd = GUICreate("random GUI")
GUISetState()
_Timer_SetTimer($hWnd, 300, "_MyTimerCallback")
Do
Until GUIGetMsg() = -3
Func _MyTimerCallback($hWnd, $Msg, $iIDTimer, $dwTime)
Static $i = 1
$i += 1
If $i > 5 Then _Timer_KillTimer($hWnd, $iIDTimer)
MsgBox(0, "Hey", "It worked.")
EndFunc
Deparsed script:
#include <Timers.au3>
$hWnd = GUICreate("random GUI")
GUISetState()
_Timer_SetTimer($hWnd, 300, "_MyTimerCallback")
Do
Until GUIGetMsg() = -3
Func _MyTimerCallback($hWnd, $Msg, $iIDTimer, $dwTime)
Const $i = 1
$i += 1
If $i > 5 Then
_Timer_KillTimer($hWnd, $iIDTimer)
EndIf
MsgBox(0, "Hey", "It worked.")
EndFunc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels