cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Balakrishna
Level 2

Numerical value in InstallAnywhere

I essentially have written a while loop in an InstallAnywhere project. What I would like to find is an easy and simple way to implement a counter inside this "While loop". Here is some pseudo code of my attempt:

Set InstallAnywhere Variable: $COUNT$ = 0
Jump Label: while
Execute Script/Batch File:
@echo off
set /a TEMP_NUM=$COUNT$+1 > nul
echo %TEMP_NUM%
Set InstallAnywhere Variable: $COUNT$ = $EXECUTE_STDOUT$
Jump: while Rule: $COUNT$ [Less Than or Equal to] 100
The above code sets $COUNT$ to the following:

Loop 0:
1
Loop 1:
1
Loop 2:
1
...
I wonder if this happens because InstallAnywhere is replacing $COUNT$ inside the batch file with 0 in the first loop, and then in subsequent loops it re-uses the same batch file with $COUNT$ already substituted in (like in a batch for loop or if statement).
Best Regards,
Bala Krishna VoIP Phone
Labels (1)
0 Kudos
(1) Reply
sturge
Level 6

Yeah, I tried it myself. This should work but doesn't. Thought it might have to do with the Evaluate variables on assignment checkbox, but no.

I'd recommend doing it in java with a custom code jar.
0 Kudos