Quote from
rafamacor on November 22, 2023, 7:02 am
Hi, @sakismor, I think this is that you need:
Create:
Text object ==> and in Text Propierties write ==> [NUMBER]
PushButton ==> and in Button Properties > Actions > Left Click ==> paste this:
.=================================================
Loop "1" "9999" "[ACTUAL-NUMBER]"
StrLen "[ACTUAL-NUMBER]" "[LONG-ACTUAL-NUMBER]"
If "[LONG-ACTUAL-NUMBER]" "<" "4"
Math "4-[LONG-ACTUAL-NUMBER]" "0" "[NUMBER-ZEROS]"
SetVar "[NUMBER]" "[ACTUAL-NUMBER]"
Loop "1" "[NUMBER-ZEROS]" "[ADD-ZERO]"
SetVar "[NUMBER]" "!0[NUMBER]"
EndLoop
Else
SetVar "[NUMBER]" "[ACTUAL-NUMBER]"
EndIf
.*******************
.HERE YOUR CODE (I have added a Delay to watch slow how is Number increasing)
Delay "200"
.*******************
EndLoop
.=================================================
Also I upload PUB and Capture
Hi, @sakismor, I think this is that you need:
Create:
Text object ==> and in Text Propierties write ==> [NUMBER]
PushButton ==> and in Button Properties > Actions > Left Click ==> paste this:
.=================================================
Loop "1" "9999" "[ACTUAL-NUMBER]"
StrLen "[ACTUAL-NUMBER]" "[LONG-ACTUAL-NUMBER]"
If "[LONG-ACTUAL-NUMBER]" "<" "4"
Math "4-[LONG-ACTUAL-NUMBER]" "0" "[NUMBER-ZEROS]"
SetVar "[NUMBER]" "[ACTUAL-NUMBER]"
Loop "1" "[NUMBER-ZEROS]" "[ADD-ZERO]"
SetVar "[NUMBER]" "!0[NUMBER]"
EndLoop
Else
SetVar "[NUMBER]" "[ACTUAL-NUMBER]"
EndIf
.*******************
.HERE YOUR CODE (I have added a Delay to watch slow how is Number increasing)
Delay "200"
.*******************
EndLoop
.=================================================
Also I upload PUB and Capture
Uploaded files:- You need to login to have access to uploads.