Not long ago I had a client that was using a barcoded coversheet to replace a previous version that required OCR. The client placed several values into the barcode with a delimiter and wanted them parsed out and placed into the appropriate index fields.
Recognition Script seemed like the most likely place to implement this little tidbit of code. Unfortunately I quickly found out that while I could parse the barcode into its separate values, Recognition Script only provides access to the index field its applied to. Therefore I had no access to the other index fields and could not set them.
Remember to keep the scope of your script in mind when implementing your solutions. Unlike Validation Script which has Batch, Document and Index Field scope, Recognition Script scope is very narrow and only allows access to the single field it is associated with.
All was not lost though, I switched gears and implemented my parsing logic in a workflow agent instead. This worked even better as it provided the additional ability to add the validation module for those rare error cases but let me route batches around it for 99% straight through processing.