Popular Post BugFix Posted May 3, 2020 Popular Post Share Posted May 3, 2020 (edited) "Once upon a time ..." than I've made the following: But now exist a new version of the "quricol.dll" for 32 and 64 bit. All parameters can be used now. In the old thread you can see, that is implemented with the help of @TheXman . Thanks for that. Then I revised the GUI and I came up with new possibilities. This has now resulted in a much more powerful tool, which is why I decided to create a new thread on this topic. There are 3 components: QRCreator.au3 This is the base UDF that need for all. You can write your own applications by using it. QRCreatorUI This is the graphical User Interface to deal with all functions of the UDF. As a special feature, you have a preview that can be enlarged. QRCreatorCI This is the Commandline Interface. With the exception of HBITMAP generation, which is not required on the command line, you can perform all functions of the UDF to generate QR codes. Here more in detail: QRCreator.au3 - functions _QR_generatePNG Generates the QR-Code as PNG file for the passed text. _QR_generateBMP Generates the QR-Code as BMP file for the passed text. _QR_getHBitmap Creates a HBITMAP handle for the QR-Code for the passed text. Don't forget to delete it, if no more need (_WinAPI_DeleteObject(HBITMAP)). _QR_copyToClipboard Copies the QR-Code picture for the passed text to the clipboard. _QR_FileDefault Generates a default filename (QR_YYYYMMDD_hhmmss) _QR_getLastCall() Asks for the result of the last call (_QR_getHBitmap/_QR_copyToClipboard/_QR_generateBMP/_QR_generatePNG) Gets a structure with: .success(1/0) .error(@error) .width .type(B/C/[F/R]) .output(hBMP/''/fullpath) .margin .sizept .corrlevel Types(.type): B (HBITMAP), C (Clipboard), F (File created), R (resized file created) The following parameters will used: $_sText The text to encode. Full unicode is supported. $_sPathOut (ONLY: _QR_generatePNG und _QR_generateBMP) The full path of the file to create. If only a filename has passed the @ScriptDir will used. Without a filename the default filename will used (QR_YYYYMMDD_hhmmss). If the filename exists, it will get a suffix (1..n) until it's unique. $_iMargin The QR-Code margin in px $_iSizePt Size of the points in the QR-Code (1-4, depends by the correction level) If a wrong value is passed, it will corrected by the script. $_iCorrLvl The used correction level (0-3). Allows to read a QR-Code if some parts damaged. $_iOutSize (ONLY: _QR_generatePNG und _QR_generateBMP) As a new feature you can pass a target size for created file. The size of the file depends by used correction level and the size of created points. If you pass a value for width (and so for heigth too), the default by the dll created file will resized for this size. If the passed size is to small it raises an error. $_iScale (ONLY: _QR_copyToClipboard) Also new is the ability to scale up the QR-Code copied to clipboard. It's a factor for linear scaling, based on the default creation size by the dll call. QRCreatorUI.au3 All information for the actions you've done will shown in the statusbar of the GUI. But this is my own statusbar, that allows formatting. I've attached them too. QRCreatorCI available command line parameters --------------------------------------------------------------------------------------------------------------- REQUIRED NEW: Passing multi-line text via command line break=Placeholder character for a line break (default is ^) Must only be set if the default value is not to be used. For single-line text that contains the default placeholder, set "break=none"! If break is set, this must always be the first parameter! text=Text for encoding OPTIONAL file=path/filename[.ext] - If ommited, the default will used: @HomeDrive & @HomePath & "\QR_YYYYMMDD_hhmmss" type=png,bmp,clip - If ommited, 'png' will used. With clip runs CopyToClipboard. or combined png/bmp If file has .ext and type is passed but is different to .ext than will used type width=int - (and height) initializes a resizing of the default created QR-Code Resizing fails, if passed size is smaller as the default generated file. REMARK: Only for file creation scale=int - Factor for up scaling the QR-Code REMARK: Only for CopyToClipboard margin=4 - The margin around the QR-Code in px (Default = 4) corrlevel=0 - Up to 7%, 15%, 25% or 30% damage [0, 1, 2, 3]. (Default = 0) sizept=2 - The size of the painted pixel itself. The value depends on the correction level. Only the smallest point size can be used for the largest correction level. The value will corrected automatically, if wrong. --------------------------------------------------------------------------------------------------------------- return values --------------------------------------------------------------------------------------------------------------- comma separated string with: ERROR=@error RESULT='FullFilePath' or 'CLIPBOARD' SIZE=width x heigth SIZEPT=The really used (may be corrected) size of point MARGIN=The used margin size CORRLEVEL=The used correction level --------------------------------------------------------------------------------------------------------------- You find all the stuff also in the function headers. So that you get an impression, here are a few pictures. Gallery QRCode.zip QRCreatorUI.au3 QRCreatorCI.au3 Edited July 16 by BugFix New version QRCreatorCI (multiline) Zedna, UEZ, Gianni and 4 others 7 Best Regards BugFix Link to comment Share on other sites More sharing options...
BugFix Posted May 5, 2020 Author Share Posted May 5, 2020 New version QRCreatorUI v 0.4 in post #1 added features The parameters for the QR code (except text!) can now be changed immediately while the preview window is open. If $ _iSizePt had to be changed (reduced), this is visually displayed. In addition to Slider and UpDown, the preview can now be resized using the mouse wheel (forward + / backward -) or mouse buttons (left + / right -) when the mouse is over the preview window. Best Regards BugFix Link to comment Share on other sites More sharing options...
water Posted May 5, 2020 Share Posted May 5, 2020 Added to the wiki My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
BugFix Posted July 16 Author Share Posted July 16 (edited) New version QRCreateCI.au3 v0.4 Multiline via command line was not recognized so far. I have now adjusted it. The default for line breaks is now a caret ^. Only if another placeholder is to be used for the break, this must be set - but then necessarily as the first parameter! e.g. QRCreatorCI break="||" text="Line 1||Line 2||Line 3" In the (possible) case that you want to output text without a line break but with the standard placeholder for line breaks (^), break=none is required (again as the first parameter)! Edited July 16 by BugFix Best Regards BugFix Link to comment Share on other sites More sharing options...
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