Jump to content
Zedna

Barcode - UDF

Recommended Posts

Zedna

OPENBARCODES project

http://grandzebu.net/index.php?page=/informatique/codbar-en/codbar.htm

all is under GPL - GNU license , open source and completely free...

I translated original Pascal functions to PowerBuilder syntax which is very similar to AutoIt (BARCODE_powerbuilder.zip).

Now I translated all barcode functions to AutoIt syntax (barcode_autoit.zip).

BarCode UDF + example --> you must install aproppriate TTF fonts into Windows first.

barcode.au3
barcode_test.au3
print.au3
code128.ttf
code25I.ttf
code39.ttf
ean13.ttf

Available functions:

barcode_128()
barcode_ean8()
barcode_ean13()
barcode_25i()
barcode_39()

; TTF fonts must be installed in system first

#AutoIt3Wrapper_run_obfuscator=y
#Obfuscator_parameters=/so

#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

#include <print.au3>
#include <barcode.au3>

$barcode_test = GUICreate("BarCode Test", 601, 174, -1, -1)
GUICtrlCreateLabel("Input:", 11, 10, 30, 17)
$Input = GUICtrlCreateInput("", 41, 8, 120, 21)
GUICtrlCreateLabel("Output:", 171, 10, 38, 17)
$Output = GUICtrlCreateInput("", 209, 8, 120, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$print = GUICtrlCreateButton("Print", 340, 7, 39, 23)
GUICtrlCreateLabel("Type:", 387, 10, 28, 17)
$type = GUICtrlCreateCombo("", 417, 8, 91, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Code 128|EAN 8|EAN 13|Code 2 of 5 i|Code 3 of 9", "Code 128")
GUICtrlCreateLabel("Size:", 517, 10, 25, 17)
$size = GUICtrlCreateCombo("", 543, 8, 47, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "12|18|24|36|48|60|72", "48")
$barcode = GUICtrlCreateLabel("", 10, 39, 580, 130)
GUICtrlSetFont(-1, 48, 400, 0, "Code 128")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)

GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $type
            ChangeFont()
            ApplyBarcode()
        Case $size
            ChangeFont()
        Case $print
            Print()
    EndSwitch
WEnd

Func WM_COMMAND($hWinHandle, $iMsg, $wParam, $lParam)
    If _WinAPI_HiWord($wParam) = $EN_CHANGE And _WinAPI_LoWord($wParam) = $Input Then
        ApplyBarcode()
    EndIf
EndFunc

Func ChangeFont()
    Switch GUICtrlRead($type)
        Case 'Code 128'
            $font_name = 'Code 128'
        Case 'EAN 8','EAN 13'
            $font_name = 'Code EAN13'
        Case 'Code 2 of 5 i'
            $font_name = 'Code 2 of 5 interleaved'
        Case 'Code 3 of 9'
            $font_name = 'Code 3 de 9'
    EndSwitch
    GUICtrlSetFont($barcode, GUICtrlRead($size), 400, 0, $font_name)
EndFunc

Func ApplyBarcode()
    Switch GUICtrlRead($type)
        Case 'Code 128'
            $barcode_data = barcode_128(GUICtrlRead($Input))
        Case 'EAN 8'
            $barcode_data = barcode_ean8(GUICtrlRead($Input))
        Case 'EAN 13'
            $barcode_data = barcode_ean13(GUICtrlRead($Input))
        Case 'Code 2 of 5 i'
            $barcode_data = barcode_25i(GUICtrlRead($Input))
        Case 'Code 3 of 9'
            $barcode_data = barcode_39(GUICtrlRead($Input))
    EndSwitch
    GUICtrlSetData($Output, $barcode_data)
    GUICtrlSetData($barcode, $barcode_data)
EndFunc

; print given text on default printer in given size by all available barcode types
Func Print()
    $sPrinter = _GetDefaultPrinter()
    If $sPrinter = "" Then Return

    $hPrintDC = _WinAPI_CreateDC("winspool", $sPrinter)
    _InitPrinter($hPrintDC, "Printing Barcodes from AutoIt") ; print job name

    $hFont = _CreateFont_Simple('Arial', 12, $FW_BOLD)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 500, 'Input data: ' & GUICtrlRead($Input), 0xFF0000)
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Courier', 10, $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _WinAPI_SetTextColor($hPrintDC, 0x000000)
    _TextOut_Centered($hPrintDC, 1400, 'Code 128')
    _TextOut_Centered($hPrintDC, 2400, 'EAN 8')
    _TextOut_Centered($hPrintDC, 3400, 'EAN 13')
    _TextOut_Centered($hPrintDC, 4400, 'Code 2 of 5 i')
    _TextOut_Centered($hPrintDC, 5400, 'Code 3 of 9')
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Code 128', GUICtrlRead($size), $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 1500, barcode_128(GUICtrlRead($Input)))
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Code EAN13', GUICtrlRead($size), $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 2500, barcode_ean8(GUICtrlRead($Input)))
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Code EAN13', GUICtrlRead($size), $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 3500, barcode_ean13(GUICtrlRead($Input)))
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Code 2 of 5 interleaved', GUICtrlRead($size), $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 4500, barcode_25i(GUICtrlRead($Input)))
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    $hFont = _CreateFont_Simple('Code 3 de 9', GUICtrlRead($size), $FW_NORMAL)
    $hFontOld = _WinAPI_SelectObject($hPrintDC, $hFont)
    _TextOut_Centered($hPrintDC, 5500, barcode_39(GUICtrlRead($Input)))
    _WinAPI_SelectObject($hPrintDC, $hFontOld)
    _WinAPI_DeleteObject($hFont)

    _DeInitPrinter($hPrintDC)
