OSDN Git Service

Version 5.91
[vbslib/main.git] / Samples / SpaceToTab / SpaceToTab.bat
index bbd1f1e..4f7afdb 100644 (file)
@@ -1,5 +1,33 @@
 @echo off\r
+call :SetVariables\r
+\r
+%close_at_end%  %cscript% //nologo "%vbslib_root%\vbslib Prompt.vbs"  st  "" "" "" /AutoExit:800\r
+\r
+goto :eof\r
+\r
+\r
+REM ********************************************************************\r
+REM  Function: SetVariables\r
+REM ********************************************************************\r
+:SetVariables\r
 if     "%ProgramFiles(x86)%" == ""  set cscript=cscript\r
 if not "%ProgramFiles(x86)%" == ""  set cscript=%windir%\SysWOW64\cscript.exe\r
 \r
-%cscript% //nologo "..\..\vbslib Prompt.vbs" st "" "" "" /AutoExit:800\r
+set close_at_end=\r
+set not_close=cmd.exe /K\r
+\r
+call :GetParentPath %0\r
+call :GetParentPath "%ret%"\r
+call :GetParentPath "%ret%"\r
+set vbslib_root=%ret%\r
+\r
+goto :eof\r
+\r
+\r
+REM ********************************************************************\r
+REM  Function: GetParentPath\r
+REM ********************************************************************\r
+:GetParentPath\r
+set ret=%~dp1\r
+set ret=%ret:~0,-1%\r
+goto :eof\r