Loop syntax

Post here if you need help using Actiona
Post Reply
burque505
Posts: 1
Joined: 01 Dec 2017, 03:15

Loop syntax

Post by burque505 »

Hello, I'm only a few minutes into Actiona, it's very interesting.
I'm wondering about loops.
What I have so far is this. It works, but seems inelegant:

001: Variable [Name]
002: Loop [Goes to label Input 3 times]
Input: Data input [What is your name?] [Sets variable $Name]
004: Message Box [Hello, $Name]
005: Loop [Goes to 002 twice]

This is the only way I see so far to exit the loop. But it also seems like it must be wrong, even if it works.
Regards,
burque505

EDIT: It now seems to me that, as a general rule for which exceptions do come to mind, insertion of the loop action should probably be at the END of a loop, not the beginning.
So my code now is:

001: Variable [Name]
Input: Data input [What is your name?] [Sets variable $Name]
003: Message Box [Hello, $Name]
004: Loop [Goes to back UP to label 'Input' twice, and not down as I had it before which means it runs three times]
005: Message Box [Script has finished].
:D
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Loop syntax

Post by eureka »

Thanks for that explanation. It had me puzzled and I had tried loop forward instead of loop backward.
Actiona wiki documents which are a bit slim could benefit from an update in parts
Post Reply