Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

for loop - poison characters??

28 views
Skip to first unread message

Petr Laznovsky

unread,
May 23, 2012, 5:59:32 AM5/23/12
to
Trying to add progress "spinner" to mybat.cmd generated by Carlos
bhx.exe to spin "-\|/" characters until file is fully extracted.

Have spinner function working and now want to include line "call
:spinner" after each block of code in the mybat.cmd, just after those lines:

Echo.For b=1To 69Step 2:o.Write Chr(Clng("^&H"^&Mid(%%b,b,W^)^)^):Next)

Tried string containing poison characters enclosed with siglequotes,
doublequotes, square brackets or parenthesis, but I have no luck, maybe
due to wrong concept???

L.

@echo on
if exist mybat_p.cmd del mybat_p.cmd
for /f %%a in (mybat.cmd) do (
if "%%a"=="Echo.For b=1To 69Step 2:o.Write
Chr(Clng("^&H"^&Mid(%%b,b,W^)^)^):Next)" (
"echo Echo.For b=1To 69Step 2:o.Write
Chr(Clng("^&H"^&Mid(%%b,b,W^)^)^):Next)" >> mybat_p.cmd
echo call :spinner
) else (
echo %%a >> mybat_p.cmd
)
)
0 new messages