Advertisement
Fawers

VBS Output

Oct 29th, 2012
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.85 KB | None | 0 0
  1. ::VBSOUTPUT.CMD was written by Fawers
  2. ::===================================
  3. ::Syntax:
  4. ::vbsoutput str [strDescription] [windowTitle]
  5. ::                       --str               Output string
  6. ::                       --strDescription    Brief description
  7. ::                       --windowTitle       Window Title
  8. ::Parameters in [brackets] are optional.
  9.  
  10. @echo off
  11. setlocal disableDelayedExtension 2>nul||setlocal
  12. if "%~1" == "" (
  13.   setlocal enableDelayedExpansion
  14.   echo,
  15.   for /f "skip=2 delims=" %%t in ('type "%~f0"^|find "::"^|find /v "for /f"'
  16. ) do (set line=%%t
  17.     echo,!line:~2!
  18.   )
  19.   endlocal
  20.   exit /b 1
  21. )
  22. pushd %temp%
  23. set vbs="%~n0.vbs"
  24. for /f "tokens=2 delims=:" %%c in ('chcp') do set /a "code=%%c"
  25. if not [%code%] == [1252] chcp 1252 >nul 2>&1
  26. >%vbs% echo inputbox "%~2", "%~3", "%~1"
  27. chcp %code% >nul 2>&1
  28. wscript %vbs%
  29. del %vbs%
  30. popd
  31. endlocal
  32. exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement