Const $FR_dir = "E:\Program Files\ABBYY FineReader 8.0 Professional Edition\"
Run($FR_dir&"FineReader.exe")
AutoItSetOption ( "WinTitleMatchMode" , 2 )
$search = FileFindFirstFile("*.pdf")
If $search = -1 Then
MsgBox(0, "Error", "No pdf files")
Exit
EndIf
While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
$file_name= StringTrimRight($file, 4); имя файла без расширения ".pdf"
WinWaitActive("ABBYY")
SendKeepActive("ABBYY")
Send("^n", 0); новый пакет
Send("!f") ;
Send("v")
WinWaitActive("Save")
Sleep(500)
ControlSetText ( "Save", "", "Edit1", @WorkingDir&"\"&$file_name ); создаем папку пакета
Sleep(500)
Send("{ENTER}")
Sleep(500)
Send("^o")
Sleep(500)
ControlSetText ( "Open", "", "Edit1", @WorkingDir&"\"&$file ); открытие и распознавание pdf файла
Send("{ENTER}")
WinWaitClose("Adding")
Sleep(500)
WinWaitActive("ABBYY")
Sleep(500)
Send("^+R")
WinWaitClose("Reading")
Sleep(500);
WinWaitActive("ABBYY")
Sleep(1000);
Send("^s")
WinWait("Save")
Sleep(500);
ControlSetText ( "Save", "", "Edit1", @WorkingDir&"\"&$file_name&"\"&$file_name ); сохраняем результаты распознавания в папку пакета
Send("{ENTER}")
Sleep(500);
WinWaitClose("Saving")
Send("!f")
Send("c") ;Закрываем пакет
WEnd
FileClose($search)