QR code

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

QR code

Post by trags3 » Tue Mar 18, 2025 4:44 pm

Is it possible to generate a QR code of a .txt file with LC?

Tom

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: QR code

Post by Klaus » Tue Mar 18, 2025 5:06 pm

Hi Tom,

sorry, don't understand, what exactly has to go into the QR code?

Best

Klaus

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: QR code

Post by trags3 » Tue Mar 18, 2025 5:39 pm

I have a txt file or a text list that needs to be put into a QR Code.
I want to be able to have the QR code printed on a page that gets sent to a business. Usually on a form such as an invoice for instance and then have the receiver be able to have the data he needs from the invoice put into a file using another LC App that reads the data. Minimizing the need to Manually input data on the receiving end. There will be a lot of information on the invoice that I don't need to have on the receiving App.

I Hope this is clear.
Thanks,
Tom

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: QR code

Post by Klaus » Tue Mar 18, 2025 6:04 pm

Hi Tom,

thanks, got it!
I'd say this depends on the maount of data you want to put into the code.
Unfortunately the dictionary does not tell us how much data a qr code can hold.

Found this on the net:
----------------------------------------------
A standard static QR Code can store up to three kilobytes (KB) of data, which translates to:
7,089 numeric characters. 4,296 alphanumeric characters (letters and numbers).
..............................................
Maybe that will fit your needs.


Best

Klaus

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: QR code

Post by trags3 » Tue Mar 18, 2025 6:34 pm

Hi Klaus,
The amount of data that I need in the QR Code is well below the maximum capacity of a QR Code.
Maybe 10 or 15 one to 3 word fields at most.
My question is how would I implement the generation of a QR code using Live Code if it is possible?

Thanks.
Tom

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: QR code

Post by Klaus » Tue Mar 18, 2025 6:44 pm

Hi Tom,

look up "qrcreate" in the dictionary.
That comes with a lot of options e.g. to put the code into an existing image
in your stack or even into an image file on disk.


Best

Klaus

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: QR code

Post by trags3 » Tue Mar 18, 2025 7:22 pm

Thank You So much Klaus!
I feel embarrassed that I did not check the dictionary in the first place!

I think this will work for me.

Tom

Hutchboy
Posts: 108
Joined: Wed Aug 01, 2018 2:57 pm
Contact:

Re: QR code

Post by Hutchboy » Wed Mar 19, 2025 8:12 pm

Hi,

Here is a quick start on a LC QR code generator. I notice the more data in the field the larger the image resizes. You can change the colors in the image to another color pair using qrSetColor.

-Mike
Attachments
A LiveCode QR Code Generator.livecode.zip
(2.69 KiB) Downloaded 1160 times

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 161
Joined: Tue Feb 23, 2010 10:53 pm

Re: QR code

Post by bobcole » Thu Mar 20, 2025 3:18 am

Hutchboy:
We must think the same way. I put together a sample stack with similar results.
My stack provides some additional error checking; look at the script of the button.
FYI,
Bob
QRCode 2.livecode.zip
(2.87 KiB) Downloaded 1346 times

Post Reply