Page 1 of 1

[SOLVED] The exclamation mark is acting weird !

Posted: 26 May 2011 02:44
by Ed Dyreen
[SOLVED]
If i remove it from the script it works, otherwise it doesnt ^^^^^^^^^^^^^^^! I've deobfuscated and minimized the code.

Code: Select all

set LF=^


:: Two empty lines are neccessary

Setlocal EnableDelayedExpansion
set ^"\n=^%LF%%LF%"
set ^"\n2=^^^%LF%%LF%^%LF%%LF%^^^"

set /a Error = 0
set "$0.error=ok"
set "$1.error=error"

set ^"@ActError=do ( %\n2%

   if ^^^!Error^^^! neq 0 if %%~a neq 0 ( %\n2%

      if defined TraceFunc ( %\n2%

         echo. WARNING: script can't close; TraceFunc in on %\n2%

         set /p "?= " ^<nul %\n2%
         pause %\n2%

      ) else ( %\n2%

         echo. WARNING: script can't close; implementation missing ^^^^^^^^^^^^^^^! %\n2%

         set "?=$^!error^!.error" %\n2%
         for %%^^^! in ( "^!?^!" ) do set /p "?= [^!%%~^!^!:^!error^!]" ^<nul %\n2%

      ) %\n2%

   ) %\n2%
)"

for /f "usebackq tokens=1-26 delims=¦" %%a in ( '"%%~a"¦"%%~b"' ) !@ActError!
Can anybody help or give me some advise please ? :( How do I echo. ! without constantly running into trouble ?

Re: The exclamation mark is acting weird !

Posted: 26 May 2011 03:37
by Ed Dyreen
This is a five level deep macro, I mean by previous macro calls.

I think I found the answer . And it doesn't looks good :arrow:
http://lkamal.blogspot.com/2006/12/inpu ... mmand.html

But now I have a different question, can the environment be increased so a macro can hold more commands ?
Looks like I seriously overestimated the power of macros

The <SHELL> command is the preferred method of using COMMAND to permanently
increase space for the environment table. But where is the <SHELL> command with CMD :?:

what's this then ...?...
To make these changes to the environment, type the following line in Config.nt:

shell=%systemroot%\system32\cmd.exe /e:4096

This line sets Cmd.exe as the command interpreter for the window as long as it remains open or until you run another shell command. The line also permanently allocates 4,096 bytes of environment space to 16-bit programs you run in the window.

Well that didn't work !

[SOLVED] Variable upperbound exceeded while defining it :D