Leaderboard
Popular Content
Showing content with the highest reputation on 11/20/2021 in all areas
-
For anyone who may need it and in response to the above post, I have attached a modified version of the latest UDF that adds 3 new "helper" functions: Json_ArrayAdd(ByRef $Var, $Notation, $Data) Adds an item (String, number, object, array, or boolean) to an existing array. Json_ArrayInsert(ByRef $Var, $Notation, $Index, $Data) Inserts an array item (String, number, object, array, or boolean) at the specified index. Json_ArrayDelete(ByRef $Var, $Notation, $Range) Deletes a single item, a range of items, or multiple items, from an existing array. The syntax for $Range is the same as _ArrayDelete() since that is what it uses to delete array items. Note: Json_ArrayAdd() and Json_ArrayInsert() only allow adding or inserting a single array item (String, number, object, array, or boolean) at a time. Below are some examples using the functions and the output that's generated Output: Json(with array funcs).au32 points
-
ListView max. limits: - max 259 Chars display in subitem (Windows' limit) - max 4096 Chars stored in subitem (AutoIt's limit) - max 4096 Chars get from subitem (AutoIt's limit) $text = "ListView max. limits:" & @CRLF & _ " - max 259 Chars display in subitem (Windows' limit)" & @CRLF & _ " - max 4096 Chars stored in subitem (AutoIt's limit)" & @CRLF & _ " - max 4096 Chars get from subitem (AutoIt's limit)" #AutoIt3Wrapper_UseX64=n #include <GUIConstants.au3> #include <GuiListView.au3> $Form1 = GUICreate("ListView max. limits", 400, 400) $ListView1 = GUICtrlCreateListView("#|Value", 2, 2, 396, 296) GUICtrlCreateLabel($text, 20, 308, 376, 90) GUISetState(@SW_SHOW) Add(250, 0) Add(260, 1) Add(270, 2) Add(300, 3) Add(500, 4) Add(1000, 5) Add(2000, 6) Add(4000, 7) Add(4090, 8) Add(4100, 9) _GUICtrlListView_SetColumnWidth($ListView1, 0, 50) _GUICtrlListView_SetColumnWidth($ListView1, 1, 300) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd Func Add($n, $i) GUICtrlCreateListViewItem($n & '|' & Generate($n), $ListView1) ConsoleWrite($n & ': ' & _GUICtrlListView_GetItemText($ListView1, $i, 1) & @CRLF) EndFunc Func Generate($len) $s = '1234567890' $ret = '' For $i = 1 To $len/10 $ret &= $s Next Return $ret EndFunc MSDN: https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-lvitema In AutoIt's GUIListView UDF there is 4096 max. buffer length (for subitem text) hardcoded for all _GUICtrlListView_xxx() functions.2 points
-
Hello everyone, Today I would like to introduce ImageRE.au3 UDF, this is a UDF about ImageSearch that I just finished writing. Sincere thanks to @Danyfirex for helping me in completing this UDF. This UDF is written based on the Image Recognition Library (ImageRecognition.dll), homepage: https://www.3delite.hu/Object Pascal Developer Resources/ImageRecognitionLibrary.html Image Recognition Library (IRL) is a component for use in Win32 and Win64 (2K/XP/Vista/7/8/10) software with a purpose to provide image recognition functionality, that is compare two pictures if they are the same or similar or find a smaller picture in a bigger picture with difference tolerance. License: IRL in shareware and commercial software? You can use this component in your free programs with a freeware license. If like it and use it for shareware or commercial software (or make money with it in any way) you have to buy a shareware or commercial license. Commercial license also allows the usage of the component inside a commercial company. Features: - Loading a picture from local disk - Loading a picture from HBitmap (by _ScreenCapture_Capture, _ScreenCapture_CaptureHwnd, IR_WinCapture...) - Loading a picture from memory - Exact, relative ARGB and AHSL with alpha channel support - ColorTolerance, PixelTolerance support - Pre-process images with 6 different resamplers - Multi-threaded processing - Multiple match support - OpenCL accelerated search - Rotate search support - Stretch search support - A fully multi-threaded loading queue functionality for batch loading of pictures - A fully multi-threaded search queue functionality for batch processing with support of parallel CPU-OpenCL processing a the same time - Full unicode support - Platforms: Win32 and Win64 About ImageRE UDF: Includes 8 main functions that I have summarized from IRL, ensuring all the features that IRL brings. Some example images: Download ImageRE.au3 UDF + Examples + IRL (Size 7Mb): https://1drv.ms/u/s!AhiIbjk1VKtOfEwStW1Sp0WGR3Q I'm not very good at English. So the UDF notes and examples are mostly translated using Google Translate. So there will be explanations that are very confusing or obscure. I hope you understand. 😔1 point
-
Mini calendar... An application made in this language.
mLipok reacted to Mateocedillo for a topic
Hello, I share this open source software with you, which I was inspired a few months ago to do. It is Mini Calendar, where it allows you to multitask about the time. That is, program your schedules or routines, create alarms for a specific time, calendar and personal diary (not yet available) and possibly a clock. I recommend downloading the project from my github (more below) since it contains many changes and corrections with the Graphical User Interface (GUI), changes that are not yet in the compiled version because these compilations are already a release of a new final version. I am currently on version 0.5. In the same way, thanks to those who are going to collaborate or who have already collaborated in the software. There are very few who collaborate, but I hope there is more. Special thanks to @Danifirex for the corrections in most of the graphical interface. Source code (gitHub): https://github.com/rmcpantoja/Mini-Calendar User Manual (English): https://raw.githubusercontent.com/rmcpantoja/Mini-Calendar/main/documentation/En/Manual.txt public version: http://mateocedillo.260mb.net/MC.zip1 point -
Unfortunately I don't have the link you are looking for, but this script may generate something that (remotely) may look like what you are looking for p.s. the script is not mine, it is a translation of an old script for an Apple 2 recovered at the following link: https://www.calormen.com/jsbasic/ (select the script --> Snowflakes (Kevin Riordan)) #cs https://www.calormen.com/jsbasic/ SELECT --> Snowflakes (Kevin Riordan) 100 REM ***************************************************************** 110 REM * * 120 REM * SNOWFLAKE * 130 REM * A GRAPHICS NONSENSE FOR APPLE II * 140 REM * KEVIN RIORDAN 1985 * 150 REM * * 160 REM ***************************************************************** 170 : 180 REM THIS PROGRAM DRAWS SUCCESSIVE AND INCREASINGLY 190 REM INTRICATE SYMMETRICAL DESIGNS ON THE HIRES SCREEN. 210 REM IT RUNS IN AN ETERNAL LOOP 230 REM IT'S VERY RESTFUL TO STARE AT! 240 : #ce #include <ColorConstantS.au3> #include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> _GDIPlus_Startup() OnAutoItExitRegister("_Terminate") Global $graphheight = @DesktopHeight / 2 Global $graphwidth = $graphheight ; @DesktopWidth / 2 Global $iCX = $graphwidth / 2, $iCY = $graphheight / 2 Global $hMain, $PenColor = 0xFFFF0000 Global $hGraphics, $hPen, $hColor, $hDC, $hHBitmap, $hDC_backbuffer, $DC_obj _GraphWindow($graphwidth, $graphheight) Global $x = 3, $S = $iCX, $T = $iCY _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $graphwidth, $graphheight, $hDC_backbuffer, 0, 0, $WHITENESS) Do For $y = 0 To Int(($x - 2) / 2) fn280() Sleep(750) _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $graphwidth, $graphheight, $hDC_backbuffer, 0, 0, $WHITENESS) Next $x += 1 Until GUIGetMsg() = $GUI_EVENT_CLOSE _Terminate() Func fn280() $A1 = 2 * (22 / 7) / $x $A2 = $A1 * ($y + 1) $C = 1 / Sin((22 / 7) * ($y + 1) / $x) $D = $x $E = $y + 1 Do $D = $D - Int($D / $E) * $E $ENDLOOP = True If Abs($D) > 0.5 Then $F = $E $E = $D $D = $F $ENDLOOP = False EndIf Until $ENDLOOP $E = Int($E + 0.5) $D = $x / $E If $D - Int($D / 2) * 2 > 0.5 Then $C += Cos((22 / 7) * $E / (2 * $x)) $G = $x + 0.5 $K = $D - 0.5 For $L = 1 To Int($G) $M = 0 $N = 0 $R = ($L - 1) * $A1 For $Q = 1 To Int($K) $M += Cos($R) / $C $N += Sin($R) / $C $U = $iCX + Int($iCY * $M + 0.5) $V = $iCY + Int($iCY * $N + 0.5) _GDIPlus_GraphicsDrawLine($hGraphics, $S, $T, $U, $V, $hPen) _WinAPI_BitBlt($hDC, 0, 0, $graphwidth, $graphheight, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $S = $U $T = $V $R += $A2 Next $U = $iCX $V = $iCY _GDIPlus_GraphicsDrawLine($hGraphics, $S, $T, $U, $V, $hPen) _WinAPI_BitBlt($hDC, 0, 0, $graphwidth, $graphheight, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $S = $iCX $T = $iCY If GUIGetMsg() = $GUI_EVENT_CLOSE Then _Terminate() Next EndFunc ;==>fn280 Func _GraphWindow($graphwidth, $graphheight) $hMain = GUICreate("Spirograph", $graphwidth, $graphheight) GUISetState(@SW_SHOW, $hMain) $hDC = _WinAPI_GetDC($hMain) $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $graphwidth, $graphheight) $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hGraphics, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) $hPen = _GDIPlus_PenCreate($PenColor, 2) EndFunc ;==>_GraphWindow Func _Terminate() ; Clean up resources _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hMain, $hDC) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_PenDispose($hPen) _GDIPlus_Shutdown() GUIDelete($hMain) Exit EndFunc ;==>_Terminate1 point
-
Hello. Please next time share a runnable code. Here is an example I wrote years ago. #include <Array.au3> Global Enum $LIBUSB_SUCCESS = 0 Global $g_sLibName = @AutoItX64 ? "iLibUSB.dll" : "iLibUSB_32.dll" Global $g_hlibusb = DllOpen($g_sLibName) _Test() Func _Test() _libusb_init() Local $ahDevicesList = _libusb_get_device_list() _ArrayDisplay($ahDevicesList) _libusb_free_device_list($ahDevicesList) _libusb_exit() EndFunc ;==>_Test Func _libusb_exit($hContext = 0) DllCall($g_hlibusb, "none", "libusb_exit", "ptr", $hContext) If @error Then Return SetError(1, 0, 0) Return 1 EndFunc ;==>_libusb_exit Func _libusb_free_device_list(ByRef $ahDevicesList, $iUnref_Devices = 1) If Not IsArray($ahDevicesList) Or Not UBound($ahDevicesList) Then Return SetError(1, 0, 0) Local $hDeviceList = (UBound($ahDevicesList, 2) = 4) ? $ahDevicesList[0][0] : $ahDevicesList[0] If Not $hDeviceList Then Return SetError(1, 0, 0) Local $aCall = DllCall($g_hlibusb, "none", "libusb_free_device_list", "ptr", $hDeviceList, "int", $iUnref_Devices) If @error Then Return SetError(1, 0, 0) Return 1 EndFunc ;==>_libusb_free_device_list Func _libusb_get_device_list($hContext = 0) Local $aCall = DllCall($g_hlibusb, "int", "libusb_get_device_list", "ptr", $hContext, "ptr*", 0) If @error Or Not $aCall[0] Then Return SetError(1, 0, 0) Local $tlibusb_device_list = DllStructCreate("ptr[" & $aCall[0] & "]", $aCall[2]) Local $ahDevicesList[$aCall[0] + 1] $ahDevicesList[0] = $aCall[2] ;store libusb_device pointer For $i = 1 To $aCall[0] $ahDevicesList[$i] = DllStructGetData($tlibusb_device_list, 1, $i) Next Return $ahDevicesList EndFunc ;==>_libusb_get_device_list Func _libusb_init($bNewhContext = False) If Not $g_hlibusb Then Return SetError(1, 0, -1) Local $sParamType = ($bNewhContext) ? "ptr*" : "ptr" Local $aCall = DllCall($g_hlibusb, "int", "libusb_init", $sParamType, 0) If @error Or Not $aCall[0] = $LIBUSB_SUCCESS Then Return SetError(1, 0, 0) Return $aCall[1] EndFunc ;==>_libusb_init PD: I like your website. It's nice. Saludos1 point