Try using Insert From Device to insert the code into a Text field instead of a container field. Then the value of the text field, with no additional processing, should be the scanned text from the code.
That's how I was doing it. I used 'Insert From Device' into a text field. The container is where the barcode prints from, so I was trying 'getContainerAttribute' and 'GetasText' to test it. I still haven't got this working. I've even tried creating a new file with nothing but a container and a text field. It should be that simple. Either I'm one of the only people reading QR codes or I am missing something really obvious.
For anyone who runs into this problem, I finally solved it.
The field must be present on the current layout when using the 'Insert from Device' script step, unlike 'Set Field' which works on any modifiable field wether it is present or not. I don't want to see the field in the layout when scanning, so I just made it super tiny and hid it under a button.
I'm not sure why the getcontainerattribute doesn't work though. I think there might still be a few missing features and/or bugs, but it works beautifully as long as you insert into a visible text field.
GetContainerAttribute will only be able to return bar code text if you used InsertFromDevice to insert the bar code image into that field. The image generated by your plug in and inserted into a container field won't contain the needed meta data that this function is attempting to extract for you.
That's why I suggested the text field as your original post led me to believe that you were using Insert From Device on a container field.