Hi Mark,
I've had another look and put this code in my main.prg
***** OPEN MYCFG.TXT CONFIGURATION FILE *****
IF FILE('c:\WINDOWS\SYSTEM\mycfg.txt') THEN
handle=FOPEN("c:\WINDOWS\SYSTEM\mycfg.txt")
STORE FSEEK(handle,0,2) TO fEnd && Move pointer to EOF
FSEEK(handle,0) &&goto BOF
DO WHILE !FEOF(handle) &&do until endoffile
tmpline=FGETS(handle,fEnd) && Store contents
&tmpline
ENDDO
FCLOSE(handle) && Close the file
ELSE
&&raise exception dialog box
CLOSE ALL
CLEAR ALL
QUIT
ENDIF
RELEASE handle, fEnd, tmpline
The mycfg.txt is just a textfile containing a list of my public vars and their searchpath assignments eg.
daytapath='c:\app\dayta'
I basically read each line and use & symbol to declare and assign them.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only