#1 2015-05-24 21:54:40

impulsmedia
Member
Registered: 2015-04-21
Posts: 64

loop action with number variables possible?

Hello again,

next idea and/or question: At the moment  syntax loop "[a]" "[c]" "[l]"  is not possible, only  loop "1" "3" "[l]". first option would be nice :-), because loops are often depending other counter results, i.e. indices.

And further in direct relation  to this, it would be perfect to define i.e a [Image1.Image] property using the coonter var of the loop. example

loop "1" "3" "[l)
  SetVar "[Image1.Image]" "app/images/image[l].png
endloop

Thanks,
Walter

Offline

#2 2015-05-24 22:17:06

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: loop action with number variables possible?

Hello Walter,

The code you show its a bit "rare", because by set the image source in a loop probably we only see the last image. Said this, the below code works for me, that is, we can use variables in the "Loop" action and also use variables between an string, like when set the "Image1" source:

SetVar "[Start]" "1" "Number"
SetVar "[End]" "3" "Number"

// Expect three alerts showing "1", "2" and "3"
Loop "[Start]" "[End]" "[I]"
  Alert "" "[I]" ""
EndIf

// The Image1 control show us the "3.png" image
SetVar "[Image1.Image]" "app/images/[End].png" "String"

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.