Skip to main content
The automatic station scans images, exports the received batch, and closes.
[JScript]
Scan();
var batch = Batches( Batches.Count - 1 );
Send( batch );
while( !batch.IsExported ) {
    Wait( 100 );
}
Exit();
[JScript]
var fso = new ActiveXObject("Scripting.FileSystemObject");
if( ResultPath == "" ) {
    ResultPath = "C:\\Export";
}
if( !fso.FolderExists( ResultPath ) ) {
    fso.CreateFolder( ResultPath );
}
var params = NewImageSavingOptions();
params.AddProperFileExt = true;
params.Format = "bmp";
var exportedPageCount = CalcExportedPageCount();
NotifyProcessingProgress( exportedPageCount , PageCount - exportedPageCount );
for( i = 0; i < Children.Count; i++ ) {
    var item = Children.Item( i );
    if( item.IsDocument ) {
      if( !item.IsExported ) {
        var docDir = ResultPath + "\\" + item.Name;
        if( !fso.FolderExists( docDir ) ) {
          fso.CreateFolder( docDir );
        }
        for( j = 0; j < item .Children.Count; j++ ) {
          CheckCanceled();
          var page = item.Children.Item( j );
          if( !page.IsExported ) {
            page.SaveAs( docDir + "\\" + page.Name, params );
            exportedPageCount++;
            NotifyProcessingProgress( exportedPageCount , PageCount - exportedPageCount );
            page.IsExported = true;
          }
        }
        item.IsExported = true;
      }
    } else {
      CheckCanceled();
      if( !item.IsExported ) {
        item.SaveAs( ResultPath + "\\" + item.Name, params );
        exportedPageCount++;
        NotifyProcessingProgress( exportedPageCount, PageCount - exportedPageCount );
        item.IsExported = true;
      }
    }
}
The following instructions are for C#
  1. Add the following external assembly:
    1. Standard assembly name: System.Drawing
    2. Standard assembly name: System.Windows.Forms
  2. Use the ScanStation.InputComboBox.cs script, which is available at %PUBLIC%\ABBYY \ABBYY FineReader Server 14.0\Samples\Script.