Jump to content

Recommended Posts

Posted

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.

 

This isn't laborious work. There is the Ocvita Barcode ActiveX Control based on zint engine. It has more than 50 1D (EAN, ISBN, Code 128 and so on) and 2D (QR Code, Datamatrix, Aztec) symbologies.

You can download from here

http://ocvita.ru/content/view/90/35/

Register OcvitaBarcode.ocx by command

regsvr32 OcvitaBarcode.ocx

BCode.au3 is my simple example how to use Ocvita Barcode ActiveX by AutoIt3

$GUI = GUICreate("OCVITA_BARCODE by AutoIt3, Valery Ivanov, 19 September, 2013", 400, 400, -1, -1)
$oBCode = ObjCreate("Ocvita.Barcode")
$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)
$oBCode.barcode = "Valery"
$oBCode.hrtext = "Valery"
GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = -3
        Exit
    EndSelect
WEnd

Enjoy!

:sweating:

The point of world view

Posted

This isn't laborious work. There is the Ocvita Barcode ActiveX Control based on zint engine. It has more than 50 1D (EAN, ISBN, Code 128 and so on) and 2D (QR Code, Datamatrix, Aztec) symbologies.

You can download from here

http://ocvita.ru/content/view/90/35/

 

Valery, огромное спасибо !

What a gem. How would I found this without you ? :)

I really feel that I miss a lot of good content hidden in Russian-speaking part of AutoIT world.

Do you know if there are more examples available for this project, and if a UDF project for it exists / has been started ? Perhaps an idea for my first UDF project.

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

Posted

Do you know if there are more examples available for this project, and if a UDF project for it exists / has been started ? Perhaps an idea for my first UDF project.

 

The second example shows subset of barcodes supported by OcvitaBarcode.ocx. Script shows index of symbology in barcode (property hrtext) and gui label. It's good idea to reset combo by the wheel of mouse, though

Global $Sym_Type_Line, $Sym_Index_Line, $Sym_Types, $Sym_Indexes
Global $oBCode, $oBCodeGUI
Global $SymIndex

InitSymTypes()

$GUI = GUICreate("OCVITA_BARCODE by AutoIt3, Valery Ivanov, 19 September, 2013", 400, 400, -1, -1)

$SymLabel = GuiCtrlCreateLabel("Symbology name:", 100, 15, 100, 20)

$Sym = GUICtrlCreateCombo("", 180, 10, 200, 20)
GUICtrlSetData(-1,$Sym_Type_Line,"BARCODE_QRCODE")

$SymIndex = GetIndexOfSym("BARCODE_QRCODE")

$SymILabel = GuiCtrlCreateLabel("Symbology index - " & $SymIndex, 100, 50, 300, 20)

$oBCode = ObjCreate("Ocvita.Barcode")
$oBCode.symbology = $SymIndex
$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)

GUISetState()
;$oBCode.AboutBox()
While 1
   $Msg = GUIGetMsg(1)
  Switch $Msg[0]
  Case -3
     Exit
  Case $Sym
     $Sym_Type = GUICtrlRead ($Sym)
     if $SymIndex <> GetIndexOfSym($Sym_Type) then
       $SymIndex = GetIndexOfSym($Sym_Type)
       GUICtrlSetData($SymILabel, "Symbology index - " & $SymIndex)
       RefreshBCode($SymIndex)
     endif
     ;set focus to combo
     GUICtrlSetState ($Sym,256)
  EndSwitch
WEnd

$oBCode = 0
GUICtrlDelete($oBCodeGUI)


