Question

I found SetFormat only works at the first time, like the following simplified script:

Var = 0.0

f1::
SetFormat, float,03
Var += 1
msgbox, %Var%
return

I only get 001 at the first time. After that, it only displays 2, 3, ... for each f1. Anything I missed?

Thanks

Was it helpful?

Solution

In...

Var += 1 

Var is getting cast to an integer. Try:

Var += 1.0
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top