EndFunc

History:

2012-06-01 - only Code 128 translated

2012-06-03 - all functions translated

2012-06-04 - added Print + some inner optimizations

Original idea comes from this topic:

Previous downloads (AutoIt): 31

BARCODE_powerbuilder.zip

post-6483-0-02548300-1338846560_thumb.pn

barcode_autoit.zip

Printing Barcodes from AutoIt.pdf

Edited by Zedna
  • Like 3

Share this post


Link to post
Share on other sites
autoall

Great work!

Share this post


Link to post
Share on other sites
Zedna

New version:

- all functions translated to AutoIt

Available functions:

barcode_128()
barcode_ean8()
barcode_ean13()
barcode_25i()
barcode_39()

See first post.

Edited by Zedna

Share this post


Link to post
Share on other sites
Zedna

New version:

2012-06-04 - added Print + some inner optimizations

EDIT:

I tested it also with Barcode scanner in my work (only Code 128)

and it seems there is some problem on Windows7 64bit in GUI with font.

There are 3 bars at begin which shouldn't be there.

So when I do Screenshot of GUI with barcode on label and print this screenshot then scanner can't read it.

But when I print it by TextOut API (see Print() in my example) with the same font and the same data value

then output barcode on printer/paper is OK and can be read by scanner.

At home on my WindowsXP this bug doesn't occur.

So it may be some bug in TTF font on 64bit systems

or it can be bug in AutoIt in GUICtrlSetFont() only on 64bit systems

or it can be bug in AutoIt in GUICtrlSetData() only on 64bit systems

or something else ...

I will do more tests of this bug later.

Edited by Zedna

Share this post


Link to post
Share on other sites
Alexisss

i am trying to print with a zebra lp2824 printer, but when i press print button, it just print an empty label. but using a normal printer, it print a complete A4 page with the input entered and the respective barcode.

what could i do to print just the barcode on the zebra lp2824 printer.??

thank you!!!

@zedna

Zedna

Edited by Alexisss

Share this post


Link to post
Share on other sites
llewxam

Just my 2 pence - I dislike barcode fonts and prefer to manually code them. Attached is how I devised Code39 by using Wiki's table "Code Details", which saved me a huge amount of work. AFAIK there is no "limitation" to how long a Code39 can be, I capped it in my script to 16 characters because I use _ScreenCapture_CaptureWnd to grab a JPG which is used on address label sheets, so if anyone re-uses this make sure those dimensions will work for you.

Enjoy

