Example Stack for MergAV (QR codes)?

Monte Goulding monte at appisle.net
Thu Nov 9 19:07:28 EST 2017


> On 10 Nov 2017, at 10:55 am, JOHN PATTEN via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hello!
> 
> I’m attempting to use MergAV to put a little student qr code reader app together. MergAV has many commands and I have not been successful with the combinations I have chosen.
> 
> Does someone have an example stack or a link they can point me to and example stack?
> 
> Thank you!
> 
> John Patten
> SUSD

Hi John

If you go digging in the livecode app bundle you will find an Ext/mergAV <version> folder. In there will be a very rough stack that I use for testing stuff.

The basics are:

on openCard
    if the environment is “mobile” then
         mergAVRequestMediaAccess “audio"
    end if
end openCard

on mergAVMediaAccess pType, pGrated
     put "mergAVMediaAccess"&&pType, pGrated
     if pType is "audio" then
         mergAVRequestMediaAccess “video"
    else
         mergAVCamCreate
         mergAVCamSet "rect",the rect of grc "cam"
         mergAVCamSet "visible",”true"
         mergAVCamStartBarcodeReader
     end if
end mergAVMediaAccess

on mergAVCamBarcodeFound pBarcode, pType
    answer "Barcode found"&cr&pBarcode & cr & "of type " & pType
end mergAVCamBarcodeFound

on closeCard
    mergAVCamDelete
end closeCard

Cheers

Monte



More information about the use-livecode mailing list