Re: drawing a Barcode without a Barcode font

2018-07-26 Thread Richmond Mathewson via use-livecode
I was extremely lucky to spend 3 days as the guest of Dr Agnes and Dr 
Jackson He at their home in Long Island about 10 weeks ago:


http://spie.org/profile/Duanfeng.He-10918?SSO=1

Jackson is best described as the "Barcode King".

Richmond.

On 26/7/2018 11:32 pm, Mike Kerner via use-livecode wrote:

It doesn't surprise me that the optical scanning on the iphone is
performing differently than the ccd or laser scanner on the conveyor are.
The laser/ccd is only going to scan in the 600-650 nm wavelength, which is
both good and bad.  The overall width of the barcode shouldn't matter to
the scanner within the range that you will be dealing with.  It's not
unusual for 1D barcodes to be the full width of an AIAG label.
I just googled "free 2 of 5 font" and found a bunch of entries.  I'm not
using 2 of 5 so I can't speak to how good any of them are.


On Wed, Jul 25, 2018 at 12:26 PM Stephen Barncard via use-livecode <
use-livecode@lists.runrev.com> wrote:


"Btw, us tractor tape the correct expression?"

I could see how 'conveyor belt' could be easily lost in translation.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Wed, Jul 25, 2018 at 8:20 AM, Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:


Yes, with iPhone and our USB scanners we are able to scan that “wider”
bars, but i am not sure the highspeed scanners of the carrier can.
The packages are scanned by  high speed scanners while they are carried
and sorted on a“tractor tapes”. Btw, us tractor tape the correct

expression?

If the thermal transfer labels are accepted by the carrier then i will
add an option for the user to switch between laser and thermal printing.
The app will use different settings for laser and thermal printing.
So in case the TT printer is broken, they can switch over the laser
printer.




Am 24.07.2018 um 00:01 schrieb Bob Sneidar via use-livecode <

use-livecode@lists.runrev.com>:

Out of curiosity, does printed barcodes from the laserwriter still work

with these settings?

Bob S



On Jul 22, 2018, at 14:18 , Matthias Rebbe via use-livecode <

use-livecode@lists.runrev.com> wrote:

I have to add something.

As I wrote, we were able to successfully scan the labels. This is true

as long as we print the labels with a laser printer.

If we print the labels with a thermo printer (203 dpi) then the code

cannot be scanned with the values i posted before.

We  had set the line thickness of the rectangles to 0 and had to

increase the width of the black bars and decrease the width of the clear
ones.

So the code below shows the settings which allow us to scan the labels

with a Toshiba B-EV4D and a Zebra LP 2844.

put “3" into tNarrow
put “6" into tWide
set the width of grc "narrowC" to (tNarrow - 2)
set the width of grc "narrowB" to (tNarrow -3)
set the width of grc "wideC" to tWide
set the width of grc "wideB" to tWide

Regards,

Matthias Rebbe

___
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


___
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: drawing a Barcode without a Barcode font

2018-07-26 Thread Mike Kerner via use-livecode
It doesn't surprise me that the optical scanning on the iphone is
performing differently than the ccd or laser scanner on the conveyor are.
The laser/ccd is only going to scan in the 600-650 nm wavelength, which is
both good and bad.  The overall width of the barcode shouldn't matter to
the scanner within the range that you will be dealing with.  It's not
unusual for 1D barcodes to be the full width of an AIAG label.
I just googled "free 2 of 5 font" and found a bunch of entries.  I'm not
using 2 of 5 so I can't speak to how good any of them are.


On Wed, Jul 25, 2018 at 12:26 PM Stephen Barncard via use-livecode <
use-livecode@lists.runrev.com> wrote:

> "Btw, us tractor tape the correct expression?"
>
> I could see how 'conveyor belt' could be easily lost in translation.
>
> sqb
>
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Wed, Jul 25, 2018 at 8:20 AM, Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Yes, with iPhone and our USB scanners we are able to scan that “wider”
> > bars, but i am not sure the highspeed scanners of the carrier can.
> > The packages are scanned by  high speed scanners while they are carried
> > and sorted on a“tractor tapes”. Btw, us tractor tape the correct
> expression?
> >
> > If the thermal transfer labels are accepted by the carrier then i will
> > add an option for the user to switch between laser and thermal printing.
> > The app will use different settings for laser and thermal printing.
> > So in case the TT printer is broken, they can switch over the laser
> > printer.
> >
> >
> >
> > > Am 24.07.2018 um 00:01 schrieb Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com>:
> > >
> > > Out of curiosity, does printed barcodes from the laserwriter still work
> > with these settings?
> > >
> > > Bob S
> > >
> > >
> > >> On Jul 22, 2018, at 14:18 , Matthias Rebbe via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >>
> > >> I have to add something.
> > >>
> > >> As I wrote, we were able to successfully scan the labels. This is true
> > as long as we print the labels with a laser printer.
> > >>
> > >> If we print the labels with a thermo printer (203 dpi) then the code
> > cannot be scanned with the values i posted before.
> > >> We  had set the line thickness of the rectangles to 0 and had to
> > increase the width of the black bars and decrease the width of the clear
> > ones.
> > >>
> > >> So the code below shows the settings which allow us to scan the labels
> > with a Toshiba B-EV4D and a Zebra LP 2844.
> > >>
> > >> put “3" into tNarrow
> > >> put “6" into tWide
> > >> set the width of grc "narrowC" to (tNarrow - 2)
> > >> set the width of grc "narrowB" to (tNarrow -3)
> > >> set the width of grc "wideC" to tWide
> > >> set the width of grc "wideB" to tWide
> > >>
> > >> Regards,
> > >>
> > >> Matthias Rebbe
> > >
> > > ___
> > > 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
> >
> ___
> 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



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: drawing a Barcode without a Barcode font

2018-07-25 Thread Stephen Barncard via use-livecode
"Btw, us tractor tape the correct expression?"

I could see how 'conveyor belt' could be easily lost in translation.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Wed, Jul 25, 2018 at 8:20 AM, Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yes, with iPhone and our USB scanners we are able to scan that “wider”
> bars, but i am not sure the highspeed scanners of the carrier can.
> The packages are scanned by  high speed scanners while they are carried
> and sorted on a“tractor tapes”. Btw, us tractor tape the correct expression?
>
> If the thermal transfer labels are accepted by the carrier then i will
> add an option for the user to switch between laser and thermal printing.
> The app will use different settings for laser and thermal printing.
> So in case the TT printer is broken, they can switch over the laser
> printer.
>
>
>
> > Am 24.07.2018 um 00:01 schrieb Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > Out of curiosity, does printed barcodes from the laserwriter still work
> with these settings?
> >
> > Bob S
> >
> >
> >> On Jul 22, 2018, at 14:18 , Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> I have to add something.
> >>
> >> As I wrote, we were able to successfully scan the labels. This is true
> as long as we print the labels with a laser printer.
> >>
> >> If we print the labels with a thermo printer (203 dpi) then the code
> cannot be scanned with the values i posted before.
> >> We  had set the line thickness of the rectangles to 0 and had to
> increase the width of the black bars and decrease the width of the clear
> ones.
> >>
> >> So the code below shows the settings which allow us to scan the labels
> with a Toshiba B-EV4D and a Zebra LP 2844.
> >>
> >> put “3" into tNarrow
> >> put “6" into tWide
> >> set the width of grc "narrowC" to (tNarrow - 2)
> >> set the width of grc "narrowB" to (tNarrow -3)
> >> set the width of grc "wideC" to tWide
> >> set the width of grc "wideB" to tWide
> >>
> >> Regards,
> >>
> >> Matthias Rebbe
> >
> > ___
> > 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
>
___
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: drawing a Barcode without a Barcode font

