Set Variable:New Value: syntax?

Good Afternoon All,

I have just started seeing what Automise can do and I am a bit in the dark as to what

the syntax or what operators can be used in the New Value of a Set Variable action.

It would seem that I may have to exit to a VB script in order to change the value of the variable

used within a For...Loop action. Is this correct?

rgds   EdG  

Hi Ed,

You should be able to change the value of the variable using the Set Variable action. What exactly do you want to do?

If you want to do something like

J = J - 1

Then if you look at the “Modifiers” section you’ll see options like “Increment” and “Decrement”, and you can check the “Apply to current value” box.

There are tons of other ways to use this action as well, so if you let us know exactly what you need, we’ll be happy to walk you through it.

Regards,

Angus

Angus, Good Afternoon (from this side of the pond), Good Morning , your side.
Thanks for the quick reply.
No problem with Increment/Decrement modifier bit but I came unstuck with the following.
Basically, I defined three variables: Var_Day, Var_Month, Var_Year. Defaulted to 31, 12 and 2007 respectively.
Then I wanted to decrement Var_Day by 7; so Set Variable Var_Day to [NewValue]Var_Day-7.
but ‘watching’ the variables gave me the error ‘Var_Day -7’ is not a valid integer.
Obviously there is some syntax issue here.
Also eventually need to Get Date/Time action to put current date into these variables using Options format to extract the relevent parts into Var_Day, Var_Month and Var_Year but suspect that this puts a string value in there. Correct? If so, How do I coerce these to be integers?

Best regards…Ed

Hi Ed,

You will actually have to use script for these. VBScript/JScript will automatically coerce the string value in the variable to an integer when it sees that you are trying to do arithmetic with the value.

Regards,

Angus

Angus,

Thanks for the clarification.

best regards…Ed