I’m trying to use AWS Textract for OCR, and have installed its CLI package under MacOS Monterey. If I paste my command into Terminal it works fine:
aws textract detect-document-text --document '{"S3Object":{"Bucket":"mybucketname","Name":"testpic.jpeg"}}'
But no matter how I break up my Xojo Shell’s command and parameters, I always get error 127
bash: aws: command not found.
I’ve tried sending everything in the shell’s command parameter, I’ve tried just “aws” in the command and everything else in the parameters, and breaking it at other points e.g. after “textract”, etc.
It’s not a syntax thing because my Xojo code puts a string on the clipboard and if I paste that into Terminal it works. I’d suspect a path / environment variable type issue, but if Terminal can find the aws executable, why can’t the Xojo shell?
dim shellcmd As String = "aws"
dim shellParms As String = "textract detect-document-text --document "+objstr
// Copy to clipboard for pasting into Terminal for comparison
dim terminalcommand As String = shellcmd+" "+shellParms
dim c As new Clipboard
c.Text = terminalcommand
Shell1.ExecuteMode = shell.ExecuteModes.Synchronous
Shell1.Execute shellcmd, shellParms
TIA