title: Conditional Compilation Error in Batch Working For One Script But Not Another
body: <p><strong>Language:</strong> Batch + a little JScript.</p>
  
  <p><strong>Main Idea:</strong> JScript is working for one program but not another.</p>
  
  <p><strong>Error Message:</strong> Microsoft JScript compilation error: Conditional compilation is turned off.</p>
  
  <p>My problem is that I am trying to get some information from my pastebin into a batch variable. I would like my code to check and execute the code from the website. I have gotten the code to work independently, but when I add it to the main program I get a <code>Microsoft JScript compilation error: Conditional compilation is turned off</code> error. If I run the same script by itself, it works perfectly, but when I add it to the main script it breaks.</p>
  
  <p>I am pretty sure that the colored text script that I added breaks it, but I am not 100% sure. <em>So basically, why does the website data code work by itself, but not with anything else.</em></p>
  
  <p>How can I fix this?</p>
  
  <p><strong>[Not Working Part]</strong> Menu + Color Text + Website Info</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>@echo off
  color 0a
  setlocal
  call :initColorPrint
  call :title
  
  rem ---- Menu Stuff ----
  
  :menu
  call :title
  echo.
  echo (Type 'version' to see error)
  echo.
  call :colorPrint 09 "%time%"
  call :colorPrint 06 "@"
  call :colorPrint 0c "%username%"
  set /p call=^&gt; 
  if "%call%" =="version" goto :version
  %call%
  goto menu
  
  :title
  title CMD ^| User: %username%
  exit /b
  
  rem ---- This part doesn't work... ----
  
  :version
  @if (@a==@b) @end /*
  @echo off
  setlocal
  call :stuff
  timeout 1 
  echo.
  echo %code%
  set "code=%code%"
  timeout 3
  exit
  
  :stuff
  for /f "delims=" %%I in ('cscript /nologo /e:jscript "%~f0" "https://pastebin.com/raw/wAtBQEeZ"') do (
  set "code=%%I"
  echo(%%I
  )
  exit /b
  
  JScript */
  var x=new ActiveXObject("Microsoft.XMLHTTP");
  x.open("GET",WSH.Arguments(0),true);
  x.setRequestHeader('User-Agent','XMLHTTP/1.0');
  x.send('');
  while (x.readyState!=4) {WSH.Sleep(50)};
  WSH.Echo(x.responseText);
  
  rem ----- Color Stuff -----
  
  :colorPrint Color  Str  [/n]
  setlocal
  set "str=%~2"
  call :colorPrintVar %1 str %3
  exit /b
  
  :colorPrintVar  Color  StrVar  [/n]
  if not defined %~2 exit /b 
  setlocal enableDelayedExpansion
  set "str=a%DEL%!%~2:\=a%DEL%\..\%DEL%%DEL%%DEL%!"
  set "str=!str:/=a%DEL%/..\%DEL%%DEL%%DEL%!"
  set "str=!str:"=\"!"
  pushd "%temp%"
  findstr /p /A:%1 "." "!str!\..\x" nul
  if /i "%~3"=="/n" echo(
  exit /b
  
  :initColorPrint
  for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# &amp; echo on &amp; for %%b in (1) do rem"') do set "DEL=%%a"
  &lt;nul &gt;"%temp%\x" set /p "=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%.%DEL%"
  exit /b
  
  :cleanupColorPrint
  del "%temp%\x"
  exit /b
  </code></pre>
  
  <p><strong>Picture:</strong></p>
  
  <p><a href="https://image.prntscr.com/image/8jL7gzNkSc2L28iJTwsdzw.png" rel="nofollow noreferrer"><img src="https://image.prntscr.com/image/8jL7gzNkSc2L28iJTwsdzw.png" alt="Not Working Error"></a></p>
  
  <p><strong>[Working]</strong> Website Info Code</p>
  
  <pre class="lang-js prettyprint-override"><code>@if (@a==@b) @end /*
  @echo off
  setlocal
  call :stuff
  timeout 1 
  echo.
  echo %code%
  set "code=%code%"
  timeout 3
  exit
  
  :stuff
  for /f "delims=" %%I in ('cscript /nologo /e:jscript "%~f0" "https://pastebin.com/raw/wAtBQEeZ"') do (
  set "code=%%I"
  echo(%%I
  )
  exit /b
  
  JScript */
  var x=new ActiveXObject("Microsoft.XMLHTTP");
  x.open("GET",WSH.Arguments(0),true);
  x.setRequestHeader('User-Agent','XMLHTTP/1.0');
  x.send('');
  while (x.readyState!=4) {WSH.Sleep(50)};
  WSH.Echo(x.responseText);
  </code></pre>
  
  <p><strong>Working Picture:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/pz4Ak.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pz4Ak.png" alt="Working Script"></a></p>