@ ECHO OFF rem A batch file to run dta, dfv, etc. from a group of choices in a menu. rem by Bruce MacKay 4/3/99 rem This assumes that POVRAY main directory (folder) is c:\povray3d rem This assumes that dta, etc. are in c:\povrayd3d\dtad rem This assumes that scene, .tga, .flc files are in c:\povray3\filed rem To change to your directory structure, change the line rem cd c:\povray3d rem to your main povray directory such as: rem cd c:\mypovraymaindirectory rem (cd is the msdos command to change to a directory) rem Also change filed and dtad to your subdirectories of your main povray directory rem rem dta, dfv, buildsv are available at www.sapere.com/dearmad rem rem put this batch file in your main povray directory (c:\povray3d) rem rem To use this batch file outside POVRAY, open an MSDOS window, change to rem your main povray directory, and type A . This will bring up the message rem screen below. Follow the instructions there. For example, to use DTA, at rem the dos prompt type: A D followed by the filename for the image files and rem the filename for the output filename: A D myimages myresult rem Note that this particular batch file allows you to run more than one rem program and see a directory of various file types. To exit from the dos rem window, type a x or exit. rem rem That's pretty messy, so here's how to put it in the tools menu so you don't rem have to leave POVRAY. The following applies to Windows 95 and 98. rem When you run an MSDOS program in windows, windows first runs the rem command.com program, which then runs the program, either in a window or rem full screen. You usually do this by clicking on start/programs/msdos or rem by clicking on an msdos shortcut icon (for command.com.) you have put on rem your main windows screen and running the program at the msdos prompt there. rem rem The following are the steps to let you run the a.bat file inside POVRAY. rem In explorer, go the the folder c:\windows and find the file command.com. rem Next make a shortcut to command.com: right click the mouse and select rem CREATE SHORTCUT. Name the shortcut how you want; the name will be used rem later in the tool .ini file; don't call it "command", as this is window's rem default name. Right click the shortcut, select: RENAME, and type in the rem new name you want. In the example, I'll use commanda as the shortcut's rem name. Next right click on the shortcut name and select PROPERTIES. rem Select the tab PROGRAM. In the line BATCH FILE, type in your main povray rem directory and the batch file name (A.BAT), such as c:\povray3d\a.bat . If rem you want to run the batch file full screen, select the tab SCREEN, and rem under USAGE, select FULL SCREEN. I recommend this setting. (You can rem toggle back and forth between full screen and a window by typing rem alt-enter while in msdos.) Then click APPLY and OK. Then close explorer. rem Be sure not to delete command.com or you will have to reinstall it from rem disk to run an msdos program. rem rem Now run POVRAY. Select the TOOLS menu item and select: edit PVTools.ini. rem This brings up the tools menu .ini file in an editor. Under [Menu], add rem the line Item10=Run &DTA batch file . Use the next number (10) after the rem last one in the list. ( the letter after & will select the menu item from rem the keyboard.) Under [Command], type in Item10=c:\windows\commanda.pif ; rem you will need to change commanda.pif to what you named the shortcut: rem Item10=c:\windows\shortcutsname.pif. The extension after your rem shortcutname must be .pif . This line has to be right, or the batch file rem won't run from the tool menu. Under [help], type in rem Item10=whateverhelpmessageyouwant; use the appropriate item number. rem Finally save the Pvtools.ini file, exit the editor, exit povray, rem start povray, and run the batch file from the tools menu! (The changes to rem the tools.ini file won't take effect until povray is restarted.) rem rem (This batch file needs to call command.com first because it needs to rem have an open msdos window and command running when you type in the next rem instructions like A T after the message is displayed.) rem (Note: to add most other programs to the tools menu, you don't have to rem call the altered commanda.pif, just the program itself: rem Item##=c:\subdirectory\program .) rem (Note: all the remarks lines beginning rem in this batch file may be rem deleted if you want.) @ ECHO OFF CLS :TOP C: CD C:\POVRAY3D IF %1. == . GOTO MESSAGE IF %1 == D GOTO D IF %1 == V GOTO V IF %1 == B GOTO B IF %1 == R GOTO R IF %1 == P GOTO P IF %1 == T GOTO T IF %1 == F GOTO F IF %1 == E GOTO E IF %1 == I GOTO I IF %1 == X GOTO EXIT IF %1 == d GOTO D IF %1 == v GOTO V IF %1 == b GOTO B IF %1 == r GOTO R IF %1 == p GOTO P IF %1 == t GOTO T IF %1 == f GOTO F IF %1 == e GOTO E IF %1 == i GOTO I IF %1 == x GOTO EXIT GOTO END :MESSAGE ECHO. ECHO Note: "filename" is in C:\POVRAY3D\FILED (do not add extension): ECHO. ECHO To use DTA to animate filename1.TGA ECHO to filename2.flc type A D filename1 filename2 . ECHO To use DFV to view filename.flc at speed type A V filename and speed. ECHO To use BUILDSV to make filename1.flc ECHO into filename2.exe type A B filename1 filename2 . ECHO To run filename.exe at speed type A R filename and speed. ECHO To show all .POV files type A P . ECHO To show all .TGA files type A T . ECHO To show all .FLC files type A F . ECHO To show all .EXE files type A E . ECHO To show all filename files type A I filename . ECHO. ECHO To EXIT to Windows type A X . ECHO. GOTO END :D .\DTAD\DTA .\FILED\%2*.TGA /O.\FILED\%3.FLC GOTO SHP :V .\DTAD\DFV .\FILED\%2.FLC /S%3 GOTO SHP :B .\DTAD\BUILDSV .\FILED\%2.FLC .\FILED\%3.EXE GOTO SHP :R .\FILED\%2.EXE /S%3 GOTO SHP :P DIR .\FILED\*.POV /P PAUSE GOTO SHP :T DIR .\FILED\*.TGA /P PAUSE GOTO SHP :F DIR .\FILED\*.FLC /P PAUSE GOTO SHP :E DIR .\FILED\*.EXE /P PAUSE GOTO SHP :I DIR .\FILED\%2.* /P PAUSE GOTO SHP :SHP SHIFT SHIFT SHIFT SHIFT GOTO TOP :EXIT EXIT GOTO END :END