When defining a template variable for a user command, is it possible for this variable to be initially set to a default value?
For example:
Template: Filename/O
but with a default assigned value like "e:\myfile.txt"
If not, is there an available syntax for checking if the &filename& = "" so i can set it inside the Command Editor?
Additional Info:
User Commands
lxp
2
Yes, e.g.
@output:{="&filename&"=="" ? "empty" : "not empty"=}
1 Like
Thanks, but the @output: modifier prints a string to the script log.
I'm still unable to get my Standard Function (Opus or external) script to run.
Error: Windows cannot find 'FileName'.
Template: FileName/O
CD {sourcepath}
FileName = &FileName&"=="" ? "UseFolderName" : "&FileName&"
@async cmd /c start /min pwsh.exe -File c:\Powershell\Scripts\Showme.ps1 -FileName "&FileName&"