rossati Posted June 10, 2012 Posted June 10, 2012 HelloThis is a sample for create a QR Code using the library Quricol - QR code generator library of Serhiy Perevoznyk. First we must download a package from http://users.telenet.be/ws36637/download/quricol.zip , this file contains sources and documentation for use on Pascal-Delphi system.We need only quricol32.dll (in \quricol\Binaries directory) which must be copied in an accessible directory.I have inferred use and parameters by examining the file \Quricol.Barcode\NativeMethods.cs.The script can create a QR Code in BMP and PNG format or on the screen.I apologize, but I am not be able to insert the QR code in clipboard.In the compressed file there is:- quricol32.dll- ProvaQR.au3 the script test- formhandler.au3- functions.au3These last two scripts are needed for the test, in particular formhandler.au3 is a new version of a form generator, not yet inserted in the repository because is yet in test.Best regardsJohn RossatiAutoitQRCode.zip feptiodiftVap and bfgxp 2
Zedna Posted June 10, 2012 Posted June 10, 2012 Looks nice! Just pity it's not in native AutoIt (need DLL). Anyway great and thanks for sharing. Resources UDF ResourcesEx UDF AutoIt Forum Search
jvanegmond Posted June 10, 2012 Posted June 10, 2012 (edited) Looks nice!Just pity it's not in native AutoIt (need DLL).With QR codes there is almost always a requirement for speed. Calculations are quite complex. Not something AutoIt does well. Edited June 10, 2012 by Manadar github.com/jvanegmond
TripleBook Posted October 24, 2012 Posted October 24, 2012 would LOVE to see the code behind this but the downloads are broken.
Moderators Melba23 Posted October 24, 2012 Moderators Posted October 24, 2012 (edited) TripleBook, I just tested and they both download fine for me. Anyway it looks as if you only need the final zip. M23 P.S. Welcome to the AutoIt forum, by the way. Edited October 24, 2012 by Melba23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
ptrex Posted October 24, 2012 Posted October 24, 2012 @all Modified the version so it goes to Clipboard and file as well. ( Credits go to UEZ ) expandcollapse popup; ======================================================================================= ; Title .........: QR Generator ; Description ...: Generate QR code in some formats ; Requirement(s).: Autoit 3.3.6.1 ; Author(s) .....: Giovanni Rossati (El Condor) ; Version........: 0.1.1 ; Date...........: 5 jui 2012 ; ======================================================================================= #include <Constants.au3> #Include <Array.au3> #include <WindowsConstants.au3> #include "formhandler.au3" #include "functions.au3" #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <Clipboard.au3> #include <Date.au3> ;Global $hWnd $hWnd = GUICreate("QR Code generator", 400, 300, 250, 200) $flMenu = GUICtrlCreateMenu("&File") $fineItem = GUICtrlCreateMenuItem("End", $flMenu) $helpMenu = GUICtrlCreateMenu("?") $infoItem = GUICtrlCreateMenuItem("&Info", $helpMenu) $records = "Prodotto,,20,CMTM,GIACCHE UOMO,GIACCHE UOMO|GIACCHE DONNA;" _ & "Magazzino,,15,CMTM,CUMIANA,CUMIANA|BAIA MARE;" _ & "Peso,,5,NM,2;" _ & "Data,Data reg.,10,TM," & _DateTimeFormat(_NowCalc(), 2) & ";" _ & "OutputType,Tipo di output,30,R,XML,XML|JSON;" GUISetState() $aReturn = formHandler("QR Data",$records,$hWnd) createQR($aReturn) While 1 $msg = GUIGetMsg() Switch $msg Case $infoItem MsgBox(0, "Credits", "Condor Informatique - Turin" _ & @CRLF & "Generatore codice QR" _ & @CRLF & "Version 0.1.1 7 juin 2012" _ & @CRLF & "Program developped with AutoIt3") Case $GUI_EVENT_CLOSE,$fineItem MsgBox(0,"QR Code generator","See you later alligator",2) ExitLoop EndSwitch WEnd Func createQR($a) $templXML = '<?xml version="1.0" encoding="UTF-8"?><Sermig Application="MASO">' _ & '<Scatola Prodotto="&Prodotto" Magazzino="&Magazzino" Peso="&Peso" Data="&Data" />' _ & '</Sermig>' $templJSON = '{"Sermig": { "Application" : "MASO",' _ & '"Prodotto": "&Prodotto","Magazzino": "&Magazzino","Peso": &Peso,"Data"} }' $tmpl = $templXML if TakeData($a,"OutputType") = "JSON" Then $tmpl = $templJSON For $i = 0 To UBound($a)-1 $tmpl = StringReplace($tmpl,"&" & $a[$i][0], $a[$i][1]) Next DllCall("quricol32.dll","none", "GenerateBMP","str", @ScriptDir & "\GDIPlus_Image.bmp", "str", $tmpl,"int",4,"int",2) DllCall("quricol32.dll","none", "GeneratePNG","str", @ScriptDir & "\GDIPlus_Image.png", "str", $tmpl,"int",4,"int",2) _GDIPlus_Startup() $return = DllCall("quricol32.dll","HANDLE", "GetHBitmap", "str", $tmpl,"int",4,"int",2) $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($return[0]) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd) _GDIPlus_GraphicsDrawImage($hGraphic,$hBitmap, 100, 100) _GDIPlus_ImageSaveToFile($hGraphic, @ScriptDir & "\GDIPlus_Image.bmp") ; Save bitmap to file If Not _ClipBoard_Open($hWnd) Then _WinAPI_ShowError("_ClipBoard_Open failed") If Not _ClipBoard_Empty() Then _WinAPI_ShowError("_ClipBoard_Empty failed") $hBitmap2 = _WinAPI_CopyImage(_GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap), 0, 0, 0, $LR_COPYDELETEORG + $LR_COPYRETURNORG) $iResult = _ClipBoard_SetDataEx($hBitmap2, $CF_BITMAP ) ConsoleWrite("$hBitmap2: " & $hBitmap2 & @CRLF & "$iresult: " & $iResult & @CRLF) ConsoleWrite( @CRLF) ShowData($hWnd) _ClipBoard_Close() ;_ClipBoard_SetDataEx($return[0],$CF_BITMAP) it seems not working ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hBitmap) ;_GDIPlus_ImageDispose($hImage) _WinAPI_DeleteObject($return[0]) _GDIPlus_Shutdown() ; Shut down GDI+ library Return EndFunc Func _WinAPI_CopyImage($hImage, $iType = 0, $xDesired = 0, $yDesired = 0, $iFlags = 0); from _WinAPIEx by Yashied Local $Ret = DllCall('user32.dll', 'ptr', 'CopyImage', 'ptr', $hImage, 'int', $iType, 'int', $xDesired, 'int', $yDesired, 'int', $iFlags) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) Return $Ret[0] EndFunc ;==>_WinAPI_CopyImage ; Show clipboard statistics Func ShowData($hGUI) ConsoleWrite("GUI handle ............: " & $hGUI & @CRLF) ConsoleWrite("Clipboard owner .......: " & _ClipBoard_GetOwner()& @CRLF) ConsoleWrite("Clipboard open window .: " & _ClipBoard_GetOpenWindow()& @CRLF) ConsoleWrite("Clipboard sequence ....: " & _ClipBoard_GetSequenceNumber()& @CRLF) EndFunc ;==>ShowData Enjoy !! Rgds ptrex jaberwacky 1 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
yahaosoft Posted November 11, 2012 Posted November 11, 2012 good stuff,thanks for share it! Thanksgiving...
Babbitt Posted January 29, 2013 Posted January 29, 2013 Looks not bad, and what's more, my favourite online barcode generator is awesome, worth of trying.
Myicq Posted January 29, 2013 Posted January 29, 2013 This is a nice project, and good to see developer of QR library not having abandoned the project, like so many other devs have.F.ex ErrorCorrection was added recently. Before this was hardcoded.QR codes are very complex, so there are a number of options not apparently covered by this library.Changing code pageChanging encoding format (Default / GS1 / Industrial)Enforcing symbol size, 1..40 (21x21 .. 177x177). This is auto.Mask pattern 0..7Compaction for multibyte (kanji / chinese)Structured Append codeSome of above can be done using the Mode Indicator bits (4) at start, but there does not seem to be a way to set them ?For those that are technically interested there are good links at a different related project: http://qrcodenet.codeplex.com/Yes, I do work with barcodes every day. I am just a hobby programmer, and nothing great to publish right now.
fdsfewa Posted February 17, 2013 Posted February 17, 2013 I am using this QR Code barcode generator software. It's good to use. You may treat it as a recommendation. You can also find many other barcode generators or readers there, like Java QR Code barcode reader SDK, etc.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now