Correct use of variables

Hello

dopusrt.exe /cmd @set s1={dlgstringS|Enter/Edit String1|qwerty} dopusrt.exe /cmd @set s2={dlgstringS|Enter/Edit String2|{$s1}-asdfg}
The first prompt displays qwerty and I press enter.
The second prompt displays -asdfg instead of the expected (by me) qwerty-asdfg

I'm missing something simple here. What am I doing wrong?

Regards, AB

It works fine if you don't use dopusrt.exe in the function. I presume that the second instance of dopusrt does not know about the first variable you've set.

Try:

@set s1={dlgstringS|Enter/Edit String1|qwerty} @set s2={dlgstringS|Enter/Edit String2|{$s1}-asdfg}

Variables set using the @set directive are local to the function. When you use dopusrt.exe to send a command into Opus you are effectively running a new function each time - therefore, variables do not carry over from one to the other. If you take out the dopusrt.exe calls it should behave as expected.

Thanks lads. I knew it had to be simple.

Regards, AB