@echo off&set FileName=%~n0&shift :: ============================================= :: AutoHelp PlugLab Concept: 2006 by Reatogo :: ============================================= :: Help Info: :: ======================= set Routine_Type=2 :: 1=Getting Data 2=Prompts 3=Getting Files 4=Creating Files 5=General set Routine_Vers=1 set Routine_Date=2007-02-15 set RoutineName=FileBrowser set RoutineAuthor=Siegfried set Using_work_from= set Example_call_1=%%FileBrowser%% "3" "Select the Main EXE ..." "FileBrowser_T_1.dat" "Nero.exe" set Example_call_2= set Example_call_3= set text_01=File browser dialog. set text_02=. set text_03=Param 1: 1=next, 2=next cancel, 3=back, next, cancel set text_04=Param 2: Topbar text set text_14=Param 3: a text file with the info text set text_15=Param 5: optional set text_16=. set text_17=The text file must be in SCRIPTS\DATs set text_18=. set text_19=Returns: set text_20= 1. The selected path as %%result%% set text_21= 2. back, next or cancel as %%BTN%% if "%~1" == "GetHelp" goto :EOF echo.&echo %* :: ============================================= set result= set result2= set BUTTON_QTY=%~1 set BUTTONSET= if "%~1" == "1" set BUTTONSET=NOBACK NOCANCEL if "%~1" == "2" set BUTTONSET=NOBACK if "%~1" == "3" set BUTTONSET= shift set WAtitle=%~1&shift set Text_file=%DATs%\%~1&shift set WAoutput=%~1 :: Set the text variables if not "%WAtext%" == "" goto FileBrowser_Lable_1 if "%Text_file%" == "%DATs%\" set WAtext=~Please enter your data.&goto FileBrowser_Lable_1 if exist "%temp%\TempLab.cmd" del "%temp%\TempLab.cmd" SETLOCAL ENABLEDELAYEDEXPANSION set a=0 for /F "tokens=*" %%i IN (%Text_file%) do ( set /a a+=1 if "!a!" == "1" echo set WAtext=~%%i >> "%temp%\TempLab.cmd" if not "!a!" == "1" echo set WAtext!a!=~%%i >> "%temp%\TempLab.cmd" if not "!a!" == "1" if "%%i" == "." echo set WAtext!a!=~ >> "%temp%\TempLab.cmd" ) ENDLOCAL call "%temp%\TempLab.cmd" del "%temp%\TempLab.cmd" :FileBrowser_Lable_1 %MSG% :: ============ set WAbat=%temp%\TempLab.cmd "%APPS%\WIZapp.exe" %BUTTONSET% FB FILE if errorlevel 2 set BTN=cancel&goto FileBrowser_Lable_2 if errorlevel 1 set BTN=back&goto FileBrowser_Lable_2 if errorlevel 0 set BTN=next&goto FileBrowser_Lable_2 :FileBrowser_Lable_2 call "%temp%\TempLab.cmd" del "%temp%\TempLab.cmd" set result=%WAoutput% %RESET_VARS% goto :EOF :: =============================================