;===============================
func InitSymTypes()
; API barcode types
;Local $SL = "1 BARCODE_CODE11,2 BARCODE_C25MATRIX,3 BARCODE_C25INTER,4 BARCODE_C25IATA,6 BARCODE_C25LOGIC,7 BARCODE_C25IND,8 BARCODE_CODE39,9 BARCODE_EXCODE39,13 BARCODE_EANX,16 BARCODE_EAN128,18 BARCODE_CODABAR,20 BARCODE_CODE128,21 BARCODE_DPLEIT,22 BARCODE_DPIDENT,23 BARCODE_CODE16K,24 BARCODE_CODE49,25 BARCODE_CODE93,28 BARCODE_FLAT,29 BARCODE_RSS14,30 BARCODE_RSS_LTD,31 BARCODE_RSS_EXP,32 BARCODE_TELEPEN,34 BARCODE_UPCA,37 BARCODE_UPCE,40 BARCODE_POSTNET,47 BARCODE_MSI_PLESSEY,49 BARCODE_FIM,50 BARCODE_LOGMARS,51 BARCODE_PHARMA,52 BARCODE_PZN,53 BARCODE_PHARMA_TWO,55 BARCODE_PDF417 PDF417,56 BARCODE_PDF417TRUNC,57 BARCODE_MAXICODE,58 BARCODE_QRCODE,60 BARCODE_CODE128B,63 BARCODE_AUSPOST,66 BARCODE_AUSREPLY,67 BARCODE_AUSROUTE,68 BARCODE_AUSREDIRECT,69 BARCODE_ISBNX,70 BARCODE_RM4SCC,71 BARCODE_DATAMATRIX,72 BARCODE_EAN14,75 BARCODE_NVE18,76 BARCODE_JAPANPOST,77 BARCODE_KOREAPOST,79 BARCODE_RSS14STACK,80 BARCODE_RSS14STACK_OMNI,81 BARCODE_RSS_EXPSTACK,82 BARCODE_PLANET,84 BARCODE_MICROPDF417,85 BARCODE_ONECODE,86 BARCODE_PLESSEY,87 BARCODE_TELEPEN_NUM,89 BARCODE_ITF14,90 BARCODE_KIX,92 BARCODE_AZTEC,93 BARCODE_DAFT,97 BARCODE_MICROQR,98 BARCODE_HIBC_128,99 BARCODE_HIBC_39,102 BARCODE_HIBC_DM,104 BARCODE_HIBC_QR,106 BARCODE_HIBC_PDF,108 BARCODE_HIBC_MICPDF,112 BARCODE_HIBC_AZTEC,128 BARCODE_AZRUNE,129 BARCODE_CODE32,130 BARCODE_EANX_CC,131 BARCODE_EAN128_CC,132 BARCODE_RSS14_CC,133 BARCODE_RSS_LTD_CC,134 BARCODE_RSS_EXP_CC,135 BARCODE_UPCA_CC,136 BARCODE_UPCE_CC,137 BARCODE_RSS14STACK_CC,138 BARCODE_RSS14_OMNI_CC,139 BARCODE_RSS_EXPSTACK_CC,140 BARCODE_CHANNEL,141 BARCODE_CODEONE,142 BARCODE_GRIDMATRIX"
; barcode types supported 
Local $SL = "1 BARCODE_CODE11,2 BARCODE_C25MATRIX,3 BARCODE_C25INTER,4 BARCODE_C25IATA,6 BARCODE_C25LOGIC,7 BARCODE_C25IND,8 BARCODE_CODE39,9 BARCODE_EXCODE39,13 BARCODE_EANX,20 BARCODE_CODE128,21 BARCODE_DPLEIT,22 BARCODE_DPIDENT,23 BARCODE_CODE16K,24 BARCODE_CODE49,25 BARCODE_CODE93,28 BARCODE_FLAT,29 BARCODE_RSS14,30 BARCODE_RSS_LTD,32 BARCODE_TELEPEN,34 BARCODE_UPCA,37 BARCODE_UPCE,40 BARCODE_POSTNET,47 BARCODE_MSI_PLESSEY,50 BARCODE_LOGMARS,51 BARCODE_PHARMA,52 BARCODE_PZN,53 BARCODE_PHARMA_TWO,55 BARCODE_PDF417 PDF417,56 BARCODE_PDF417TRUNC,58 BARCODE_QRCODE,60 BARCODE_CODE128B,70 BARCODE_RM4SCC,71 BARCODE_DATAMATRIX,72 BARCODE_EAN14,75 BARCODE_NVE18,76 BARCODE_JAPANPOST,77 BARCODE_KOREAPOST,79 BARCODE_RSS14STACK,80 BARCODE_RSS14STACK_OMNI,82 BARCODE_PLANET,84 BARCODE_MICROPDF417,86 BARCODE_PLESSEY,87 BARCODE_TELEPEN_NUM,89 BARCODE_ITF14,90 BARCODE_KIX,92 BARCODE_AZTEC,97 BARCODE_MICROQR,98 BARCODE_HIBC_128,99 BARCODE_HIBC_39,102 BARCODE_HIBC_DM,104 BARCODE_HIBC_QR,106 BARCODE_HIBC_PDF,108 BARCODE_HIBC_MICPDF,112 BARCODE_HIBC_AZTEC,129 BARCODE_CODE32,140 BARCODE_CHANNEL,141 BARCODE_CODEONE,142 BARCODE_GRIDMATRIX"
Local $Syms = StringSplit($SL,",")
 $Sym_Type_Line = ""
 $Sym_Index_Line = ""
 for $i = 1 to $Syms[0]
  $Parts = StringSplit($Syms[$i]," ")
  $Sym_Type_Line &= $Parts[2]& "|"
  $Sym_Index_Line &= $Parts[1]& "|"
 next
 $Sym_Type_Line = StringTrimRight($Sym_Type_Line,1)
 $Sym_Index_Line = StringTrimRight($Sym_Index_Line,1)
 $Sym_Types = StringSplit($Sym_Type_Line,"|")
 $Sym_Indexes = StringSplit($Sym_Index_Line,"|")
endfunc

;===============================
func GetIndexOfSym($Item)
 for $i = 1 to $Sym_Types[0]
  if $Item = $Sym_Types[$i] then return $Sym_Indexes[$i]
 next
 return 1
endfunc

