I challange you solving this !
Posted: 24 Sep 2011 05:33
'
I'm still struggling with this:
Trying to build a variable composed from commands like:
I'm building this macro from within a macro, I try to have it executed from the same macro.
Meaning I can't use immediate expansion like:
The only thing I think may be possible is using 'for' to somehow evaluate it.
I tried something like:
This is the idea: ( Left out newline etc.. )
If this can be done then it's possible to exec macros from within macros without increasing their size
I'm still struggling with this:
Trying to build a variable composed from commands like:
Code: Select all
set "$?=echo.This &echo.works &set /a $error = 0"
Meaning I can't use immediate expansion like:
Code: Select all
%$?%
I tried something like:
Code: Select all
for /f "usebackq" %%! in ( `!$?!` ) do %%!
Code: Select all
@echo off &SetLocal EnableExtensions EnableDelayedExpansion
set ^"@macro=(
set "$?=echo.This &echo.works &set /a $error = 0"
for /f "usebackq" %%^^^! in ( `^^^!$?^^^!` ) do %%^!
)"
%@macro%
pause
EndLocal &exit /b 0