@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=FileText set RoutineAuthor=Siegfried set Using_work_from= set Example_call_1=%%FileText%% "3" "Welcome to FILETEXT ..." "FILETEXT_T_1.dat" "FILETEXT_FT_1.dat" set Example_call_2= set Example_call_3= set text_01=Wizard prompt to display the content of a text file. set text_02=Like it is used to accept a license in setup wizards. 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=Param 4: a text file with the text to be shown in the display field 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= shift set WAtitle=%~1&shift set Text_file=%DATs%\%~1&shift set wafile=%DATs%\%~1&shift :: 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" %MSG% "%APPS%\WIZapp.exe" %BUTTONSET% FT 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 :: =============================================