The modified Chris Stone AppleScript action below doesn't return the converted text in the RailcarFile_Text variable when executed as part of the macro on its first run. However, it does successfully return the converted text when run immediately afterwards using the "Try Action".
The Railcar_File is open in PDFpenPro and the variable is properly defined. The PDFpenPro OCR is successfully achieved (both times), but the RailcarFile_Text variable is found to be empty on the initial macro run. The RailcarFile_Text does hold the text when the action is executed using the "Try Action" afterwards. It doesn't seem to be a timing issue as I've added delays without different results. Could there be some other reason that the pdftotext would not execute successfully on the initial run of the macro?