;===============================
func RefreshBCode($NewSymIndex)
 $oBCode = 0
 GUICtrlDelete($oBCodeGUI)
 $oBCode = ObjCreate("Ocvita.Barcode")
 $oBCode.symbology = $NewSymIndex
 $oBCode.barcode = $NewSymIndex
 $oBCode.hrtext = $NewSymIndex
 $oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)
endfunc

The point of world view

  • 5 months later...
Posted (edited)

Zedna,

Thanks for putting out this UDF!  I am really excited in getting this to work, but I am having problem with the Code 128 where it does create the bar code, but I can't get my scanner to scan it.  The output field also displays different character codes. I tried creating the same code using a free online bar code creater, and the code comes out differently.  I attached a screen shot of the result.

Any help on how to troubleshoot this would be greatly appreciated!

Thanks,

HHzz

--- updated ---

I realized that I am setup with Window's default local for Chinese in "non-UTF" application (Region and Language --> Administrative, Language for Non-Unicode Program).  When I switched to "English" then it's OK.

More permanent solution would be to change "chr()" to "chrW()", which seem to work in either case.

Hope this helps someone.

- HHzz

post-36993-0-90178400-1395209571_thumb.j

Edited by hhzz
  • 4 months later...
Posted

Thank you to everyone participating in this thread.

 

Using script from post #23 AutoIt end with HardCrash #2819

It can be omitted by the appropriate writing the script.

I am in the process of creating a complete UDF file.

Best regards

mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * SciTE - Lexer for console pane

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

  • 2 weeks later...
Posted

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * SciTE - Lexer for console pane

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

  • 1 month later...
Posted

Yes, there is a workaround.

But please ask me tomorrow.

mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * SciTE - Lexer for console pane

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

Posted

I just did some small tests with the script above and I am seeing that there are some barcodes types that may crash the script. It could be because of the range of the string coded im not sure. Didn't do a workaround.

However, without having done any research, I am wondering, is there a way to decode the barcode with this dll?
My purpose of this is to make a barcode scanner for a project.

  • 1 month later...
Posted

AutID

You forget to ask.

Change this:

$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)
GUISetState()

to this:

GUISetState()
$oBCodeGUI = GUICtrlCreateObj($oBCode, 10, 110, 380, 280)

just swap this two lines.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor 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 * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

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 * SciTE - Lexer for console pane

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 * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

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 TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

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 *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"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: 2023-04-24

  • 3 years later...
Posted

Hello,

I want create the code 2 of 5 because the output image is sort, i use from 1 to 7 characters.

But when i use this UDF, i input 789 but the output is 7894, i input 7890 but the output is empty.

Anyone can help me? Thank you very much.

code 2 of 5.jpg

Posted

Look here

https://en.wikipedia.org/wiki/Interleaved_2_of_5

Quote

 

Because digits are encoded by pairs, only an even number of digits can be encoded. Typically an odd number of digits is encoded by adding a "0" as first digit, but sometimes an odd number of digits is encoded by using five narrow spaces in the last digit.[1]

A checksum can be added as last digit, which is calculated in the same way as UPC checksums.

 

 

 

  • 2 years later...
Posted
Just now, Lowus said:

Hi, Thank you Zedna for this UDF  I´m testing but get this error, What could be the problem?

>Running AU3Check (3.3.14.5)  from:C:\Program Files\AutoIt3  input:D:\FontsAutoit\barcode_test.au3
"D:\FontsAutoit\print.au3"(55,57) : error: _WinAPI_TextOut() already defined.
Func _WinAPI_TextOut($hDC, $iXStart, $iYStart, $sString)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\FontsAutoit\barcode_test.au3 - 1 error(s), 0 warning(s)
!>19:51:04 AU3Check ended. Press F4 to jump to next error.rc:2
+>19:51:04 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 3.387
 

  • 2 years later...
Posted

Hallo, 

thanks for all the work. I wanted to let everyone know of a problem I had with the display of a 25i barcode in barcode_test.au3.

It happened on a specific barcode i needed - the barcode in the label was incorrectly displayed - while printing etc all was OK. Finally I found that my barcode started with a "&" (ampersand). The complete barcode is 05185160121072706 (control character 0 not included). The string for the label is É&3T]-+ig]Ê  but the barcode displayed was É3T]-+ig]Ê the ampersand dissapeared. 

The solution was by defining the stile of the label with $SS_NOPREFIX. The hepltext for Label Styles says:

Prevents interpretation of any ampersand (&) characters in the control's text as accelerator prefix characters.
 

I added the style to the label definition and now the barcode was displayed correctly

$barcode = GUICtrlCreateLabel("", 10, 39, 580, 130,$SS_NOPREFIX)

I hope someone finds this useful 

 

Posted

for completeness, the string for the label was correctly displayed in the $Output box (GUICtrlCreateInput). Checking the styles - there seems no interpretation of the ampersand (&) in an input box. 

  • 3 months later...

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
×
×
  • Create New...