Try Setting field behavior so that the Return exits the field. Then try using the OnObjectExit script trigger to automate this behavior.
Also, if the scan is tripping a trigger to put the focus in the correct field (a character that precedes the scan can be detected via a script performed by OnLayoutKeystroke), this script could instead use Install On Timer with a 1 second interval to set a script to perform after the scan is complete. (Just make sure to disable the timer after the first time it performs the script to process the scaned data.)
Try Setting field behavior so that the Return exits the field. Then try using the OnObjectExit script trigger to automate this behavior
I did exactly this and I thought it was working, but recently I was testing the file and it wasn't.
You'll need to investigate all parts of your set up to see where it is failing.
You might scan into MSWord, for example and see if a return is still being appended to the end of the scanned text.
You may need to double check your settings on the field and possibly even enable the script debugger (if Using FileMaker Advanced) to see what is happening one script step at a time.