@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=TextBox set RoutineAuthor=Siegfried set Using_work_from= set Example_call_1=%%TextBox%% "3" "Welcome to TEXTBOX ..." "TEXTBOX_T_1.dat" set Example_call_2= set Example_call_3= set text_01=Prompt to display the content of a text file. set text_02=Similar to FILETEXT but without the text box. Max 24 lines. set text_03=. set text_04=Param 1: 1=next, 2=next cancel, 3=back, next, cancel set text_05=Param 2: Topbar text set text_06=Param 3: a text file with the text above the display field set text_07= set text_08=. set text_09=NOTE: these text files have to be in SCRIPTS\DATs set text_10=To print a blank line: put a dot . at the beginning of that line. set text_11= set text_12=Returns: %%result%% and %%BTN%% as back, next or cancel if "%~1" == "GetHelp" goto :EOF echo.&echo %* :: ============================================= set result= set BUTTON_QTY=%~1 set BUTTONSET= if "%~1" == "1" set BUTTONSET=NOBACK NOCANCEL if "%~1" == "2" set BUTTONSET=NOBACK if "%~1" == "3" set BUTTONSET= set WAtitle=%~2 set Text_file=%DATs%\%~3 if "%~4" == "ERROR" set Text_file=%temp%\WIZ_ERR_TEXT.dat if not "%~4" == "ERROR" if "%~3" == "" goto NO_TEXTFILE :: Set the text variables 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" :NO_TEXTFILE %MSG% "%APPS%\WIZapp.exe" %BUTTONSET% TB if errorlevel 2 set result=cancel&goto _done if errorlevel 1 set result=back&goto _done if errorlevel 0 set result=next&goto _done :_done set BTN=%result% %RESET_VARS% goto :EOF :: =============================================