Leaderboard
Popular Content
Showing content with the highest reputation on 03/26/2022 in all areas
-
Minesweeper
pixelsearch and one other reacted to MattyD for a topic
Hi all, There's not really too much to say here - Just my take on a classic for anyone who's looking for something to disect. Enjoy! minesweeper.au32 points -
Version 6.1.3.1
3,483 downloads
This file is the source code for zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player. I made this to suit my purpose and you can tweak it to your taste. zPlayer is powered by winmm.dll which is an integral part of Windows. This player has the following features: - No 3rd party dependencies. This player is made with Windows components and standard AutoIt UDFs only - Play back all formats of digital media files as far as proper codecs are installed in the computer - Video window is independent of other windows. Minimal GUI for music - Can load files, folders or an audio CD for playback - Playlists are automatically generated in sorted and shuffled orders and saved in the folder - Playlist is hidden by default, availbable when desired - Context menus available: Play this file, File properties, Search internet, Go to this folder, Remove from playlist - A double-click on any item plays that item - Search strings in the playlist - Forward, backward, pause, change folder - A-B repeat, current file repeat and multiple-file repeat functions - Increase/decrease/mute program sound volume. Synchronized with Windows Volume Mixer - Save play-back environment when terminating a session and resume that environment in the next session - 'Resume playback' option for a file left off in the middle of playback. Audio fade-in when playback is resumed - Hotkeys available for most of the functions - Very small footprint: very low CPU and memory usage The script is set to run or compile in x64 mode. You can change this setting by commenting out #AutoIt3Wrapper_UseX64=Y. zPlayer.exe, attached hereto, was compiled in x64 mode and is not flagged by Windows Defender as malicious. If you compile the script to an x86 file, the resulting zPlayer.exe will most probably be falsely flagged by Windows Defender as malicious. If you find an error, please download the latest version as most probably the error may have been corrected already. Otherwise I would appreciate it very much if you could kindly let me know. The download section includes zPlayer-NoUI.au3. This is an abbreviated version of zPlayer, which is a music player controlled by hotkeys only, without a GUI. Note: zPlayer is the name I used when I introduced the early version of this player in my blog in 2009 and has nothing to do with the mobile media player of the same name which started marketing in 2015.1 point -
After the opencv udf, Dlib seems to be a missing library for image processing. This UDF provides a way to use dlib in AutoIt The usage is similar to the python usage of dlib Prerequisites Download and extract autoit-dlib-19.24.4-opencv-4.10.0-com-v1.4.3.7z into a folder Sources Here Documentation A generated documentation for functions is available here Examples More examples can be found here To run them, please follow these instructions Face detection #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> #include "autoit-dlib-com\udf\dlib_udf_utils.au3" _Dlib_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-dlib-com\autoit_dlib_com-19.24-470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local Const $dlib = _Dlib_get() If Not IsObj($dlib) Then Return Local $detector = $dlib.get_frontal_face_detector() Local $win = _Dlib_ObjCreate("image_window") Local $image_path = _Dlib_FindFile("examples\faces\2008_002470.jpg") Local $img = $dlib.load_rgb_image($image_path) $win.set_image($img) ; The 1 in the second argument indicates that we should upsample the image ; 1 time. This will make everything bigger and allow us to detect more ; faces. Local $dets = $detector.call($img, 1) ConsoleWrite("Number of faces detected: " & UBound($dets) & @CRLF) Local $d For $i = 0 To UBound($dets) - 1 $d = $dets[$i] ConsoleWrite(StringFormat("Detection %d: Left: %d Top: %d Right: %d Bottom: %d", _ $i, $d.left(), $d.top(), $d.right(), $d.bottom()) & @CRLF) Next $win.add_overlay($dets) hit_to_continue() EndFunc ;==>Example Func hit_to_continue() ToolTip("Hit ESC to continue", 0, 0) ConsoleWrite("Hit ESC to continue" & @CRLF) Do Sleep(50) Until _IsPressed("1B") EndFunc ;==>hit_to_continue Func _OnAutoItExit() _Dlib_Close() EndFunc ;==>_OnAutoItExit Camera face detection using opencv First, download the opencv UDF from here #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> #include "autoit-dlib-com\udf\dlib_udf_utils.au3" #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _Dlib_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-dlib-com\autoit_dlib_com-19.24-470.dll") _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local Const $dlib = _Dlib_get() If Not IsObj($dlib) Then Return Local Const $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $detector = $dlib.get_frontal_face_detector() Local $cam = _OpenCV_ObjCreate("VideoCapture").create(0) Local $color_green = _OpenCV_Tuple(0, 255, 0) Local $line_width = 3 Local $img, $dets, $det While True If $cam.read() Then $img = $cv.extended[1] $dets = $detector.call($img) For $i = 0 To UBound($dets) - 1 $det = $dets[$i] $cv.rectangle($img, _OpenCV_Tuple($det.left(), $det.top()), _OpenCV_Tuple($det.right(), $det.bottom()), $color_green, $line_width) Next ;; Flip the image horizontally to give the mirror impression $cv.imshow("my webcam", $cv.flip($img, 1)) EndIf If _IsPressed("1B") Then ExitLoop ; esc to quit EndIf Sleep(1) WEnd $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() _Dlib_Close() EndFunc ;==>_OnAutoItExit1 point
-
Note: This is the continuation thread from the original one of 2012. The old one growed over 50 pages...so to make the overview better i created a new main thread for the ISN AutoIt Studio. You can find the old original thread here. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system and a lot more features!! Here are some screenshots: Here are some higlights: Easy to create/manage/public your AutoIt projects! Integrated GUI-Editor (ISN Form Studio 2) Integrated file & projectmanager Auto backupfunction for your Projects Extendable with plugins! Available in several languages Trophies Syntax highlighting /Autocomplete / Intelisense Macros Changelog manager for your project Detailed overview of the project (total working hours, total size...) Am integrated To-Do List for your project Open Source (You can download the source code from my website) And much much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: Link For more information visit my Homepage: https://www.isnetwork.at So, have fun with the ISN AutoIt Studio! And feel free to post your feedback, bugreports or ideas for this project here in this thread!1 point
-
Minesweeper
Exit reacted to argumentum for a topic
Global $sSettingsFile = StringTrimRight(@ScriptFullPath, 4) & ".ini"1 point -
you just need to add $FC_OVERWRITE into DirCopy Func: #include <FileConstants.au3> DirCopy(".\foldertoCopy", "C:\folders\folderDestination",$FC_OVERWRITE)1 point
-
Found it. Lost my work window till tomorrow.1 point
-
Active Directory UDF - Help & Support (III)
DonChunior reacted to water for a topic
& stands for AND | stands for OR You are looking for groups whose name start with APZ_ OR APPL_ OR CPZ_PRD_. The syntax gets a bit more complex now: "(&(objectcategory=group)(|(name=APPL_*)(name=APZ_*)(name=CPZ_PRD_*)))" See "Nested Operation" on the SelfADSI page.1 point -
On first sight I would not know if that commandid is somewhere easy to retrieve with uia. never had the need as i normally click or invoke a button that is found either by name or index1 point
-
File Sequence UDF
ShakibHasan reacted to jmon for a topic
FileSequence UDF My job requires me everyday to work with a LOT of file sequences, mostly image file sequences. So I created this UDF. I use it to batch convert image sequences to quicktimes, resize, rename, move, backup, count total frames ...etc... I use it for image scanning, but you can use it for any files numbered. Just type in the extention you need. In this UDF, I consider a file sequence to be of more than 3 consecutive files. Example: C:FolderImageSequence_001.tga C:FolderImageSequence_002.tga C:FolderImageSequence_003.tga .... --> C:FolderImageSequence_###.tga Example: If you scan this folder : "C:Folder", looking for extentions like "jpg tga mov", then the function may return an array like this: $array[0] = 3 $array[1] = C:FolderImageSequence_#####.tga $array[2] = C:FolderImageSequence_Converted_####.jpg $array[3] = C:FolderSubFolderquicktime movies ###.mov") You can convert the returned file sequence to format %0id or wildcard with the provided functions: C:FolderImageSequence_###.tga --> C:FolderImageSequence_%03d.tga --> C:FolderImageSequence_***.tga C:FolderImageSequence_######.tga --> C:FolderImageSequence_%06d.tga --> C:FolderImageSequence_******.tga This UDF is a relatively fast folder scanning UDF, scanning ~40 GB with about 100 file sequences (~5000 images) and gathering all the informations (Sequence length, Sequence Range, Dimensions, FileSize ...) takes about 6-7 seconds on my computer. Remark: parts of this UDF require IrfanView, which you can download for free on their website (www.irfanview.com). I am currently converting this part of the UDF to use the FreeImage UDF instead. The UDF also uses "Array.au3" and "GDIPlus.au3". Functions: _FileSequence_Convert (uses IrfanView) _FileSequence_Copy _FileSequence_Delete _FileSequence_Exists _FileSequence_Find (Main function) _FileSequence_FSToRegExp _FileSequence_FSToWildcard _FileSequence_GetFileName _FileSequence_GetImageDimensions _FileSequence_GetParentFolder _FileSequence_GetRange _FileSequence_GetSize _FileSequence_Move _FileSequence_Rename _FileSequence_Resize (uses IrfanView) If you see anything that could be improved, please tell me, I'd be happy to make it even faster! Comments and critics welcome! Tell me what you use it for, I am curious! File_Sequence.au3 File_Sequence_ExampleSimple.au3 File_Sequence_ExampleAdvanced.au31 point -
Hi Räuber @Hotzenplotz try this: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WinAPIConstants.au3> #include <WinAPISysWin.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global Const $SC_DRAGMOVE = 0xF012 $hSplashlogo = _GDIPlus_ImageLoadFromFile("C:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png") $iw = _GDIPlus_ImageGetWidth($hSplashlogo) $ih = _GDIPlus_ImageGetHeight($hSplashlogo) $SplashGUIlogo = GUICreate("", $iw, $ih, -1, -1, $WS_POPUP, $WS_EX_LAYERED) _SetBitmap($SplashGUIlogo, $hSplashlogo, 255, $iw, $ih) $hGUI_c = GUICreate("Test", $iw, $ih, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $SplashGUIlogo) GUISetBkColor(0x123456, $hGUI_c) _WinAPI_SetLayeredWindowAttributes($hGUI_c, 0x123456) $idComboBox = GUICtrlCreateCombo("Item 1", $iw / 2 - 35, 20, 50, 20) GUICtrlSetData($idComboBox, "Item 2|Exit", "Item 2") $idButton_Close = GUICtrlCreateButton("X", $iw / 2 - 30, $ih - 60, 35, 25) $idLabel = GUICtrlCreateLabel("Test GUI", 0, $ih / 2 - 15, $iw - 20, 20, BitOR($SS_CENTER, $SS_CENTERIMAGE, $SS_SUNKEN)) GUICtrlSetBkColor(-1, 0x404040) GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOWNA, $SplashGUIlogo) GUISetState(@SW_SHOW, $hGUI_c) GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idButton_Close ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) If $sComboRead = "Exit" Then ExitLoop EndSwitch WEnd GUIDelete($hGUI_c) GUIDelete($SplashGUIlogo) _GDIPlus_ImageDispose($hSplashlogo) _GDIPlus_Shutdown() Exit Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) _SendMessage($SplashGUIlogo, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndFunc ;==>_WM_LBUTTONDOWN Func _SetBitmap($hGUI, $hImage, $iOpacity, $n_width = 200, $n_height = 200) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $n_width) DllStructSetData($tSize, "Y", $n_height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>_SetBitmap Should look like this:1 point
-
Just check out this link: http://www.mediafire.com/file/7y07a02epruem4e/_GDIPlus_BitmapApplyFilter_FB_Examples_build_2020-11-16.7z/file Within this package you should find all needed files including some FB examples. Here the Autoit UDF for it: ;IMPORTANT: You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name! ;Distributing copies of this UDF incl. _GDIPlus_BitmapApplyFilter.dll in compiled format (exe) must be free of any fee! ; ;coded by UEZ build 2020-11-16 beta ; #include-once #include <GDIPlus.au3> Global $__hDLL__FX__ Global Enum $EMBOSS1 = 1, $EMBOSS2, $EMBOSS3, $EMBOSS4, $SHARPEN1, $BOX_BLUR, $GAUSSIAN_BLUR, $TRIANGLE_BLUR, $UNSHARP, $UNSHARP5x5, _ $EDGE_DETECTION1, $EDGE_DETECTION2, $EDGE_DETECTION3, $EDGE_DETECTION4, $EDGE_DETECTION5, $EDGE_DETECTION6, _ $ANOTHER_BLUR, $MOTION_BLUR, $SHARPEN2, $SOBEL, $LAPLACE3x3_1, $LAPLACE3x3_2, $LAPLACE5x5, $PREWITT, $KIRSCH, _ $OUTLINE3X3, $GAUSSIAN5X5_1, $GAUSSIAN5X5_2, $LAPLACIANOFGAUSSIAN, $SOVELVSPREWITT, $GAUSSIAN3X3 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Open ; Description ...: Initialises the DLL and starts GDIPlus ; Syntax ........: _GDIPlus_BitmapApplyFilter_Open([$sPath = @ScriptDir & "\_GDIPlus_BitmapApplyFilter.dll"]) ; Parameters ....: $sPath - [optional] a string value. Default is @ScriptDir & "\_GDIPlus_BitmapApplyFilter.dll". ; Return values .: A dll "handle". ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Open($sPath = @ScriptDir & "\_GDIPlus_BitmapApplyFilter.dll") _GDIPlus_Startup() If @error Then Return SetError(1, 0, 0) If Not FileExists($sPath) Then Return SetError(2, 0, 0) $__hDLL__FX__ = DllOpen($sPath) If $__hDLL__FX__ = -1 Then Return SetError(3, 0, 0) Return $__hDLL__FX__ EndFunc ;==>_GDIPlus_BitmapApplyFilter_Open ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Close ; Description ...: Shut down GDIPlus and close the DLL handle. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Close() ; Parameters ....: ; Return values .: None ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Close() DllClose($__hDLL__FX__) _GDIPlus_Shutdown() Return 1 EndFunc ;==>_GDIPlus_BitmapApplyFilter_Close ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Ver ; Description ...: Displays the version information about the _GDIPlus_BitmapApplyFilter.dll in a MessageBox. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Ver() ; Parameters ....: None ; Return values .: None ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Ver() DllCall($__hDLL__FX__, "none", "Ver") Return 1 EndFunc ;==>_GDIPlus_BitmapApplyFilter_Ver ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour ; Description ...: A smoothing (noise reduction) filter. The SNN smoothing filter is designed to preserve edges in data and ; is very effective at noise reduction. ; Syntax ........: _GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour($hImage, $fRadius[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fRadius - a floating point value. The higher the value the more time will needed for calculation. ; The value is limited between 1 and 25. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will ; be returned, otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour($hImage, $fRadius, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour", "ptr", $hImage, "float", $fRadius, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_SymmetricNearestNeighbour ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Jitter ; Description ...: Jitters the image ; Syntax ........: _GDIPlus_BitmapApplyFilter_Jitter($hImage, $iAmount[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iAmount - an integer value. The amount of jitter strength the image will be modified. ; The higher the value the more the image will be jittered. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Jitter($hImage, $iAmount, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Jitter", "ptr", $hImage, "uint", $iAmount, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Jitter ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Median ; Description ...: A smoothing (noise reduction) filter. The median filter is well known as an edge-preserving smoothing filter. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Median($hImage, $fRadius[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fRadius - a floating point value. The higher the value the more time will needed for calculation. ; The value is limited between 1 and 25. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Median($hImage, $fRadius, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Median", "ptr", $hImage, "float", $fRadius, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Median ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Median2 ; Description ...: A smoothing (noise reduction) filter. The median filter is well known as an edge-preserving smoothing filter. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Median2($hImage, $fRadius[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fRadius - a floating point value. The higher the value the more time will needed for calculation. ; The value is limited between 1 and 25. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: This filter is faster than _GDIPlus_BitmapApplyFilter_Median but the output quality is lower! ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Median2($hImage, $fRadius, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Median2", "ptr", $hImage, "float", $fRadius, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Median2 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Kuwahara ; Description ...: A smoothing (noise reduction) filter. Like the SNN filter, the Kuwahara filter is an adaptive, edge-preserving ; smoothing filter. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Kuwahara($hImage, $iSize[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iSize - an integer value. The higher the value the more time will needed for calculation. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Kuwahara($hImage, $iSize, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Kuwahara", "ptr", $hImage, "uint", $iSize, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Kuwahara ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Edges ; Description ...: An edge detecting function based on left neighbour color value. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Edges($hImage, $bMode[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iMode - an integer value. If 1 then the colors will be negated. ; $bInverse - [optional] a boolean value. Default is False. If true image will be inverted. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Edges($hImage, $iMode, $bInverse = False, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Edges", "ptr", $hImage, "uByte", $iMode, "bool", $bInverse, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Edges ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Pointillism ; Description ...: Creates an image based on filled ellipses. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Pointillism($hImage, $iRounds, $iSizeEllipse, $iAlpha[, $bBorder = False[, ; $bGDI_Bmp = False]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iRounds - an integer value. The amount of drawn filled ellipses. ; $iSizeEllipse - an integer value. The size of the ellipses. ; $iAlpha - an integer value. Alpha color channel. Possible values are between 0 and 255 whereas ; 0 is transparent and 255 is opaque. ; $bBorder - [optional] a boolean value. Default is False. If true ellipses will have borders. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Pointillism($hImage, $iRounds, $iSizeEllipse, $iAlpha, $bBorder = False, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Pointillism", "ptr", $hImage, "uint", $iRounds, "uint", $iSizeEllipse, "byte", $iAlpha, "bool", $bBorder, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Pointillism ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Linellism ; Description ...: Creates an image based on filled rectangles (similar to Pointillism fx). ; Syntax ........: _GDIPlus_BitmapApplyFilter_Linellism($hImage, $iRounds, $iSizeRect, $iAlpha[, $iMode = 1[, $bBorder = False[, ; $bGDI_Bmp = False]]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iRounds - an integer value. The amount of drawn filled rectangles. ; $iSizeRect - an integer value. The size of the rectangles. ; $iAlpha - an integer value. Alpha color channel. Possible values are between 0 and 255 whereas ; 0 is transparent and 255 is opaque. ; $iMode - [optional] an integer value. Default is 1. Direction of the rectangles. ; 1 = horizontal, 2 = vertical, 3 = randomly 1 and 2. ; $bBorder - [optional] a boolean value. Default is False. If true ellipses will have borders. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Linellism($hImage, $iRounds, $iSizeRect, $iAlpha, $iMode = 1, $bBorder = False, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Linellism", "ptr", $hImage, "uint", $iRounds, "uint", $iSizeRect, "byte", $iAlpha, "byte", $iMode, "bool", $bBorder, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Linellism ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Convolution ; Description ...: In image processing, a kernel, convolution matrix, or mask is a small matrix useful for blurring, sharpening, ; embossing, edge detection, and more. This is accomplished by means of convolution between a kernel and an image. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Convolution($hImage, $fFactor, $fBias[, $iMode = 1[, $bGDI_Bmp = False]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fFactor - a floating point value. Adjustment for the color value (the factor will be multiplied with the result). ; $fBias - a floating point value. Adjustment for the color value (brightness). ; $iMode - [optional] an integer value. Default is 1. ; Convolution modes (matrixes): ; 0: Manual odd matrix -> 3x3, 5x5, 7x7, 9x9 ; 1: Emboss 3x3 ; 2: Emboss 45 Degree 3x3 ; 3: Emboss Top Left Bottom Right 3x3 ; 4: Intense Emboss 5x5 ; 5: Sharpen 3x3 ; 6: Box Blur (normalized) 3x3 ; 7: Gaussian Blur (approximation) 3x3 ; 8: Triangle Blur 3x3 ; 9: Unsharp(with no image mask) 5x5 ; 10: Unsharp 3x3 ; 11: Edge Detection 1 3x3 ; 12: Edge Detection 2 3x3 ; 13: Edge Detection 3 3x3 ; 14: Edge Detection 4 3x3 ; 15: Edge Detection 5 3x3 ; 16: Edge Detection 6 3x3 ; 17: Another Blur 5x5 ; 18: Motion Blur 9x9 ; 19: Sharpen 2 3x3 ; 20: Sobel 3x3 with 2 matrixes (h/w) ; 21: Laplace 3x3 v1 ; 22: Laplace 3x3 v2 ; 23: Laplace 5x5 ; 24: Prewitt 3x3 ; 25: Kirsch 3x3 ; 26: Gaussian3x3 blur ; 27: Gaussian5x5 Type1 blur ; 28: Gaussian5x5 Type2 blur ; 29: Laplacian of Gaussian 5x5 ; 30: Sovel vs Prewitt 3x3 ; $tMatrix - [optional] an integer value. Default is 0. You can provide a convolution matrix manually. ; The struct must have same amount of columns & rows whereas columns / rows must be odd! ; E.g. struct of array has following structure for a 3x3 matrix: ; $iMatrix = 3 * 3 ; $tStruct = DllStructCreate("float Matrix[" & $iMatrix & "]") ; $tStruct.Matrix((1)) = 0.1 ; $tStruct.Matrix((2)) = 0.2 ; $tStruct.Matrix((3)) = 0.3 ; $tStruct.Matrix((4)) = 1.1 ; $tStruct.Matrix((5)) = 1.2 ; $tStruct.Matrix((6)) = 1.3 ; $tStruct.Matrix((7)) = 2.1 ; $tStruct.Matrix((8)) = 2.2 ; $tStruct.Matrix((9)) = 2.3 ; As an array: ; [0.1, 0.1, 0.1] ; [1.1, 1.1, 1.1] ; [2.1, 2.1, 2.1] ; $iMatrix - [optional] an integer value. Default is 0. The amount of matrix elements. E.g. a 3x3 matrix ; has 9 elements. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Convolution($hImage, $fFactor, $fBias, $iMode = 1, $tMatrix = 0, $iMatrix = 0, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Convolution", "ptr", $hImage, "float", $fFactor, "float", $fBias, "byte", $iMode, "struct*", $tMatrix, "ushort", $iMatrix, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Convolution ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Raster ; Description ...: Creates a raster effect based on ellipses. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Raster($hImage[, $iSizeW = 8[, $iSizeH = 8[, $fDensity = 0.0[, $fbrightness = 0[, ; $fBias = 0[, $iMode = 1[, $bGDI_Bmp = False]]]]]]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iSizeW - [optional] an integer value. Default is 8. Width of the raster ellipse. ; $iSizeH - [optional] an integer value. Default is 8. Height of the raster ellipse. ; $fDensity - [optional] a floating point value. Default is 0.0. Represents the pixel density. ; $fbrightness - [optional] a floating point value. Default is 0. Represents the brightness of the ellipse color. ; $fBias - [optional] a floating point value. Default is 0. Adjusts the size of the ellipse. ; $iMode - [optional] an integer value. Default is 1. 1 = colorized, >1 = b/w. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Raster($hImage, $iSizeW = 8, $iSizeH = 8, $fDensity = 0.0, $fbrightness = 10, $fBias = 0, $iMode = 1, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Raster", "ptr", $hImage, "uint", $iSizeW, "uint", $iSizeH, "float", $fDensity, "float", $fbrightness, "float", $fBias, "byte", $iMode, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Raster ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Pixelate ; Description ...: Pixelates an image. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Pixelate($hImage[, $iPixelate = 8[, $bGDI_Bmp = False]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iPixelate - [optional] an integer value. Default is 8. The divisor for the width / height of the image. ; The higher the value the more pixelated will be the image. ; $bGrid - [optional] a boolean value. Default is False. If true a grid will be drawn according to the pixel size. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Pixelate($hImage, $iPixelate = 8, $bGrid = False, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Pixelate", "ptr", $hImage, "byte", $iPixelate, "bool", $bGrid, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Pixelate ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Dilatation ; Description ...: Gradually enlarges the boundaries of regions of foreground pixels (i.e. white pixels, typically). ; Syntax ........: _GDIPlus_BitmapApplyFilter_Dilate($hImage[, $iSize = 5[, $bGDI_Bmp = False]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iSize - [optional] an integer value. Default is 5. The higher the value the more time will ; needed for calculation. $iSize is limited to a value between 2 and 32. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Dilatation($hImage, $iSize = 5, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Dilatation", "ptr", $hImage, "byte", $iSize, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Dilatation ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Erosion ; Description ...: Erodes away the boundaries of regions of foreground pixels (i.e. white pixels, typically). ; Syntax ........: _GDIPlus_BitmapApplyFilter_Erosion($hImage[, $iSize = 5[, $bGDI_Bmp = False]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iSize - [optional] an integer value. Default is 5. The higher the value the more time will ; needed for calculation. $iSize is limited to a value between 2 and 32. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Erosion($hImage, $iSize = 5, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Erosion", "ptr", $hImage, "byte", $iSize, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Erosion ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_OilPainting ; Description ...: Applies an oil painting look to the image. ; Syntax ........: _GDIPlus_BitmapApplyFilter_OilPainting($hImage, $iRadius, $fIntensityLevels[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iRadius - an integer value. The size of the brush. $iRadius is limited to a value between 1 and 32. ; $fIntensityLevels - a floating point value. The higher the value the more details will be drawn and also ; more time will needed for calculation. Lower values mean more solid colors. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_OilPainting($hImage, $iRadius, $fIntensityLevels, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_OilPainting", "ptr", $hImage, "byte", $iRadius, "float", $fIntensityLevels, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_OilPainting ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_ColorAccent ; Description ...: Make the image greyscale except the selected Hue value. ; Syntax ........: _GDIPlus_BitmapApplyFilter_ColorAccent($hImage[, $iHue = 0[, $fRange = 15[, $bGDI_Bmp = False]]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iHue - [optional] an integer value. Default is 0°. A Hue value which will be skipped to be greyscale. ; Range: 0° - 360° ; $fRange - [optional] a floating point value. Default is 15. Range of Hue value. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://www.rapidtables.com/convert/color/rgb-to-hsv.htm ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_ColorAccent($hImage, $iHue = 0, $fRange = 15, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_ColorAccent", "ptr", $hImage, "ushort", $iHue, "float", $fRange, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_ColorAccent ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_PenSketch ; Description ...: A bundle of several filters to produce a pen sketch effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_PenSketch($hImage, $iThreshold[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iThreshold - an integer value. This value is used for _GDIPlus_BitmapApplyFilter_Convolution (Sobel) ; filter. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_PenSketch($hImage, $iThreshold, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_PenSketch", "ptr", $hImage, "float", $iThreshold, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_PenSketch ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_PenSketch2 ; Description ...: A bundle of several filters to produce a pen sketch effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_PenSketch2($hImage, $iThreshold[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iThreshold - an integer value. This value is used for _GDIPlus_BitmapApplyFilter_Convolution (Sobel) ; filter. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_PenSketch2($hImage, $iThreshold, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_PenSketch2", "ptr", $hImage, "ubyte", $iThreshold, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_PenSketch2 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Cartoon1 ; Description ...: Creates a cartoon effect image. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Cartoon1($hImage, $iRadius, $fIntensityLevels, $iThreshold[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iRadius - an integer value. The size of the brush. $iRadius is limited to a value between 1 and 32. ; $fIntensityLevels - a floating point value. The higher the value the more details will be drawn and also ; more time will needed for calculation. Lower values mean more solid colors. ; $iThreshold - an integer value. The lower the value the more black contour lines will be drawn. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Cartoon1($hImage, $iRadius, $fIntensityLevels, $iThreshold, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Cartoon1", "ptr", $hImage, "ubyte", $iRadius, "float", $fIntensityLevels, "ubyte", $iThreshold, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Cartoon1 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_TiltShift ; Description ...: Creates a tilf shift effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_TiltShift($hImage, $fPosY[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fPosY - a floating point value. This value is the area in the image where no blurring occurs whereas ; $fPosY is the start and $fPosY + $fPosY / 2 the end position. ; $iIntensity - an integer value. The higher the value the more the image will be blurred. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_TiltShift($hImage, $fPosY, $iIntensity, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_TiltShift", "ptr", $hImage, "float", $fPosY, "uByte", $iIntensity, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_TiltShift ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_RadialBlur ; Description ...: Creates a radial blur effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_RadialBlur($hImage, $fPosX, $fPosY, $fRadius, $iIntensity[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fPosX - a floating point value. X position if the circle. ; $fPosY - a floating point value. Y position if the circle. ; $fRadius - a floating point value. Radius of the non blur circle. ; $iIntensity - an integer value. The higher the value the more the image will be blurred. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_RadialBlur($hImage, $fPosX, $fPosY, $fRadius, $iIntensity, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_RadialBlur", "ptr", $hImage, "float", $fPosX, "float", $fPosY, "float", $fRadius, "uByte", $iIntensity, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_RadialBlur ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_TimeWarp ; Description ...: Creates a time warp effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_TimeWarp($hImage, $fFactor, $fMidX, $fMidY[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fFactor - a floating point value. The strength of the time warp effect ; $fMidX - a floating point value. X coordinate for the center. ; $fMidY - a floating point value. Y coordinate for the center. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_TimeWarp($hImage, $fFactor, $fMidX, $fMidY, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_TimeWarp", "ptr", $hImage, "float", $fFactor, "float", $fMidX, "float", $fMidY, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_TimeWarp ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_FishEye ; Description ...: Creates a fish eye effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_FishEye($hImage[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_FishEye($hImage, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_FishEye", "ptr", $hImage, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_FishEye ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Wave ; Description ...: Adds a wavy look to the image. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Wave($hImage, $fAmplitudeX, $fAmplitudeY, $fFrequencyX, $fFrequencyY[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fAmplitudeX - a floating point value. ; $fAmplitudeY - a floating point value. ; $fFrequencyX - a floating point value. ; $fFrequencyY - a floating point value. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Wave($hImage, $fAmplitudeX, $fAmplitudeY, $fFrequencyX, $fFrequencyY, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Wave", "ptr", $hImage, "float", $fAmplitudeX, "float", $fAmplitudeY, "float", $fFrequencyX, "float", $fFrequencyY, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Wave ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Swirl ; Description ...: Creates a swirl effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Swirl($hImage, $fDegree[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fDegree - a floating point value. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Swirl($hImage, $fDegree, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Swirl", "ptr", $hImage, "float", $fDegree, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Swirl ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_XRay ; Description ...: Creates a x-ray effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_XRay($hImage, $iBias, $bInvert[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iBias - an integer value. The bias value increases / decreases the brightness of the image ; $bInvert - a boolean value. Inverts the colors (negative). ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_XRay($hImage, $iBias, $bInvert, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_XRay", "ptr", $hImage, "byte", $iBias, "bool", $bInvert, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_XRay ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_DistortionBlur ; Description ...: Creates a blurred / distored image effect. ; Syntax ........: _GDIPlus_BitmapApplyFilter_DistortionBlur($hImage, $iDistortFactor[, $bGDI_Bmp = False]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iDistortFactor - an integer value. The higher the value the more the pixels will be distorted. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_DistortionBlur($hImage, $iDistortFactor, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_DistortionBlur", "ptr", $hImage, "ushort", $iDistortFactor, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_DistortionBlur ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_BWJJNDithering ; Description ...: Converts the image to a black and white image using Jarvis, Judice, and Ninke dithering ; Syntax ........: _GDIPlus_BitmapApplyFilter_BWJJNDithering($hImage[, $fErrorMultiplier = 0.3333333[, $iThreshold = 128[, ; $bGDI_Bmp = False]]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $fErrorMultiplier - [optional] a floating point value. Default is 0.3333333. ; $iThreshold - [optional] an integer value. Default is 128. Level between black = 0 and white = 255. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_BWJJNDithering($hImage, $fErrorMultiplier = 0.3333333, $iThreshold = 128, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) $iThreshold = $iThreshold < 0 ? 0 : $iThreshold > 255 ? 255 : $iThreshold Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_BWJJNDithering", "ptr", $hImage, "float", $fErrorMultiplier, "ubyte", $iThreshold, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_BWJJNDithering ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapApplyFilter_Indexed ; Description ...: Converts the image to 1, 16 or 256 color bitmap. Dithering is optional. ; Syntax ........: _GDIPlus_BitmapApplyFilter_Indexed($hImage[, $iColors = 256[, $iDitherStrength = 5[, $iDitherMode = 1[, ; $bDither = True[, $bGDI_Bmp = False]]]]]) ; Parameters ....: $hImage - a handle to a GDIPlus bitmap. ; $iColors - [optional] an integer value. Default is 256. 1, 16 or 256 color are implemented yet only. ; $iDitherMode - [optional] an integer value. Default is 1. 2 is calculated with Euclidean distance. ; $bDither - [optional] a boolean value. Default is True. If false the dithering is disabled. ; $bGDI_Bmp - [optional] a boolean value. Default is False. If false a GDIPlus bitmap handle will be returned, ; otherwise a GDI bitmap handle. ; Return values .: A bitmap handle (GDI/GDI+) depending on $bGDI_Bmp value. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GDIPlus_BitmapApplyFilter_Indexed($hImage, $iColors = 256, $iDitherMode = 1, $bDither = True, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Indexed", "ptr", $hImage, "ulong", $iColors, "bool", $bDither, "ubyte", $iDitherMode, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc ;==>_GDIPlus_BitmapApplyFilter_Indexed Func _GDIPlus_BitmapApplyFilter_Mosaic($hImage, $iSites, $bOrdered, $bBorder, $iCalcMode, $iBorderColor, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Mosaic", "ptr", $hImage, "ULong", $iSites, "bool", $bOrdered, "bool", $bBorder, "ubyte", $iCalcMode, "ulong", $iBorderColor, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc Func _GDIPlus_BitmapApplyFilter_Delaunay($hImage, $iBlur = 4, $fSobel = 1.0, $iThresholdBW = 60, $iSpaceX = 4, $iSpaceY = 4, $iBorderSpaceX = 16, $iBorderSpaceY = 16, _ $bRndPoints = False, $iRndPoints = 0, $bShowEdges = False, $iAlpha = 0x60, $bWireframe = False, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Delaunay", "ptr", $hImage, "ubyte", $iBlur, "float", $fSobel, "ubyte", $iThresholdBW, "ulong", $iSpaceX, "ulong", $iSpaceY, "ubyte", _ $iBorderSpaceX, "ubyte", $iBorderSpaceY, "bool", $bRndPoints, "ulong", $iRndPoints, "bool", $bShowEdges, "ubyte", $iAlpha, "bool", $bWireframe, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc Func _GDIPlus_BitmapApplyFilter_Spiral($hImage, $iMode = 1, $iBgColor = 0xFFF0F0F0, $bGreyscale = True, $bGDI_Bmp = False) If Not IsPtr($hImage) Then Return SetError(1, 0, 0) Local Const $aReturn = DllCall($__hDLL__FX__, "ptr", "_GDIPlus_BitmapApplyFilter_Spiral", "ptr", $hImage, "ubyte", $iMode, "ulong", $iBgColor, "bool", $bGreyscale, "bool", $bGDI_Bmp) If Not $aReturn[0] Then Return SetError(2, 0, 0) Return $aReturn[0] EndFunc You need the DLL version dated to 2020-11-16 to use the UDF properly.1 point
-
Some Graphical Examples using GDI+ Vol. II
ShakibHasan reacted to UEZ for a file
1 point -
I wanted to hide my listvew temporarily, but i was using '_GUICtrlListView_Create' function, so I don't know how it will behave with 'GUICtrlCreateListView' im sure there must be a way to hide the list view another way but i ended up doing the below code xD $tradelist = _GUICtrlListView_Create($mGui, "",4, 20, 300, 300, -1, -1, False) ;hide litview by making in thin _WinAPI_MoveWindow($tradelist, 4, 20, 1, 1) ;add items or etc ;restore the original position _WinAPI_MoveWindow($tradelist, 4, 20, 300, 300)1 point
-
[SIMPLE] Working Example Of WM_MOUSELEAVE
musicstashall reacted to 4ggr35510n for a topic
I believe there is none working example of WM_MOUSELEAVE notification ( I could be wrong ), using TrackMouseEvent, on this Forum. I've had some serious trouble some time to make it work. I believe someone will use it one day :] Global $is_tracking = False Global $iteration = 1 ; Just to recognize different ConsoleWrite's in spammed console Global $hGui = GUICreate('') Global $sTrackMouseEvent = DllStructCreate('dword;dword;hwnd;dword') ; Creating TRACKMOUSEEVENT Structure Global $sTME_size = DllStructGetSize($sTrackMouseEvent) ; getting size of structure - need for 1st argument ; Filling in: DllStructSetData($sTrackMouseEvent, 1, $sTME_size) ; Size of a structure DllStructSetData($sTrackMouseEvent, 2, 0x00000002) ; TME_LEAVE DllStructSetData($sTrackMouseEvent, 3, $hGui) ; HWND of our GUI DllStructSetData($sTrackMouseEvent, 4, 0xFFFFFFFF) ; HOVER_DEFAULT - BUT IT'S NOT USED ANYWAY, SINCE WE'RE TRACKING ONLY MOUSE_LEAVE EVENT Global $sTME_POINTER = DllStructGetPtr($sTrackMouseEvent) ; Getting the pointer to the structure, needed to TrackMouseEvent function GUIRegisterMsg(0x0200, '__wm_mousemove') GUIRegisterMsg(0x02A3, '__wm_mouseleave') ; WM_MOUSELEAVE code GUISetState() Func __wm_mouseleave($hwnd, $msg, $wParam, $lParam) $is_tracking = False ConsoleWrite('YOUR MOUSE HAS JUST LEAVED YOUR GUI WINDOW FOR THE ' & $iteration & ' TIME!' & @CRLF) $iteration += 1 EndFunc Func __wm_mousemove($hwnd, $msg, $wParam, $lParam) If Not $is_tracking Then $is_tracking = True DllCall('user32.dll', 'bool', 'TrackMouseEvent', 'ptr', $sTME_POINTER) ; We're calling the tracking function ConsoleWrite('Starting tracking...' & @CRLF) EndIF EndFunc Do Until GuiGetMsg() = -31 point -
At the very least, store the userid and a strong hash of "userid & passphrase" possibly with some salt. This way Eve can't easily impersonate any Alice or Bob. Well in theory since, as you should know, AutoIt scripts even "compiled" aren't immune to reverse-engineering.0 points