GetTagValue() are a MultiScript function and can only be called from that command type. not from CustomCommand
Ofc I called it in multiscript
However I do know it can be confusing because a MultiScript can also call CustomCommands. But when doing embedded CustomCommand calls from MultiScript, you can not use MultiScript functions on that line. that line is run but the custom command engine.
Didn't get it You mean the whole line runs in single engine?
There are type main type of Script CustomCommands and MultiScript..
CustomCommand are for simple 1 line command that maps often direly to commands in MC. Think of them as they connect to the UI layer in MC.
They are often used when you want to call a command you see in the menu or similar but with a new set of parameters. or similar..
MultiScript are the advanced engine where you can write loops, conditions, have variables and stuff.. function called into MC from MultiScript often connect to the core in MC, without activating the UI.
When the MultiScript engine see a CustomCommand, It sends that line to be evaluated by the customcommand engine. Since MultiScript engine do not know what to do with it. It does not really fit into the its scripting language. You can enter some { } tags around variables that will be evaulated by the MultiScript engine before sending it off to CC. but only for variables. eg PATH="{$varPath}"
It seems that MC.Run base path equils ${mcinstallpath} + "\", is this always the truth?
can I rely on that?
Not sure. I think it depends, Safe way is to use $mcinstallpath then it cant go wrong
P.S. can you explain why this works:
MC.Run CMD="folder/file.exe";
and this is not:
@var $cmd="folder/file.exe";
MC.Run CMD=$cmd;
CustomCommand do not support parameters.. if it is run from a MultiScript you need to put {}around it so that the variable is evaulated for it is sent to the custom command engine.
but path with single backslashes in double quotes works well?
It only work if it fails to translate a escape character.. so you have have a path that is "SomePath\newpath" it will fail since \n is a escape character.
So use single quote.