if=wert1=wert2

beasscript-logo-small

 

if=<wert1>/<!command>/<[!command]>=<wert2>=<jumpifequal>/then/<!command>/<functioncall()>=<jumpifnotequal>/<!command>/<functioncall()>

 

If equal then use "jumpifequal" else "jumpifnotequal"

 

If you do not provide a jump mark the next line in the Script will be executed.

 

Jump Marks:

 

jumpmark                        Jumps to the function or jump mark.

jumpmark()                        Jumps to the function.

!command                        Command will be executed.  ( Instead of "=" you have to use "-"

[!command]                        Command will be executed. ( Command can now use "=" because of [] )

_function(),%function()        Variables function

then                                if - elseif - else - endif

 

Special Case:

If a Jump mark starts with a "!", than this will be executed as an command and the next line of the Script will be executed.

Than you also have to use "-" instead of "=".

Alternative you can use []. ( Then you still can use "=" )

 

 

This is a classic if then

if=<wert1>=<wert2>=then

...

elseif=<wert3>=<wert4>=then

..

else

..

endif

 

 

Example:

input=My Name=value1=error

if=<value1>=Peter=salutation=you_not

 

[salutation]

messagebox=Hello Peter, I've been waiting for you

goto=end

 

[you_not]

messagebox=You're not allowed to go on!

goto=cancel

 

[error]

messagebox=Please insert a name

 

[end]

return

end

 

 

Example with function calls

input=Your name=salutation()=you_not()

goto=end

....

[end]

return

end

 

function salutation

messagebox=Hello Peter, I've been waiting for you

end

 

function you_not

messagebox=You're not allowed to go on!

end

 

 

Example.

input=number=value1=error

if=<value1>=1=goto1

if=<value1>=2=goto2

end

 

[goto1]

messagebox=ONE inserted

goto=end

[goto2]

messagebox=TWO inserted

goto=end

[error]

 

 

Example execute command direct

// if value1=V then insert in text field "Detailed", otherwise "Compacted"

 

if=<wert1>=V=[setvar=t_text=Compacted]=[!setvar=t_text=Detailed]

 

or

 

if=<wert1>=V=!setvar-t_text-Compacted=!setvar-t_text-Detailed

 

 

Example call a command

if=request()=-1=cancel

messagebox=now the execution runs!

goto=end

 

function request

question=Perform the execution?=end=cancel

end