Ian

PS @ Alexisss:

What happens if you try to print anything at all to the Zebra? Will it print plain text from Notepad? I've fixed plenty of Zebras but have never owned one to experiment.

Stripped Down Code39 Demo.au3


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites
Alexisss

PS @ Alexisss:

What happens if you try to print anything at all to the Zebra? Will it print plain text from Notepad? I've fixed plenty of Zebras but have never owned one to experiment.

i just try to print a text plain from note pad, so it print a blank label!!!!

there is noy way to modify the barcode udr to print on a zebra printer??, i am using a 2 inch per 1 inch label

Share this post


Link to post
Share on other sites
FireFox

Nice UDF, 5*

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Jemboy

Hi Zedna,

I succesfully converted your example to print text and barcodes on a label(printer).

However for every new labelsize, I need to manually change the default papersize (via Printerproberties, General Tab, Preferences)

to print correctly.

I have analyzed your print.au3 and search with Google to find a way to send the papersize automatically before printing the label,

however I am over my head with DLLs and commands like DLLStructdata .

Could you (or other forummembers) help me out with changing the papersize (and printing orientation) ?

TIA, Jemboy

Share this post


Link to post
Share on other sites
FireFox

Hi,

Have you tried to change the size value at the line 84 (from print.au3) ?

DllStructSetData($tDOCINFO, "Size", 20)

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Jemboy

Hi FireFox thanks for helping me find a solution.

I know "assumption is the mother of all f**kups", but I assume this size is more the size of the $tDOCINFO- "record" used (like a memory reservation.)

If it has something to do with the papersize, I think it's overwritten by the default papersize, input at the properties/preference of the Windows printer.

Also the value "20" isn't documented, is it A4, Letter size?

I have to little knowledge of DLL-archicture (shiver) to find find out.

Share this post


Link to post
Share on other sites
FireFox

Well then you can't set it with the current UDF functions.

Edit: Have you tried to automate the "change paper size" part ?

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
lishsewewe

Can this barcode site be helpful? <snip>

Edited by Melba23
Removed URL

Share this post


Link to post
Share on other sites
Melba23

lishsewewe,

We do not accept adverts for payware apps. :naughty:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
mLipok

strange

I have a problem to run

"barcode_test.au3"

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "L:TOOLsMacro  TESTbarcode_autoitprint.au3" /UserParams    