2018-07-25 Thread Matthias Rebbe via use-livecode
We are waiting  for the result of the check of the carrier Trans-o-Flex.



> Am 25.07.2018 um 14:38 schrieb Mike Kerner via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> What up Matthias?
> You're using 2 of 5, right?
Yes, 2of5 interleaved.

> TT can be a little messy depending on how small you try to make the
> barcodes, and that Zebra isn't going to help.  Start with proportionally
> jacking the widths and then see if you can scan.

As i wrote,
we had to increase the width of the black bar bars and reduce the clear ones. 

> I meant to ask you this before, but since you got it running I was leaving

> it alone.  Is there any reason to not use a 2 of 5 font?  That would at
> least remove one potential issue from your setup.
> 

I found one called “Dobson2of5i” or so, but the size of the wide black bar was 
not double but triple. The laser printer prints were readable by the usb 
scanner, but not the thermal ones.
I´ve then created my own with fontographer but with the wider bar double in 
size of the narrow one. With that font both the laser and the thermal prints 
were readable by the scanner.
But the narrow clear bars  had not always the exact width on the thermal 
prints. So that a barcode showed the narrow clear bars in differents width. 
Thats why we decided to create the barcode with graphics.

Just out of interest i will try the following the next days: I create a barcode 
 with the font and also with the graphics, then import a snapshot of them and  
print and scan them.
I will try both with and w/o defining the dpi of the snapshot. Maybe i have to 
set it to 203 for thermal printing. We´ll see.

Anyway. This barcode stuff was an interesting distraction from the normal work.

Regards,

Matthias

> On Mon, Jul 23, 2018 at 6:35 PM Jim Lambert via use-livecode <
> use-livecode@lists.runrev.com > wrote:
> 
>>> Matthias wrote:
>>> 
>>> If we print the labels with a thermo printer (203 dpi) then the code
>> cannot be scanned with the values i posted before.
>>> We  had set the line thickness of the rectangles to 0 and had to
>> increase the width of the black bars and decrease the width of the clear
>> ones.
>> 
>> 
>> I wonder if it would make a difference to print snapshots of the graphic
>> group rather then the group itself?
>> 
>> Jim Lambert
>> ___
>> 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
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> 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

Matthias Rebbe
Tel +49 5741 31
‌https://matthiasrebbe.eu ‌

___
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: drawing a Barcode without a Barcode font

2018-07-25 Thread Matthias Rebbe via use-livecode
Our thermal prints, both qrcodes and barcodes, are scannable w/o problems with 
our iOS devices. So resolutions is not a problem.

Although we were able to successfully print the labels and are awaiting a 
positive confirmation from the carrier, i will try to import a snapshot of the 
barcode and will check if that prints look better.

Regards,

Matthias 

> Am 25.07.2018 um 16:49 schrieb Bob Sneidar via use-livecode 
> :
> 
> I kind of was referring to this in my prior post. Figure out the minimum 
> resolution you are printing to, then make your bars and white spaces in some 
> increment of that, then screenshot and scale as necessary. We have ERP 
> software that prints barcode labels for inventory, but the barcode readers 
> that use the iPhone camera don't read them well, probably because the 
> barcodes are printed with a thermal printer and the resolution kinda sucks. 
> 
> Bob S
> 
> 
>> On Jul 25, 2018, at 05:38 , Mike Kerner via use-livecode 
>>  wrote:
>> 
>> What up Matthias?
>> You're using 2 of 5, right?
>> TT can be a little messy depending on how small you try to make the
>> barcodes, and that Zebra isn't going to help.  Start with proportionally
>> jacking the widths and then see if you can scan.
>> I meant to ask you this before, but since you got it running I was leaving
>> it alone.  Is there any reason to not use a 2 of 5 font?  That would at
>> least remove one potential issue from your setup.
> 
> 
> ___
> 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: drawing a Barcode without a Barcode font

2018-07-25 Thread Matthias Rebbe via use-livecode
Yes, with iPhone and our USB scanners we are able to scan that “wider” bars, 
but i am not sure the highspeed scanners of the carrier can.
The packages are scanned by  high speed scanners while they are carried and 
sorted on a“tractor tapes”. Btw, us tractor tape the correct expression?

If the thermal transfer labels are accepted by the carrier then i will  add an 
option for the user to switch between laser and thermal printing. The app will 
use different settings for laser and thermal printing.
So in case the TT printer is broken, they can switch over the laser printer.



> Am 24.07.2018 um 00:01 schrieb Bob Sneidar via use-livecode 
> :
> 
> Out of curiosity, does printed barcodes from the laserwriter still work with 
> these settings?
> 
> Bob S
> 
> 
>> On Jul 22, 2018, at 14:18 , Matthias Rebbe via use-livecode 
>>  wrote:
>> 
>> I have to add something.
>> 
>> As I wrote, we were able to successfully scan the labels. This is true as 
>> long as we print the labels with a laser printer.
>> 
>> If we print the labels with a thermo printer (203 dpi) then the code cannot 
>> be scanned with the values i posted before.
>> We  had set the line thickness of the rectangles to 0 and had to increase 
>> the width of the black bars and decrease the width of the clear ones.
>> 
>> So the code below shows the settings which allow us to scan the labels with 
>> a Toshiba B-EV4D and a Zebra LP 2844.
>> 
>> put “3" into tNarrow
>> put “6" into tWide
>> set the width of grc "narrowC" to (tNarrow - 2)
>> set the width of grc "narrowB" to (tNarrow -3)
>> set the width of grc "wideC" to tWide
>> set the width of grc "wideB" to tWide
>> 
>> Regards,
>> 
>> Matthias Rebbe
> 
> ___
> 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: drawing a Barcode without a Barcode font

2018-07-25 Thread Bob Sneidar via use-livecode
I kind of was referring to this in my prior post. Figure out the minimum 
resolution you are printing to, then make your bars and white spaces in some 
increment of that, then screenshot and scale as necessary. We have ERP software 
that prints barcode labels for inventory, but the barcode readers that use the 
iPhone camera don't read them well, probably because the barcodes are printed 
with a thermal printer and the resolution kinda sucks. 

Bob S


> On Jul 25, 2018, at 05:38 , Mike Kerner via use-livecode 
>  wrote:
> 
> What up Matthias?
> You're using 2 of 5, right?
> TT can be a little messy depending on how small you try to make the
> barcodes, and that Zebra isn't going to help.  Start with proportionally
> jacking the widths and then see if you can scan.
> I meant to ask you this before, but since you got it running I was leaving
> it alone.  Is there any reason to not use a 2 of 5 font?  That would at
> least remove one potential issue from your setup.


___
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: drawing a Barcode without a Barcode font

2018-07-25 Thread Mike Kerner via use-livecode
What up Matthias?
You're using 2 of 5, right?
TT can be a little messy depending on how small you try to make the
barcodes, and that Zebra isn't going to help.  Start with proportionally
jacking the widths and then see if you can scan.
I meant to ask you this before, but since you got it running I was leaving
it alone.  Is there any reason to not use a 2 of 5 font?  That would at
least remove one potential issue from your setup.

On Mon, Jul 23, 2018 at 6:35 PM Jim Lambert via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > Matthias wrote:
> >
> > If we print the labels with a thermo printer (203 dpi) then the code
> cannot be scanned with the values i posted before.
> > We  had set the line thickness of the rectangles to 0 and had to
> increase the width of the black bars and decrease the width of the clear
> ones.
>
>
> I wonder if it would make a difference to print snapshots of the graphic
> group rather then the group itself?
>
> Jim Lambert
> ___
> 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: drawing a Barcode without a Barcode font

2018-07-23 Thread Jim Lambert via use-livecode
> Matthias wrote:
> 
> If we print the labels with a thermo printer (203 dpi) then the code cannot 
> be scanned with the values i posted before.
> We  had set the line thickness of the rectangles to 0 and had to increase the 
> width of the black bars and decrease the width of the clear ones.


I wonder if it would make a difference to print snapshots of the graphic group 
rather then the group itself?

Jim Lambert
___
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: drawing a Barcode without a Barcode font

2018-07-23 Thread Bob Sneidar via use-livecode
Out of curiosity, does printed barcodes from the laserwriter still work with 
these settings?

Bob S


> On Jul 22, 2018, at 14:18 , Matthias Rebbe via use-livecode 
>  wrote:
> 
> I have to add something.
> 
> As I wrote, we were able to successfully scan the labels. This is true as 
> long as we print the labels with a laser printer.
> 
> If we print the labels with a thermo printer (203 dpi) then the code cannot 
> be scanned with the values i posted before.
> We  had set the line thickness of the rectangles to 0 and had to increase the 
> width of the black bars and decrease the width of the clear ones.
> 
> So the code below shows the settings which allow us to scan the labels with a 
> Toshiba B-EV4D and a Zebra LP 2844.
> 
> put “3" into tNarrow
> put “6" into tWide
> set the width of grc "narrowC" to (tNarrow - 2)
> set the width of grc "narrowB" to (tNarrow -3)
> set the width of grc "wideC" to tWide
> set the width of grc "wideB" to tWide
> 
> Regards,
> 
> Matthias Rebbe

___
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: drawing a Barcode without a Barcode font

2018-07-23 Thread Phil Davis via use-livecode
I wonder what would happen if you turned the bar code by 90 degrees and 
then printed it? Could it be scanned then?


Just a wild thought...

Phil Davis


On 7/22/18 2:43 PM, Matthias Rebbe via use-livecode wrote:

Of course i meant

So the code below shows the settings which allow us to scan the labels when 
printed with a Toshiba B-EV4D and a Zebra LP 2844.


Am 22.07.2018 um 23:18 schrieb Matthias Rebbe via use-livecode 
:

I have to add something.

As I wrote, we were able to successfully scan the labels. This is true as long 
as we print the labels with a laser printer.

If we print the labels with a thermo printer (203 dpi) then the code cannot be 
scanned with the values i posted before.
We  had set the line thickness of the rectangles to 0 and had to increase the 
width of the black bars and decrease the width of the clear ones.

So the code below shows the settings which allow us to scan the labels with a 
Toshiba B-EV4D and a Zebra LP 2844.

put “3" into tNarrow
put “6" into tWide
set the width of grc "narrowC" to (tNarrow - 2)
set the width of grc "narrowB" to (tNarrow -3)
set the width of grc "wideC" to tWide
set the width of grc "wideB" to tWide

Regards,

Matthias Rebbe



Am 20.07.2018 um 13:31 schrieb Matthias Rebbe via use-livecode 
:

We tried here with iPhone and also with an USB scanner. Both devices scanned 
the code successfully.

I have just finished a program for shipment. It fetches customer and invoice 
data from the accounting software and creates then the shipment labels 
including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I need 
to send some sample labels to their IT department. They will check if the 
labels are readable by their scanners. But i am now confident, that this will 
work on their side also.

Thanks again.

Matthias




Am 20.07.2018 um 11:31 schrieb Mike Bonner via use-livecode 
:

Very cool!  Does it actually produce a code that can be scanned?

On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:


Mike

you´re awesome. That is already an almost complete solution to my
question. Never had expected that. Thank you very much.
I´ve made some little changes. One among of them is:
To have all the separate bars of the barcode in a group, i changed the
lines where the grc is cloned
to for examplecopy grc “narrowB” to grp “barcode2of5”

Here´s now my code to convert the nNnNN…. string to Barcode

local tLast
on mouseup
if there is a grp "barcode2of5" then delete grp "barcode2of5"
-- now change the width of the template graphics
put "2" into tNarrow
put "4" into tWide
set the width of grc "narrowC" to tNarrow
set the width of grc "narrowB" to tNarrow
set the width of grc "wideC" to tWide
set the width of grc "wideB" to tWide
put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
put "60,286" into tBarTopLeft -- defines where the first bar is placed
put empty into tLast
put fld "2of5" into tChars -- the field with your wNnnW string
set the casesensitive to true -- to differentiate case of course
create grp "barcode2of5"
repeat for each char tChar in tChars
switch tChar
   case "N"
  -- checks the char, and clones the matching bar.
  --if its the first time through, places it at astart location
  -- then uses the id of the most recent bar forplacement
purposes
  --clone grc "narrowB"
  copy grc "narrowB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "n"
  --clone grc "narrowC"
  copy grc "narrowC" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "W"
  --clone grc "wideB"
  copy grc "wideB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "w"
  --clone grc "widec"
  copy grc "widec" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
end switch
put the short id of the last grc into tLast -- the id of the most
recently placed bar
end repeat
set the height of grp "barcode2of5" to 69
set the width of grp "barcode2of5" to 360
end mouseup

--This function allows a horizontal adjustment of the single bars.
function horAdjust tHorAdjust
put the topright of grc id tLast into tTMP
set the itemdelimiter to ","
add tHorAdjust to item

Re: drawing a Barcode without a Barcode font

2018-07-22 Thread Matthias Rebbe via use-livecode
Of course i meant

So the code below shows the settings which allow us to scan the labels when 
printed with a Toshiba B-EV4D and a Zebra LP 2844.

> Am 22.07.2018 um 23:18 schrieb Matthias Rebbe via use-livecode 
> :
> 
> I have to add something.
> 
> As I wrote, we were able to successfully scan the labels. This is true as 
> long as we print the labels with a laser printer.
> 
> If we print the labels with a thermo printer (203 dpi) then the code cannot 
> be scanned with the values i posted before.
> We  had set the line thickness of the rectangles to 0 and had to increase the 
> width of the black bars and decrease the width of the clear ones.
> 
> So the code below shows the settings which allow us to scan the labels with a 
> Toshiba B-EV4D and a Zebra LP 2844.
> 
> put “3" into tNarrow
> put “6" into tWide
> set the width of grc "narrowC" to (tNarrow - 2)
> set the width of grc "narrowB" to (tNarrow -3)
> set the width of grc "wideC" to tWide
> set the width of grc "wideB" to tWide
> 
> Regards,
> 
> Matthias Rebbe
> 
> 
>> Am 20.07.2018 um 13:31 schrieb Matthias Rebbe via use-livecode 
>> :
>> 
>> We tried here with iPhone and also with an USB scanner. Both devices scanned 
>> the code successfully.
>> 
>> I have just finished a program for shipment. It fetches customer and invoice 
>> data from the accounting software and creates then the shipment labels 
>> including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I 
>> need to send some sample labels to their IT department. They will check if 
>> the labels are readable by their scanners. But i am now confident, that this 
>> will work on their side also.
>> 
>> Thanks again.
>> 
>> Matthias
>> 
>> 
>> 
>>> Am 20.07.2018 um 11:31 schrieb Mike Bonner via use-livecode 
>>> :
>>> 
>>> Very cool!  Does it actually produce a code that can be scanned?
>>> 
>>> On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
 Mike
 
 you´re awesome. That is already an almost complete solution to my
 question. Never had expected that. Thank you very much.
 I´ve made some little changes. One among of them is:
 To have all the separate bars of the barcode in a group, i changed the
 lines where the grc is cloned
 to for examplecopy grc “narrowB” to grp “barcode2of5”
 
 Here´s now my code to convert the nNnNN…. string to Barcode
 
 local tLast
 on mouseup
 if there is a grp "barcode2of5" then delete grp "barcode2of5"
 -- now change the width of the template graphics
 put "2" into tNarrow
 put "4" into tWide
 set the width of grc "narrowC" to tNarrow
 set the width of grc "narrowB" to tNarrow
 set the width of grc "wideC" to tWide
 set the width of grc "wideB" to tWide
 put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
 put "60,286" into tBarTopLeft -- defines where the first bar is placed
 put empty into tLast
 put fld "2of5" into tChars -- the field with your wNnnW string
 set the casesensitive to true -- to differentiate case of course
 create grp "barcode2of5"
 repeat for each char tChar in tChars
switch tChar
   case "N"
  -- checks the char, and clones the matching bar.
  --if its the first time through, places it at astart location
  -- then uses the id of the most recent bar forplacement
 purposes
  --clone grc "narrowB"
  copy grc "narrowB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "n"
  --clone grc "narrowC"
  copy grc "narrowC" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "W"
  --clone grc "wideB"
  copy grc "wideB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "w"
  --clone grc "widec"
  copy grc "widec" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
end switch
put the short id of the last grc into tLast -- the id of the most
 recently placed bar
 end repeat
 set the height of grp "barcode2of5

Re: drawing a Barcode without a Barcode font

2018-07-22 Thread Matthias Rebbe via use-livecode
I have to add something.

As I wrote, we were able to successfully scan the labels. This is true as long 
as we print the labels with a laser printer.

If we print the labels with a thermo printer (203 dpi) then the code cannot be 
scanned with the values i posted before.
We  had set the line thickness of the rectangles to 0 and had to increase the 
width of the black bars and decrease the width of the clear ones.

So the code below shows the settings which allow us to scan the labels with a 
Toshiba B-EV4D and a Zebra LP 2844.

 put “3" into tNarrow
 put “6" into tWide
 set the width of grc "narrowC" to (tNarrow - 2)
 set the width of grc "narrowB" to (tNarrow -3)
 set the width of grc "wideC" to tWide
 set the width of grc "wideB" to tWide

Regards,

Matthias Rebbe


> Am 20.07.2018 um 13:31 schrieb Matthias Rebbe via use-livecode 
> :
> 
> We tried here with iPhone and also with an USB scanner. Both devices scanned 
> the code successfully.
> 
> I have just finished a program for shipment. It fetches customer and invoice 
> data from the accounting software and creates then the shipment labels 
> including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I 
> need to send some sample labels to their IT department. They will check if 
> the labels are readable by their scanners. But i am now confident, that this 
> will work on their side also.
> 
> Thanks again.
> 
> Matthias
> 
> 
> 
>> Am 20.07.2018 um 11:31 schrieb Mike Bonner via use-livecode 
>> :
>> 
>> Very cool!  Does it actually produce a code that can be scanned?
>> 
>> On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Mike
>>> 
>>> you´re awesome. That is already an almost complete solution to my
>>> question. Never had expected that. Thank you very much.
>>> I´ve made some little changes. One among of them is:
>>> To have all the separate bars of the barcode in a group, i changed the
>>> lines where the grc is cloned
>>> to for examplecopy grc “narrowB” to grp “barcode2of5”
>>> 
>>> Here´s now my code to convert the nNnNN…. string to Barcode
>>> 
>>> local tLast
>>> on mouseup
>>>  if there is a grp "barcode2of5" then delete grp "barcode2of5"
>>>  -- now change the width of the template graphics
>>>  put "2" into tNarrow
>>>  put "4" into tWide
>>>  set the width of grc "narrowC" to tNarrow
>>>  set the width of grc "narrowB" to tNarrow
>>>  set the width of grc "wideC" to tWide
>>>  set the width of grc "wideB" to tWide
>>>  put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
>>>  put "60,286" into tBarTopLeft -- defines where the first bar is placed
>>>  put empty into tLast
>>>  put fld "2of5" into tChars -- the field with your wNnnW string
>>>  set the casesensitive to true -- to differentiate case of course
>>>  create grp "barcode2of5"
>>>  repeat for each char tChar in tChars
>>> switch tChar
>>>case "N"
>>>   -- checks the char, and clones the matching bar.
>>>   --if its the first time through, places it at astart location
>>>   -- then uses the id of the most recent bar forplacement
>>> purposes
>>>   --clone grc "narrowB"
>>>   copy grc "narrowB" to grp "barcode2of5"
>>>   if tLast is empty then
>>>  set the topleft of the last grc to tBarTopLeft
>>>   else
>>>  set the topleft of the last grc to horAdjust(tHorAdjust)
>>>   end if
>>>   break
>>>case "n"
>>>   --clone grc "narrowC"
>>>   copy grc "narrowC" to grp "barcode2of5"
>>>   if tLast is empty then
>>>  set the topleft of the last grc to tBarTopLeft
>>>   else
>>>  set the topleft of the last grc to horAdjust(tHorAdjust)
>>>   end if
>>>   break
>>>case "W"
>>>   --clone grc "wideB"
>>>   copy grc "wideB" to grp "barcode2of5"
>>>   if tLast is empty then
>>>  set the topleft of the last grc to tBarTopLeft
>>>   else
>>>  set the topleft of the last grc to horAdjust(tHorAdjust)
>>>   end if
>>>   break
>>>case "w"
>>>   --clone grc "widec"
>>>   copy grc "widec" to grp "barcode2of5"
>>>   if tLast is empty then
>>>  set the topleft of the last grc to tBarTopLeft
>>>   else
>>>  set the topleft of the last grc to horAdjust(tHorAdjust)
>>>   end if
>>>   break
>>> end switch
>>> put the short id of the last grc into tLast -- the id of the most
>>> recently placed bar
>>>  end repeat
>>>  set the height of grp "barcode2of5" to 69
>>>  set the width of grp "barcode2of5" to 360
>>> end mouseup
>>> 
>>> --This function allows a horizontal adjustment of the single bars.
>>> function horAdjust tHorAdjust
>>>  put the topright of grc id tLast into tTMP
>>>  set the itemdelimiter to ","
>>>  add tHorAdjust to item 1 of tTMP
>>>  r

Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Mark Wieder via use-livecode

On 07/20/2018 03:22 PM, Mike Bonner via use-livecode wrote:

Hey Mark (or anyone?)
Feel like writing up a widget for this (with lots of comments) as an
instructional? (Plus the fact that it'd be a very useful widget in its own
right)


Heh. I've got a UPC barcode widget, unfortunately there's no way to 
share them via revOnline or whatever. I actually started out modifying 
it to generate 2of5 barcodes as well, but the code ended up being much 
messier than the LCS version, so I stopped.


Seems to happen every time I go down the widget road. Either there's
a) a better, easier way to do it in LCS or
b) a brick wall I run into where LCB isn't up to the task.

So LCS,LCB,LCD,LSD... gotta flip a coin.

--
 Mark Wieder
 ahsoftw...@gmail.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


Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Bob Sneidar via use-livecode
Ugly is beautiful. A quality all it's own. :-)

Bob S


> On Jul 20, 2018, at 15:22 , Mike Bonner via use-livecode 
>  wrote:
> 
> BTW wow.  I toss out a short little ugly hunk of code and you all make it
> into something so much better.


___
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: drawing a Barcode without a Barcode font

2018-07-20 Thread Mike Bonner via use-livecode
Hey Mark (or anyone?)
Feel like writing up a widget for this (with lots of comments) as an
instructional? (Plus the fact that it'd be a very useful widget in its own
right)

BTW wow.  I toss out a short little ugly hunk of code and you all make it
into something so much better.

On Fri, Jul 20, 2018 at 3:08 PM Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 07/20/2018 04:31 AM, Matthias Rebbe via use-livecode wrote:
> > We tried here with iPhone and also with an USB scanner. Both devices
> scanned the code successfully.
> >
> > I have just finished a program for shipment. It fetches customer and
> invoice data from the accounting software and creates then the shipment
> labels including a Code25i barcode and a QR code. The carrier is
> Trans-o-Flex. I need to send some sample labels to their IT department.
> They will check if the labels are readable by their scanners. But i am now
> confident, that this will work on their side also.
>
> Cool. I played around with Mattias' version of Mike's excellent code a
> bit. Here's my take. Note that you really only need one graphic image to
> work with - here's how to do it with a single invisible filled rectangle
> graphic (I kept the name "narrowB"). This takes a string of numbers and
> generates the intermediate string and bar code.
>
> -- 2of5 barcode
>
> constant kBarCodeHeight = 69
> constant kBarCodeWidth = 360
> constant kInitialTopLeft = "60,286" -- defines where the first bar is
> placed
> constant kGapBetweenBars = 0
> constant kBarCodeGroupName = "barcode2of5"
>
> local sLast
> local sWideWidth
>
> on mouseUp
> local tNumberString
> local tConvertedNumberString
> local tBarWidth
>
> set the height of graphic "narrowB" to kBarCodeHeight
> put field "barcodeNumber" into tNumberString
>
> -- need a checksum as the last digit?
> -- put checksumFrom (field "barcodeNumber") after tNumberString
>
> -- calculate the expected bar widths
> put convertNumberString(tNumberString) into tConvertedNumberString
> put barWidthFrom(tConvertedNumberString) into tBarWidth
> set the width of graphic "narrowB" to tBarWidth
> put tBarWidth * 2 into sWideWidth
> makeBarCodeFrom tConvertedNumberString
> -- add the number string to the barcode if it's not already on the form
> displayBarCodeNumber
> end mouseUp
>
> function barWidthFrom pNumberString
> local tHowManyChars
> local tTestString
>
> put pNumberString into tTestString
> replace "n" with empty in tTestString
> put length (tTestString) + length (pNumberString) into tHowManyChars
> return kBarCodeWidth / tHowManyChars
> end barWidthFrom
>
> on makeBarCodeFrom pChars
> local tIsFilled
>
> lock screen
> if there is a group kBarCodeGroupName then
>delete group kBarCodeGroupName
> end if
> put empty into sLast
>
> create group kBarCodeGroupName
> set the height of group kBarCodeGroupName to kBarCodeHeight
> set the width of group kBarCodeGroupName to kBarCodeWidth
> put true into tIsFilled
> repeat for each char tChar in pChars
>copy graphic "narrowB" to group kBarCodeGroupName
>switch tChar
>   case "w"
>  set the width of the last graphic to sWideWidth
>  break
>end switch
>if tIsFilled then
>   set the visible of the last graphic to true
>end if
>put not tIsFilled into tIsFilled
>if sLast is empty then
>   set the topleft of the last graphic to kInitialTopLeft
>else
>   set the topleft of the last graphic to horAdjust(kGapBetweenBars)
>end if
>put the short id of the last graphic into sLast -- the id of the
> most recently placed bar
> end repeat
>
> unlock screen
> end makeBarCodeFrom
>
> command displayBarCodeNumber
> copy field "barCodeNumber" to group kBarCodeGroupName
> set the opaque of the last field to false
> set the showborder of the last field to false
> set the textalign of the last field to "center"
> set the top of the last field to the bottom of group kBarCodeGroupName
> set the width of the last field to the width of group kBarCodeGroupName
> set the left of the last field to item 1 of kInitialTopLeft
> end displayBarCodeNumber
>
> function horAdjust pGap
> local tGap
>
> put the topright of graphic id sLast into tGap
> set the itemdelimiter to ","
> add pGap to item 1 of tGap
> return tGap
> end horAdjust
>
> local sConversionArray
>
> command initializeConversionArray
> put "nnWWn" into sConversionArray["0"]
> put "WnnnW" into sConversionArray["1"]
> put "nWnnW" into sConversionArray["2"]
> put "WWnnn" into sConversionArray["3"]
> put "nnWnW" into sConversionArray["4"]
> put "WnWnn" into sConversionArray["5"]
> put "nWWnn" into sConversionArray["6"]
> put "nnnWW" into sConversionArray["7"]
> put "WnnWn" into sConversionArray

Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Bob Sneidar via use-livecode



> On Jul 20, 2018, at 14:08 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 07/20/2018 04:31 AM, Matthias Rebbe via use-livecode wrote:
>> We tried here with iPhone and also with an USB scanner. Both devices scanned 
>> the code successfully.
>> I have just finished a program for shipment. It fetches customer and invoice 
>> data from the accounting software and creates then the shipment labels 
>> including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I 
>> need to send some sample labels to their IT department. They will check if 
>> the labels are readable by their scanners. But i am now confident, that this 
>> will work on their side also.
> 
> Cool. I played around with Mattias' version of Mike's excellent code a bit. 
> Here's my take. Note that you really only need one graphic image to work with 
> - here's how to do it with a single invisible filled rectangle graphic (I 
> kept the name "narrowB"). This takes a string of numbers and generates the 
> intermediate string and bar code.
> 

THIS is one for the master library!

Bob S



___
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: drawing a Barcode without a Barcode font

2018-07-20 Thread Mark Wieder via use-livecode

On 07/20/2018 04:31 AM, Matthias Rebbe via use-livecode wrote:

We tried here with iPhone and also with an USB scanner. Both devices scanned 
the code successfully.

I have just finished a program for shipment. It fetches customer and invoice 
data from the accounting software and creates then the shipment labels 
including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I need 
to send some sample labels to their IT department. They will check if the 
labels are readable by their scanners. But i am now confident, that this will 
work on their side also.


Cool. I played around with Mattias' version of Mike's excellent code a 
bit. Here's my take. Note that you really only need one graphic image to 
work with - here's how to do it with a single invisible filled rectangle 
graphic (I kept the name "narrowB"). This takes a string of numbers and 
generates the intermediate string and bar code.


-- 2of5 barcode

constant kBarCodeHeight = 69
constant kBarCodeWidth = 360
constant kInitialTopLeft = "60,286" -- defines where the first bar is placed
constant kGapBetweenBars = 0
constant kBarCodeGroupName = "barcode2of5"

local sLast
local sWideWidth

on mouseUp
   local tNumberString
   local tConvertedNumberString
   local tBarWidth

   set the height of graphic "narrowB" to kBarCodeHeight
   put field "barcodeNumber" into tNumberString

   -- need a checksum as the last digit?
   -- put checksumFrom (field "barcodeNumber") after tNumberString

   -- calculate the expected bar widths
   put convertNumberString(tNumberString) into tConvertedNumberString
   put barWidthFrom(tConvertedNumberString) into tBarWidth
   set the width of graphic "narrowB" to tBarWidth
   put tBarWidth * 2 into sWideWidth
   makeBarCodeFrom tConvertedNumberString
   -- add the number string to the barcode if it's not already on the form
   displayBarCodeNumber
end mouseUp

function barWidthFrom pNumberString
   local tHowManyChars
   local tTestString

   put pNumberString into tTestString
   replace "n" with empty in tTestString
   put length (tTestString) + length (pNumberString) into tHowManyChars
   return kBarCodeWidth / tHowManyChars
end barWidthFrom

on makeBarCodeFrom pChars
   local tIsFilled

   lock screen
   if there is a group kBarCodeGroupName then
  delete group kBarCodeGroupName
   end if
   put empty into sLast

   create group kBarCodeGroupName
   set the height of group kBarCodeGroupName to kBarCodeHeight
   set the width of group kBarCodeGroupName to kBarCodeWidth
   put true into tIsFilled
   repeat for each char tChar in pChars
  copy graphic "narrowB" to group kBarCodeGroupName
  switch tChar
 case "w"
set the width of the last graphic to sWideWidth
break
  end switch
  if tIsFilled then
 set the visible of the last graphic to true
  end if
  put not tIsFilled into tIsFilled
  if sLast is empty then
 set the topleft of the last graphic to kInitialTopLeft
  else
 set the topleft of the last graphic to horAdjust(kGapBetweenBars)
  end if
  put the short id of the last graphic into sLast -- the id of the 
most recently placed bar

   end repeat

   unlock screen
end makeBarCodeFrom

command displayBarCodeNumber
   copy field "barCodeNumber" to group kBarCodeGroupName
   set the opaque of the last field to false
   set the showborder of the last field to false
   set the textalign of the last field to "center"
   set the top of the last field to the bottom of group kBarCodeGroupName
   set the width of the last field to the width of group kBarCodeGroupName
   set the left of the last field to item 1 of kInitialTopLeft
end displayBarCodeNumber

function horAdjust pGap
   local tGap

   put the topright of graphic id sLast into tGap
   set the itemdelimiter to ","
   add pGap to item 1 of tGap
   return tGap
end horAdjust

local sConversionArray

command initializeConversionArray
   put "nnWWn" into sConversionArray["0"]
   put "WnnnW" into sConversionArray["1"]
   put "nWnnW" into sConversionArray["2"]
   put "WWnnn" into sConversionArray["3"]
   put "nnWnW" into sConversionArray["4"]
   put "WnWnn" into sConversionArray["5"]
   put "nWWnn" into sConversionArray["6"]
   put "nnnWW" into sConversionArray["7"]
   put "WnnWn" into sConversionArray["8"]
   put "nWnWn" into sConversionArray["9"]
end initializeConversionArray

function convertNumberString pNumberString
   local tWidthString
   local tString1, tString2
   local x, y

   initializeConversionArray
   put "" into tWidthString -- four-bar start code
   if the number of chars in pNumberString mod 2 is 1 then
  put "0" before pNumberString
   end if
   -- need to interleave two chars at a time
   repeat with x=1 to length (pNumberString) step 2
  put sConversionArray[char x of pNumberString] into tString1
  put sConversionArray[char x+1 of pNumberString] into tString2
  repeat with y=1 to 5
 put char y of tString1 & char y of 

Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Matthias Rebbe via use-livecode
We tried here with iPhone and also with an USB scanner. Both devices scanned 
the code successfully.

I have just finished a program for shipment. It fetches customer and invoice 
data from the accounting software and creates then the shipment labels 
including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I need 
to send some sample labels to their IT department. They will check if the 
labels are readable by their scanners. But i am now confident, that this will 
work on their side also.

Thanks again.

Matthias



> Am 20.07.2018 um 11:31 schrieb Mike Bonner via use-livecode 
> :
> 
> Very cool!  Does it actually produce a code that can be scanned?
> 
> On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Mike
>> 
>> you´re awesome. That is already an almost complete solution to my
>> question. Never had expected that. Thank you very much.
>> I´ve made some little changes. One among of them is:
>> To have all the separate bars of the barcode in a group, i changed the
>> lines where the grc is cloned
>> to for examplecopy grc “narrowB” to grp “barcode2of5”
>> 
>> Here´s now my code to convert the nNnNN…. string to Barcode
>> 
>> local tLast
>> on mouseup
>>   if there is a grp "barcode2of5" then delete grp "barcode2of5"
>>   -- now change the width of the template graphics
>>   put "2" into tNarrow
>>   put "4" into tWide
>>   set the width of grc "narrowC" to tNarrow
>>   set the width of grc "narrowB" to tNarrow
>>   set the width of grc "wideC" to tWide
>>   set the width of grc "wideB" to tWide
>>   put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
>>   put "60,286" into tBarTopLeft -- defines where the first bar is placed
>>   put empty into tLast
>>   put fld "2of5" into tChars -- the field with your wNnnW string
>>   set the casesensitive to true -- to differentiate case of course
>>   create grp "barcode2of5"
>>   repeat for each char tChar in tChars
>>  switch tChar
>> case "N"
>>-- checks the char, and clones the matching bar.
>>--if its the first time through, places it at astart location
>>-- then uses the id of the most recent bar forplacement
>> purposes
>>--clone grc "narrowB"
>>copy grc "narrowB" to grp "barcode2of5"
>>if tLast is empty then
>>   set the topleft of the last grc to tBarTopLeft
>>else
>>   set the topleft of the last grc to horAdjust(tHorAdjust)
>>end if
>>break
>> case "n"
>>--clone grc "narrowC"
>>copy grc "narrowC" to grp "barcode2of5"
>>if tLast is empty then
>>   set the topleft of the last grc to tBarTopLeft
>>else
>>   set the topleft of the last grc to horAdjust(tHorAdjust)
>>end if
>>break
>> case "W"
>>--clone grc "wideB"
>>copy grc "wideB" to grp "barcode2of5"
>>if tLast is empty then
>>   set the topleft of the last grc to tBarTopLeft
>>else
>>   set the topleft of the last grc to horAdjust(tHorAdjust)
>>end if
>>break
>> case "w"
>>--clone grc "widec"
>>copy grc "widec" to grp "barcode2of5"
>>if tLast is empty then
>>   set the topleft of the last grc to tBarTopLeft
>>else
>>   set the topleft of the last grc to horAdjust(tHorAdjust)
>>end if
>>break
>>  end switch
>>  put the short id of the last grc into tLast -- the id of the most
>> recently placed bar
>>   end repeat
>>   set the height of grp "barcode2of5" to 69
>>   set the width of grp "barcode2of5" to 360
>> end mouseup
>> 
>> --This function allows a horizontal adjustment of the single bars.
>> function horAdjust tHorAdjust
>>   put the topright of grc id tLast into tTMP
>>   set the itemdelimiter to ","
>>   add tHorAdjust to item 1 of tTMP
>>   return tTMP
>> end horAdjust
>> 
>> Again, thank you very much for your help.
>> 
>> Regards,
>> 
>> Matthias
>> 
>> 
>>> Am 20.07.2018 um 01:01 schrieb Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com>:
>>> 
>>> Not sure if it will work for your purpose, but as a test I created for
>>> graphic lines, 1 narrow black, 1 wider black, duplicated them and set the
>>> blendlevel of the copies so that they're transparent.
>>> 
>>> Grcs are named narrowB, wideB, narrowC and wideC (b for black, c for
>> clear)
>>> 
>>> Then used the following code (and your example string from above with the
>>> WWnNw stuff) to generate a barcode.
>>> 
>>> on mouseup
>>>  put empty into tLast
>>>  put field 1 into tChars -- the field with your wNnnW string
>>>  set the casesensitive to true -- to differentiate case of course
>>>  repeat for each char tChar in tChars
>>> switch tChar
>>>case "N" -- 

Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Mike Bonner via use-livecode
Very cool!  Does it actually produce a code that can be scanned?

On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Mike
>
> you´re awesome. That is already an almost complete solution to my
> question. Never had expected that. Thank you very much.
> I´ve made some little changes. One among of them is:
> To have all the separate bars of the barcode in a group, i changed the
> lines where the grc is cloned
> to for examplecopy grc “narrowB” to grp “barcode2of5”
>
> Here´s now my code to convert the nNnNN…. string to Barcode
>
> local tLast
> on mouseup
>if there is a grp "barcode2of5" then delete grp "barcode2of5"
>-- now change the width of the template graphics
>put "2" into tNarrow
>put "4" into tWide
>set the width of grc "narrowC" to tNarrow
>set the width of grc "narrowB" to tNarrow
>set the width of grc "wideC" to tWide
>set the width of grc "wideB" to tWide
>put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
>put "60,286" into tBarTopLeft -- defines where the first bar is placed
>put empty into tLast
>put fld "2of5" into tChars -- the field with your wNnnW string
>set the casesensitive to true -- to differentiate case of course
>create grp "barcode2of5"
>repeat for each char tChar in tChars
>   switch tChar
>  case "N"
> -- checks the char, and clones the matching bar.
> --if its the first time through, places it at astart location
> -- then uses the id of the most recent bar forplacement
> purposes
> --clone grc "narrowB"
> copy grc "narrowB" to grp "barcode2of5"
> if tLast is empty then
>set the topleft of the last grc to tBarTopLeft
> else
>set the topleft of the last grc to horAdjust(tHorAdjust)
> end if
> break
>  case "n"
> --clone grc "narrowC"
> copy grc "narrowC" to grp "barcode2of5"
> if tLast is empty then
>set the topleft of the last grc to tBarTopLeft
> else
>set the topleft of the last grc to horAdjust(tHorAdjust)
> end if
> break
>  case "W"
> --clone grc "wideB"
> copy grc "wideB" to grp "barcode2of5"
> if tLast is empty then
>set the topleft of the last grc to tBarTopLeft
> else
>set the topleft of the last grc to horAdjust(tHorAdjust)
> end if
> break
>  case "w"
> --clone grc "widec"
> copy grc "widec" to grp "barcode2of5"
> if tLast is empty then
>set the topleft of the last grc to tBarTopLeft
> else
>set the topleft of the last grc to horAdjust(tHorAdjust)
> end if
> break
>   end switch
>   put the short id of the last grc into tLast -- the id of the most
> recently placed bar
>end repeat
>set the height of grp "barcode2of5" to 69
>set the width of grp "barcode2of5" to 360
> end mouseup
>
> --This function allows a horizontal adjustment of the single bars.
> function horAdjust tHorAdjust
>put the topright of grc id tLast into tTMP
>set the itemdelimiter to ","
>add tHorAdjust to item 1 of tTMP
>return tTMP
> end horAdjust
>
> Again, thank you very much for your help.
>
> Regards,
>
> Matthias
>
>
> > Am 20.07.2018 um 01:01 schrieb Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > Not sure if it will work for your purpose, but as a test I created for
> > graphic lines, 1 narrow black, 1 wider black, duplicated them and set the
> > blendlevel of the copies so that they're transparent.
> >
> > Grcs are named narrowB, wideB, narrowC and wideC (b for black, c for
> clear)
> >
> > Then used the following code (and your example string from above with the
> > WWnNw stuff) to generate a barcode.
> >
> > on mouseup
> >   put empty into tLast
> >   put field 1 into tChars -- the field with your wNnnW string
> >   set the casesensitive to true -- to differentiate case of course
> >   repeat for each char tChar in tChars
> >  switch tChar
> > case "N" -- checks the char, and clones the matching bar.
> >--if its the first time through, places it at a
> > start location
> >-- then uses the id of the most recent bar for
> > placement purposes
> >clone grc "narrowB"
> >if tLast is empty then
> >   set the topleft of the last grc to 10,50
> >else
> >   set the topleft of the last grc to the topright of grc id
> > tLast
> >end if
> >break
> > case "n"
> >clone grc "narrowC"
> >if tLast is empty then
> >   set the topleft of the las

Re: drawing a Barcode without a Barcode font

2018-07-20 Thread Matthias Rebbe via use-livecode
Mike

you´re awesome. That is already an almost complete solution to my question. 
Never had expected that. Thank you very much.
I´ve made some little changes. One among of them is:
To have all the separate bars of the barcode in a group, i changed the lines 
where the grc is cloned
to for examplecopy grc “narrowB” to grp “barcode2of5”

Here´s now my code to convert the nNnNN…. string to Barcode

local tLast
on mouseup
   if there is a grp "barcode2of5" then delete grp "barcode2of5"
   -- now change the width of the template graphics
   put "2" into tNarrow
   put "4" into tWide
   set the width of grc "narrowC" to tNarrow
   set the width of grc "narrowB" to tNarrow
   set the width of grc "wideC" to tWide
   set the width of grc "wideB" to tWide
   put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
   put "60,286" into tBarTopLeft -- defines where the first bar is placed
   put empty into tLast
   put fld "2of5" into tChars -- the field with your wNnnW string
   set the casesensitive to true -- to differentiate case of course
   create grp "barcode2of5"
   repeat for each char tChar in tChars
  switch tChar
 case "N"
-- checks the char, and clones the matching bar.
--if its the first time through, places it at astart location
-- then uses the id of the most recent bar forplacement purposes
--clone grc "narrowB"
copy grc "narrowB" to grp "barcode2of5"
if tLast is empty then
   set the topleft of the last grc to tBarTopLeft
else
   set the topleft of the last grc to horAdjust(tHorAdjust)
end if
break
 case "n"
--clone grc "narrowC"
copy grc "narrowC" to grp "barcode2of5"
if tLast is empty then
   set the topleft of the last grc to tBarTopLeft
else
   set the topleft of the last grc to horAdjust(tHorAdjust)
end if
break
 case "W"
--clone grc "wideB"
copy grc "wideB" to grp "barcode2of5"
if tLast is empty then
   set the topleft of the last grc to tBarTopLeft
else
   set the topleft of the last grc to horAdjust(tHorAdjust)
end if
break
 case "w"
--clone grc "widec"
copy grc "widec" to grp "barcode2of5"
if tLast is empty then
   set the topleft of the last grc to tBarTopLeft
else
   set the topleft of the last grc to horAdjust(tHorAdjust)
end if
break
  end switch
  put the short id of the last grc into tLast -- the id of the most 
recently placed bar
   end repeat
   set the height of grp "barcode2of5" to 69
   set the width of grp "barcode2of5" to 360   
end mouseup

--This function allows a horizontal adjustment of the single bars.
function horAdjust tHorAdjust
   put the topright of grc id tLast into tTMP
   set the itemdelimiter to ","
   add tHorAdjust to item 1 of tTMP
   return tTMP
end horAdjust

Again, thank you very much for your help.

Regards,

Matthias


> Am 20.07.2018 um 01:01 schrieb Mike Bonner via use-livecode 
> :
> 
> Not sure if it will work for your purpose, but as a test I created for
> graphic lines, 1 narrow black, 1 wider black, duplicated them and set the
> blendlevel of the copies so that they're transparent.
> 
> Grcs are named narrowB, wideB, narrowC and wideC (b for black, c for clear)
> 
> Then used the following code (and your example string from above with the
> WWnNw stuff) to generate a barcode.
> 
> on mouseup
>   put empty into tLast
>   put field 1 into tChars -- the field with your wNnnW string
>   set the casesensitive to true -- to differentiate case of course
>   repeat for each char tChar in tChars
>  switch tChar
> case "N" -- checks the char, and clones the matching bar.
>--if its the first time through, places it at a
> start location
>-- then uses the id of the most recent bar for
> placement purposes
>clone grc "narrowB"
>if tLast is empty then
>   set the topleft of the last grc to 10,50
>else
>   set the topleft of the last grc to the topright of grc id
> tLast
>end if
>break
> case "n"
>clone grc "narrowC"
>if tLast is empty then
>   set the topleft of the last grc to 10,50
>else
>   set the topleft of the last grc to the topright of grc id
> tLast
>end if
>break
> case "W"
>clone grc "wideB"
>if tLast is empty then
>   set the topleft of the last grc to 10,50
>else
>   set the topleft of the last grc to the topright of grc id
> tLast
>end if
>break
>

Re: drawing a Barcode without a Barcode font

2018-07-19 Thread Mike Bonner via use-livecode
Not sure if it will work for your purpose, but as a test I created for
graphic lines, 1 narrow black, 1 wider black, duplicated them and set the
blendlevel of the copies so that they're transparent.

Grcs are named narrowB, wideB, narrowC and wideC (b for black, c for clear)

Then used the following code (and your example string from above with the
WWnNw stuff) to generate a barcode.

on mouseup
   put empty into tLast
   put field 1 into tChars -- the field with your wNnnW string
   set the casesensitive to true -- to differentiate case of course
   repeat for each char tChar in tChars
  switch tChar
 case "N" -- checks the char, and clones the matching bar.
--if its the first time through, places it at a
start location
-- then uses the id of the most recent bar for
placement purposes
clone grc "narrowB"
if tLast is empty then
   set the topleft of the last grc to 10,50
else
   set the topleft of the last grc to the topright of grc id
tLast
end if
break
 case "n"
clone grc "narrowC"
if tLast is empty then
   set the topleft of the last grc to 10,50
else
   set the topleft of the last grc to the topright of grc id
tLast
end if
break
 case "W"
clone grc "wideB"
if tLast is empty then
   set the topleft of the last grc to 10,50
else
   set the topleft of the last grc to the topright of grc id
tLast
end if
break
 case "w"
clone grc "widec"
if tLast is empty then
   set the topleft of the last grc to 10,50
else
   set the topleft of the last grc to the topright of grc id
tLast
end if
break

  end switch
  put the short id of the last grc into tLast -- the id of the most
recently placed bar
   end repeat
end mouseup

Spacing and line size might need to be tweaked, but it seems like this
would be relatively straight forward.

On Thu, Jul 19, 2018 at 4:30 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I think the trick will be drawing large graphics one at a time and
> properly spaced at several times their finished size, perhaps off screen,
> then getting a snapshot of the result and scaling it down. Not sure how
> picky the readers will be.
>
> Bob S
>
>
> > On Jul 19, 2018, at 15:06 , Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Currently i am using a special 2of5i barcode font. The font .has only
> four characters (bars) in its set.
> > The code displays a
> > narrow space (blank) bar when the character is n
> > narrow black bar when N
> > wide space when w
> > wide black bar when W
>
>
> ___
> 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: drawing a Barcode without a Barcode font

2018-07-19 Thread Bob Sneidar via use-livecode
I think the trick will be drawing large graphics one at a time and properly 
spaced at several times their finished size, perhaps off screen, then getting a 
snapshot of the result and scaling it down. Not sure how picky the readers will 
be. 

Bob S


> On Jul 19, 2018, at 15:06 , Matthias Rebbe via use-livecode 
>  wrote:
> 
> Currently i am using a special 2of5i barcode font. The font .has only four 
> characters (bars) in its set.
> The code displays a
> narrow space (blank) bar when the character is n
> narrow black bar when N 
> wide space when w 
> wide black bar when W 


___
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: drawing a Barcode without a Barcode font

2018-07-19 Thread Matthias Rebbe via use-livecode
Currently i am using a special 2of5i barcode font. The font .has only four 
characters (bars) in its set.
The code displays a
narrow space (blank) bar when the character is n
narrow black bar when N 
wide space when w 
wide black bar when W 

The code can only display a pair number of digits. You cannot display a number 
with 23 digits.
So to display the number  59084850001294926452
i have to enter the 
followingNnNnWnNwWnNwNnNwNnWnWwNnNwNnWnNwWnWnNnWwNwNnNnNnWwWwNnWnNnNwNwWnNnNnWwWwNnNnNwWnWnNwNnWnNwWnNwNnWwNnWnNwNnWnWwNnNwWnNwWnNnNwWnN
into the field.  There is a special algorithm how to calculate the correct 
combination of the different bars, but that is not my problem.

 What i want is to draw the code myself without using the  font.  So that´s why 
i asked if someone already has done this.

Btw: the code for calculation the code looks like this, i case someone is 
interested

function createBarcode tBarcode

if the number of chars of tBarcode is not 24

then

answer error "Fehler beim Erzeugen des Barcodes"

exit to top

end if

put "NNWWN" into t0

put "WNNNW" into t1

put "NWNNW" into t2

put "WWNNN" into t3

put "NNWNW" into t4

put "WNWNN" into t5

put "NWWNN" into t6

put "NNNWW" into t7

put "WNNWN" into t8

put "NWNWN" into t9

put "" into tNewBarcode

repeat with i = 1 to 23 step 2

put char i to (i+1) of tBarcode into tPair

replace 1 with t1 in tPair

replace 2 with t2 in tPair

replace 3 with t3 in tPAir

replace 4 with t4 in tPair

replace 5 with t5 in tPair

replace 6 with t6 in tPair

replace 7 with t7 in tPair

replace 8 with t8 in tPair

replace 9 with t9 in tPair

replace 0 with t0 in tPair

put char 1 to 5 of tPair & toLower(char 6 to 10 of tPAir) into tPair

put "" into tNewPAir

repeat with j = 1 to 5

put char j of tPair &char j+5 of tPair after tNewPair

end repeat

put tnewPair after tNewBarcode

end repeat

return tNewBarcode
end createBarcode


Regards,

Matthias


> Am 19.07.2018 um 22:30 schrieb dunbarxx via use-livecode 
> :
> 
> Hi.
> 
> Curious.
> 
> So you are creating your own barcode, er, code? That is, you are, say,
> making three thin lines with thin spaces, and then three thick lines with
> thick spaces, and storing that pattern somewhere?
> 
> And then you read that pattern and look up what it refers to?
> 
> Craig
> 
> 
> 
> --
> Sent from: 
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
> 
> ___
> 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: drawing a Barcode without a Barcode font

2018-07-19 Thread dunbarxx via use-livecode
Hi.

Curious.

So you are creating your own barcode, er, code? That is, you are, say,
making three thin lines with thin spaces, and then three thick lines with
thick spaces, and storing that pattern somewhere?

And then you read that pattern and look up what it refers to?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
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


drawing a Barcode without a Barcode font

2018-07-19 Thread Matthias Rebbe via use-livecode
Hi,

at the moment i am using a special barcode font “2of5interleaved” to 
draw/create a Code25/2of5interleaved  barcode. 
The code itself is calcualted by script and then displayed using that barcode 
font

The font only has 4 characters  2 black bars (1one them is twice the width of 
the other) and 2 blank bars(also 1 twice the width of the other)
When printed, the smaller bars should have a width of at least  0,5mm  and the 
wider one at least 1mm. 

How would i create the bars? Should i use vertical lines or SVGs?
Did anyone have done something similar already?

Regards,
Matthias
___
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