Does CNS Barcode automatically copy the scanned data to the clipboard? Is this in Filemaker Go? (that's the forum section you are in, but it's easy to make a mistake here.)
If the scanned text is copied to the clipboard and you cannot prevent this, then you should paste the text into a global text field and your script can then extract the text from the global field one value at a time to enter it into the appropriate fields in your database record.
The script above, might look like this if the first barcode scanned is the investigator and the second code scanned is the department:
Paste [select; Glassware::gBarcodeList]
Set field [Glassware::Investigator ; GetValue (glassware::gBarcodeList ; 1 )]
Set Field [Glassware::Department ; GetValue (glassware::gBarcodeList ; 2 )]
Since I see three codes in your field, you may either have additional fields to populate with the scanned data or you may need to set up a loop that uses the above code to create multiple new glassware records. If so, you can use a variable in the GetValue function to keep track of which value to be copied next.
OMG it worked THANKS SO MUCH I'm doing back flips right now, I wish. Thanks again I completely forgot about the global field.