Re: Can LC read QR-Code?

2020-12-07 Thread Sean Cole (Pi) via use-livecode
Hi Richard

This isn't quite what you was asking for (I have to have LC open on my Mac
to get the dictionary when coding in Linux), but here are the two library
bits from the dictionary:



*qrCreate*

Type

command

Syntax

qrCreate pImg,pData,pECC,pSize,pMask,pMinVersion,pMaxVersion

Associations

QR Code GeneratorSummaryCreate a QR codeParameters

NameType Description

pImg  The name of an image object on the card, a filename
or the special code "!" which will return the image data in the result.
pDataThe data to be encoded.
pECCThe error correction level

"L" : 7% error correction

"M" : 15% error correction

"Q" : 25% error correction

"H" : 30% error correction

pSize

Module size you can make the code larger/smaller. You can also just rescale
the image after the code has been created.

pMask

An integer value between 0 and 7. When encoding a QR code, there are eight
mask patterns that you can use to change the outputted matrix. Each mask
pattern changes the bits according to their coordinates in the QR matrix.
The purpose of a mask pattern is to make the QR code easier for a QR
scanner to read.

pMinVersion

An integer value between 1 and 40. It must be lower or equal to
pMaxVersion. If pMinVersion is not specified then the default value of 1 is
used.

pMaxVersion

An integer value between 1 and 40. It must be higher or equal to
pMinVersion. If pMaxVersion is not specified then the default value of 40
is used.


• Examples
qrCreate "MyImage", "QR data", "M", 3
--creating QR Code with ECC level M, Size 3, Mask 7 and version 14
qrCreate "MyImage", "QR data", "M", 3, 7, 14, 14
-- example how to use qrCreate with LiveCode server
qrCreate "!", tData, tECC, tSize
put the result into tData
if tData begins with "Error" then
   put tData
else
   # line 1 of the result contains some info
   # the remaining lines contain the png image data
   put line 1 of tData into tInfo
   delete line 1 of tData
   put "Qr code info" & LF
   put "Version: " & item 1 of tInfo & "" & LF
   put "ECC: " & item 2 of tInfo & "" & LF
   put "Mode: " & item 3 of tInfo & "" & LF
   put "Mask: " & item 4 of tInfo & "" & LF
   # show the image
   put base64Encode(tData) into tData
   replace LF with empty in tData
   put "" & LF
end if

Value

Name Type Description

the result

If successful, the first line of the result will be the following values:

QR version

ECC

Mode

Mask
Image size with quiet zone (based on module size 1)


If there was an error the result will contain "Error:" and then an error
description.

If the special character '!' is used for pImg, then the result also
contains the raw output of a png image. You can use this data, for example,
with LiveCode server to generate QR codes on web pages.


Description

Set the text of an image to a QR code or get the PMG data of the QR code
image.



*qrSetColors*

Type

command

Syntax

qrSetColors pForeground,pBackground

Associations

QR Code Generator

Summary

Set colors other than the default black and white

Parameters

NameTypeDescription

pForeground

A color name or RGB triplet

pBackground

A color name or RGB triplet

Examples

qrSetColors "Blue", "Yellow"

Description

Optionally use colors other than black and white there must be a high
enough contrast between colors for scanning the foreground color should be
darker than the background color.




Sean Cole
*Pi Digital *

On Tue, 8 Dec 2020 at 02:07, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Klaus wrote:
>
>  > Question, the dictionary says the "Android Barcode Library" works with
>  > LC INDY. But I remember there was one feature falsely reported as
>  > supported by INDY, but was BUSINESS only in the end. Was it this
>  > library?
>
> Where is LC's QR code plugin documented?
>
> I have Indy, but LiveCode has no functioning browser widget for Linux,
> and so it has no Dictionary; instead it opens the Dictionary from the
> public site, which apparently only documents things in the Community
> Edition.
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   
>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Can LC read QR-Code?

2020-12-07 Thread Richard Gaskin via use-livecode

Klaus wrote:

> Question, the dictionary says the "Android Barcode Library" works with
> LC INDY. But I remember there was one feature falsely reported as
> supported by INDY, but was BUSINESS only in the end. Was it this
> library?

Where is LC's QR code plugin documented?

I have Indy, but LiveCode has no functioning browser widget for Linux, 
and so it has no Dictionary; instead it opens the Dictionary from the 
public site, which apparently only documents things in the Community 
Edition.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


fontNames issue

2020-12-07 Thread Marty Knapp via use-livecode
I've had 3 customers who use the Windows version of my app who've had the same 
issue. I've traced it down to the line:

put the fontNames into tFontList

It returns this error and then quits:

465,110,1
241,110,1,LoadFontMenu (the handler name that's trying to get the fontNames
353,0,0,stack (then the path to the stack where "LoadFontMenu" is called)

110 is the line "put the fontNames into tFontList"

Anybody out there seen this before? Of course I can't duplicate the error here 
and customers are only willing to do so much. I'm wondering about a permissions 
issues somewhere in the path to the Fonts folder or a corrupted font cache.

Would this show up in an error log somewhere on Windows?

Marty
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


[ANN] This Week in LiveCode 247

2020-12-07 Thread panagiotis merakos via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

Read issue #247 here: https://bit.ly/2VRzxYJ

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to your e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.


-- 
Panagiotis Merakos 
LiveCode Software Developer

Everyone Can Create Apps 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: binaryencode question

2020-12-07 Thread jbv via use-livecode

Never mind folks,

I found another (and easier solution) : I'm using bytetonum() to
convert the binary data from the file, and then, after processing,
numtobyte() to write the data as binary in the file.

Le 2020-12-07 04:53, jbv via use-livecode a écrit :

Hi list,

I have a script that opens a binary file (actually a .wav) file,
converts binary data to hex, do some processing on parts of the
data, and then saves the result as a new .wav file.
I managed to convert the binary data to hex and do the processing,
but now I'm stuck trying to convert hex back to binary using the
binaryencode function, to get a playable .wav file.

Here's the code that works so far :
   put "/sounds/my.wav" into path
   open file path for binary read
   read from file path at 45 for 200
   close file path
   put it into mybin

   put "" into tHex
   put 1 into tCount

   repeat until tCount=155
  put byte tCount of mybin into theByte

  put binarydecode("H*", theByte, tHex) into theNumConversions
  put tHex after theHex
  add 1 to tCount
   end repeat

After processing the content of theHex, I need to save it as a .wav 
file.
I am aware of all the requirements for a .wav header, my only problem 
is

to convert the whole thing to binary before saving.

Can someone help ?
Thanks in advance.

jbv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


binaryencode question

2020-12-07 Thread jbv via use-livecode

Hi list,

I have a script that opens a binary file (actually a .wav) file,
converts binary data to hex, do some processing on parts of the
data, and then saves the result as a new .wav file.
I managed to convert the binary data to hex and do the processing,
but now I'm stuck trying to convert hex back to binary using the
binaryencode function, to get a playable .wav file.

Here's the code that works so far :
   put "/sounds/my.wav" into path
   open file path for binary read
   read from file path at 45 for 200
   close file path
   put it into mybin

   put "" into tHex
   put 1 into tCount

   repeat until tCount=155
  put byte tCount of mybin into theByte

  put binarydecode("H*", theByte, tHex) into theNumConversions
  put tHex after theHex
  add 1 to tCount
   end repeat

After processing the content of theHex, I need to save it as a .wav 
file.

I am aware of all the requirements for a .wav header, my only problem is
to convert the whole thing to binary before saving.

Can someone help ?
Thanks in advance.

jbv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode