@ifset: - test for a specific Set command condition
Name:M
Template:Mail
Function:
@set Mail=&Mail&
@ifset:Set Mail
Copy Sendmail={$Mail}
@ifset else
Copy Sendmail=xxxxxxx@xxx.com
@ifset: - test for a specific Set command condition
Name:M
Template:Mail
Function:
@set Mail=&Mail&
@ifset:Set Mail
Copy Sendmail={$Mail}
@ifset else
Copy Sendmail=xxxxxxx@xxx.com
@ifset is described under Command Modifier Reference, which has these examples for testing variables in basic (non-scripting) commands:
@ifset:$foo - test if a variable called "foo" has been set
@ifset:$glob:bar - test if a global variable called "bar" has been set
Name:MT
template:Mail
@set Mail={dlgstring|Enter the address you want mail to}
@ifset:$Mail
Copy SENDMAIL=$Mail
@ifset:else
Copy Sendmail=scmaybee@qq.com
It seems doesn't work.
btw, Does a variable's value could be passed use this:@set Mail=&Mail&?
Things like @ifset are evaluated before anything is run, so the @set line above will not affect it.
If you want to ask the user for input and do different things depending on what they type, you should use scripting for that, and should find it more straightforward.
Or, in this case, you could just do this:
Copy SENDMAIL={dlgstringS|Enter the address you want mail to|scmaybee@qq.com}
That will prompt you, with scmaybee@qq.com already in the edit control, selected, so you can either type over it or push return.
Thank you, so I am going to learning the scripting.