Hello,
How to simply check the contents of an expansion variable before using it ?
I don't know of an easy way, but you can use the ReplaceMacros squirrel function, probably.
Thanks,
Of course, but it would be convenient to have a tool to do this work at each location where an expansion variable can be used:
- Project Build Option...
- Tools-> Configure tools->Edit
- ...
A plugin expansion ?
Quote from: LETARTARE on November 28, 2020, 02:53:55 PM
Thanks,
Of course, but it would be convenient to have a tool to do this work at each location where an expansion variable can be used:
- Project Build Option...
- Tools-> Configure tools->Edit
- ...
A plugin expansion ?
I think the Menu->Tools is a good place to test the variable expansion.
You can wrote some command like
echo $TDAY
Then run the command, this command will shown in the console window as "echo 20201128".
Quote from: LETARTARE on November 28, 2020, 02:53:55 PM
Of course, but it would be convenient to have a tool to do this work at each location where an expansion variable can be used:
...
I don't understand.
What do you mean by test?
Put the variable, run the command and test it.
1- Choose a variable in a list of expansion variables,
2- Show the contents (to check if it's the right variable)
I still don't understand. What do you mean by "right variable"?
the variable that corresponds to my need
I still have no idea what you're trying to achieve. And you aren't even trying to explain. :shrug:
Probably the easiest way is to create a squirrel script, that expands every variable. Call this script before your need with the [[]] variable expansion...
The problem is, that variables have different values in different steps for example in compiling, so you would need a UI where you can set the build state....
So the easiest way is to create a squirrel script
Create a script that logs all your requested variables. Something like this:
Log(_T("$(PROJECT_FILENAME) = " + ReplaceMacros(_T("$(PROJECT_FILENAME)")))
and call the script with
[[Require(_T("Path to test script file"))]]
on every place you want to know the variables...
@BlueHazzard
Thanks, I will follow your advice.