+>13:02:49 Starting AutoIt3Wrapper v.2.1.2.28 SciTE v.3.3.2.0 ;  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.9.19)  from:C:Program Files (x86)AutoIt3Beta
"L:TOOLsMacro  TESTbarcode_autoitprint.au3"(75,75) : warning: $__WINAPCONSTANT_LOGPIXELSY: possibly used before declaration.
$PixelsPerInchY = _WinAPI_GetDeviceCaps($hDC, $__WINAPCONSTANT_LOGPIXELSY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"L:TOOLsMacro  TESTbarcode_autoitprint.au3"(77,75) : warning: $__WINAPCONSTANT_LOGPIXELSX: possibly used before declaration.
$PixelsPerInchX = _WinAPI_GetDeviceCaps($hDC, $__WINAPCONSTANT_LOGPIXELSX)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"L:TOOLsMacro  TESTbarcode_autoitprint.au3"(75,75) : error: $__WINAPCONSTANT_LOGPIXELSY: undeclared global variable.
$PixelsPerInchY = _WinAPI_GetDeviceCaps($hDC, $__WINAPCONSTANT_LOGPIXELSY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"L:TOOLsMacro  TESTbarcode_autoitprint.au3"(77,75) : error: $__WINAPCONSTANT_LOGPIXELSX: undeclared global variable.
$PixelsPerInchX = _WinAPI_GetDeviceCaps($hDC, $__WINAPCONSTANT_LOGPIXELSX)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
L:TOOLsMacro  TESTbarcode_autoitprint.au3 - 2 error(s), 2 warning(s)
!>13:02:49 AU3Check ended. Press F4 to jump to next error.rc:2
>Exit code: 2    Time: 1.155

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-31

Share this post


Link to post
Share on other sites
Zedna

strange

I have a problem to run

"barcode_test.au3"

 

I use old AutoIt 3.2.12.1 where these constants are declared in standard WinAPI UDF

Global Const $__WINAPCONSTANT_LOGPIXELSX = 88
Global Const $__WINAPCONSTANT_LOGPIXELSY = 90

Just add these two lines of code to the top of print.au3 and it should work for you also with new version of AutoIt.

 

Share this post


Link to post
Share on other sites
mLipok

thanks

now its works ..... nice


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-31

Share this post


Link to post
Share on other sites
cetipabo

Hello,

looks like the site http://grandzebu.net/informatique/codbar-en/code128.htm updated the code128.ttf font to V2.00 :
 

 

Version 2.00 of the font : The code of characters 95 and following was modified compared to the version 1.00. The encoding function was modified consequently.

 

Unfortunately this new font is not compatible with the actual code, the code need to be updated to use it.

Edited by cetipabo

Share this post


Link to post
Share on other sites
Myicq

While this is all nice work, why don't someone port the functions of the free library Zint ?  There is a Delphi Wrapper here. There is both an exe and DLL option. My skills are not enough to port the Delphi code, unfortunately.

But you get almost all barcodes at once, even the most exotic ones. And putting Zint DLL into a zintbarcode.udf  would allow all applications to use barcodes for many projects.

Just my 2c. And it's not advertising for commercialware. Zint is opensourced.


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • willichan
      By willichan
      As I have time, I am converting my old barcode generators from old Pascal source to AutoIt.  I will add them all here as I convert them, rather than creating a new topic for each one.
      There are no global variables involved, so you can safely include any of these without worry about variables being stomped on.
      No barcode fonts required.
      Code128Auto - Creates a Code128A/B/C optimized barcode from supplied data
      Code39 - Creates a Code39 or Code39Extended (with or without check-character) barcode from supplied data (also known as Code 3 of 9).
      CODABAR - Creates a CODABAR barcode from supplied data (used mainly by libraries and blood banks)
      NOTE:  These will require the StringSize UDF by Melba23
      ==========
      CodeQR - Creates a QRcode from supplied data.
    • corgano
      By corgano
      I have seen many different threads about generating barcodes, displaying them, and printing them. However at this point I am completely torn with which method to use. I am making a software that lets the user scan items, enter in information and save it in a SQLite database. For my purposes, I want to be able to display the barcode with number underneath in a similar way to most other controls eg GuiCtrlCreateBarcode( barcodenumber, x, y, width, height ). I also want to be able to print the barcode and have it be readable by the same scanner - The most successful encoding I've found is code128. Here is what I have found so far:
      This thread has nice code that saves the output as images Printing is easy and scans properly Displaying the image on a pic control makes it easy to set it's x/y/width/height
      But.. The code does not let you directly specify the width / height, so displayed image on GUI is ALWAYS skewed. Getting output images the right size with that code is very difficult I cannot find any examples of drawing barcodes to an image that let you specify width / height This example  Several threads use Static controls Look very nice on GUI, easy to get explicit position and size
      But... I know of no way to turn a bunch of static controls into something printable I didn't find any examples that had numbers at the bottom of the barcode The third solution I found was using a barcode font Can look nice, depending on font Shouldn't be hard to print
      But.. Depends on additional font being installed Some fonts don't scan correctly How do you specify a width / height of an area you want the barcode to fill when using a font? I'm really at a loss as to how to move forward. Maybe there's an example I missed that is better suited to what I could find? PErhaps someone has experience writing barcode scanning / generating / printing software and can share the experiences. Can someone bounce a few ideas back and forth with me on the best way to proceed?
       
    • willichan
      By willichan
      Requires quricol32.dll from http://delphi32.blogspot.it/2011/11/quricol-qr-code-generator-library.html
      Lots of similar implementations, but this one fits with my other barcode libraries.
    • willichan
      By willichan
      Creates a Code39 or Code39Extended (with or without check-character) barcode from supplied data
    • willichan
      By willichan
      Creates a Code128A/B/C optimized barcode from supplied data
×