The command ordering issue doesn't appear to be as bad as I initially thought, though it is an unforeseen problem.
The order is modified when using <tokens> i.e. %f within the command block and should now be fixed.
At this time not all commands and settings are currently documented in the help file, some might be mentioned somewhere in the forums.
The /echo command was added to make it easier for me to test the result of regex and token modifier operations, you can also use /test with the same result.
There are also quite a few undocumented /debug commands that I have defined for testing and experimenting. such as /debug cache which you may have seen me mention on the forums.
We currently use /set <var> <value> for setting several internal variables (with more planned) though I don't recall they've been documented in the help file.
/set information-bar-active-color <value>
/set information-bar-normal-color <value>
/set toolbar-bg-color <value>
Where value can be entered as a HTML color code i.e. #FFFFFF or RGB color code 255 255 255
For example in the Site Manager > Selected Site > "Perform these commands after login" I use /set toolbar-bg-color #C4E25A to set the toolbar background color to help me identify the session connected to the flashfxp.com server, often I'm opening and/or closing many instances of FlashFXP for testing and this makes it easier for me to avoid closing the wrong window at a glance.
The reason we can't use %key is because the %<token> variables are a fixed length of 1 character, to use a variable length token identifier the parser needs a way to determine where the identifier ends.
My original thought to use @<name>@ as the variable name seems like the best solution at this point, I experimented with a few different ideas and so far this is the only solution that appears to work 100% and didn't require any major design refactoring.
You can give this test build a try
https://oss.azurewebsites.net/testr/5/ffxp5.0.0.3799-r5.zip
1. Fixes the command block order when the block contains tokens.
2. Adds support for "/set @<name>@ <value>" and then you can use @<name>@ from that point forward. The variable/value is preserved until you close FlashFXP. I will add an /unset command when I have more time.
Some examples:
Store the value of %d as @x@
Code:
/set @x@ %d
/echo @x@
Store the current path %p as @p@
Code:
/set @p@ %p
/echo @p@
I haven't spent as much time on this as I would have liked, with the holidays my schedule has been quite full.