PDA

View Full Version : Increment a numeric value in a macro


Shiamak
01-27-2014, 04:06 PM
I have a need to increment numeric value of a Macro .e.g Macro1 after certain steps are performed, how do you achieve this in VBP 8?

Here is pseudo code.

1. Perform action1.
2. Macro1 + 1
3. Perform Action 2
4. Macro1 + 1

Note: in step 4 value of Macro1 should be 2.

kinook
01-27-2014, 04:12 PM
http://www.kinook.com/Forum/showthread.php?t=4374

http://www.kinook.com/Forum/showthread.php?t=5198

Shiamak
01-27-2014, 05:05 PM
As always, thanks a bunch for your prompt reply however I ended up using %LOOP_VALUE% along with Loop statement, it worked really well.

Shiamak
03-17-2014, 06:02 PM
One more quick qs:

Is it possible to start Counter in a loop (Using VBP Loop feature) from a specific value

.e.g

For(i=10;i<= 15;i++)..currently if I used "Count" option from dropdown, VBP always looks at it "UPTO" for instance if %COUNTER% is 45 then VBP loops though 45 times...

any help is appreciated

Shiamak
03-17-2014, 06:55 PM
One more quick qs:

Is it possible to start Counter in a loop (Using VBP Loop feature) from a specific value

.e.g

For(i=10;i<= 15;i++)..currently if I used "Count" option from dropdown, VBP always looks at it "UPTO" for instance if %COUNTER% is 45 then VBP loops though 45 times...

any help is appreciated

Just to make sure you got it the problem right...I would like i to start from 11 .

kinook
03-17-2014, 10:21 PM
Just use an offset from the loop value. For instance, loop for a Count of 5 and use [%LOOP_VALUE%+10] in the loop.

Shiamak
03-18-2014, 12:27 PM
Just use an offset from the loop value. For instance, loop for a Count of 5 and use [%LOOP_VALUE%+10] in the loop.

thanks again for your prompt reply however is there any plan in future to turn LOOP function of VBP a true loop function (as it is available in any other computer language)

kinook
03-18-2014, 07:00 PM
It's not really our intention to implement every feature of a programming language in Visual Build itself. We provide the features that would most often be used in build scenarios, and if you need to go beyond that, you can use script code and repeating build rules.
http://www.kinook.com/VisBuildPro/Manual/script.htm
http://www.kinook.com/VisBuildPro/Manual/buildrules.htm

Shiamak
03-19-2014, 05:04 PM
Thank you so much for your response..and I also want to point out that you guys are doing a great job by keeping customer support up, every tools has its pros and cons but a great customer support can off set that gap.. which you guys have done very well.

I have had used many tools similar to VisualBuild, I must say, VisualBuils is certainly easy to use and very intuitive...The only issue I see is with Help documentations which is just not easy to follow....

Thanks again