/* -----------------------------------------------------	*/
/* Scan command file to invoke scanner frontend			*/
/* ---------------------------------------------		*/
/* It is presumed that it runs in your CDMagic-directory	*/
/* -----------------------------------------------------	*/

/* Passed parameters: ----------

   ScanFrontend :
		Scanner frontend program
		where the actual scan 
		is produced
		including command line parameters
				

--------------------------------------	*/


BMP_Path     = SysINI("CDMagic.INI", "Settings", "BMPPath");
ScanFrontend = SysINI("CDMagic.INI", "Settings", "ScanFrontend");

/* ----------------------------------------------		*/
/* separate exe-name from commandline parameters:		*/
/* ----------------------------------------------		*/
SFE_Param    = Subword(ScanFrontend, 2);
ScanFrontend = word(ScanFrontend, 1);	

Olddir = directory();
ok = directory(BMP_Path);	/* switch to BMP-path		*/

/* --------------------------------------------------	*/
/* The following line invokes the frontend program. 	*/
/* It uses parameters from the Settings-Menu				*/
/* --------------------------------------------------	*/

ScanFrontend" "SFE_Param;	/* Att.: must be in PATH	*/

ok = directory(Olddir);		/* restore old dir			*/

exit 0;
