Leaderboard
Popular Content
Showing content with the highest reputation on 02/10/2014 in all areas
-
Here a script which displays the difference between 2 images: #include <GDIPlus.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() _WinAPI_BitmapsGetDiff(@ScriptDir & "\Filled.bmp", @ScriptDir & "\Logo4.bmp", @ScriptDir & "\Diff.png") ;change the file names here! ShellExecute(@ScriptDir & "\Diff.png") _GDIPlus_Shutdown() Func _WinAPI_BitmapsGetDiff($sFile1, $sFile2, $sSave, $iROP = $MERGEPAINT) ;coded by UEZ 2014-02-10 Local Const $hBitmap1 = _GDIPlus_BitmapCreateFromFile($sFile1) If @error Then Return SetError(1, 0, 0) Local Const $hBitmap2 = _GDIPlus_BitmapCreateFromFile($sFile2) If @error Then _GDIPlus_BitmapDispose($hBitmap1) Return SetError(2, 0, 0) EndIf Local Const $iW = _GDIPlus_ImageGetWidth($hBitmap1), $iH = _GDIPlus_ImageGetHeight($hBitmap1) If _GDIPlus_ImageGetWidth($hBitmap2) <> $iW Or _GDIPlus_ImageGetHeight($hBitmap2) <> $iH Then _GDIPlus_BitmapDispose($hBitmap1) _GDIPlus_BitmapDispose($hBitmap2) Return SetError(3, 0, 0) EndIf Local Const $hHBitmap1 = _WinAPI_CreateDIB($iW, $iH) Local Const $hD1 = _WinAPI_GetWindowDC(0) Local Const $hDC_backbuffer1 = _WinAPI_CreateCompatibleDC($hD1) Local Const $DC_obj1 = _WinAPI_SelectObject($hDC_backbuffer1, $hHBitmap1) Local Const $hGraphic1 = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer1) _GDIPlus_GraphicsSetInterpolationMode($hGraphic1, 5) _GDIPlus_GraphicsDrawImageRect($hGraphic1, $hBitmap1, 0, 0, $iW, $iH) Local Const $hHBitmap2 = _WinAPI_CreateDIB($iW, $iH) Local Const $hD2 = _WinAPI_GetWindowDC(0) Local Const $hDC_backbuffer2 = _WinAPI_CreateCompatibleDC($hD2) Local Const $DC_obj2 = _WinAPI_SelectObject($hDC_backbuffer2, $hHBitmap2) Local Const $hGraphic2 = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer2) _GDIPlus_GraphicsSetInterpolationMode($hGraphic2, 5) _GDIPlus_GraphicsDrawImageRect($hGraphic2, $hBitmap2, 0, 0, $iW, $iH) Local Const $hHBitmap3 = _WinAPI_CreateDIB($iW, $iH) Local Const $hD3 = _WinAPI_GetWindowDC(0) Local Const $hDC_backbuffer3 = _WinAPI_CreateCompatibleDC($hD3) Local Const $DC_obj3 = _WinAPI_SelectObject($hDC_backbuffer3, $hHBitmap3) _WinAPI_BitBlt($hDC_backbuffer3, 0, 0, $iW, $iH, $hDC_backbuffer1, 0, 0, $SRCCOPY) _WinAPI_BitBlt($hDC_backbuffer3, 0, 0, $iW, $iH, $hDC_backbuffer2, 0, 0, $iROP) _GDIPlus_BitmapDispose($hBitmap1) _GDIPlus_BitmapDispose($hBitmap2) $hBitmap3 = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap3) _GDIPlus_ImageSaveToFile($hBitmap3, $sSave) _GDIPlus_BitmapDispose($hBitmap3) _GDIPlus_GraphicsDispose($hGraphic1) _WinAPI_SelectObject($hD1, $DC_obj1) _WinAPI_DeleteDC($hDC_backbuffer1) _WinAPI_DeleteObject($hHBitmap1) _WinAPI_ReleaseDC(0, $hD1) _GDIPlus_GraphicsDispose($hGraphic2) _WinAPI_SelectObject($hD2, $DC_obj2) _WinAPI_DeleteDC($hDC_backbuffer2) _WinAPI_DeleteObject($hHBitmap2) _WinAPI_ReleaseDC(0, $hD2) _WinAPI_SelectObject($hD3, $DC_obj3) _WinAPI_DeleteDC($hDC_backbuffer3) _WinAPI_DeleteObject($hHBitmap3) _WinAPI_ReleaseDC(0, $hD3) Return 1 EndFunc Result: Edit: visually the images are the same and the question is how to recognize this.... Br, UEZ2 points
-
Last updated 9/10/21 * Image may not represent current product Features Simple Integrated countermeasures against file and memory analysis based decompilers. Add basic types of resources into the interpreter or other types as raw data. Define multiple programs to execute pre and post build. Create and include pe version information. User defined patches that can be implemented globally on the interpreter and compiler or selectively. Handles its own basic macro's as well as environment variables in most fields for easier path finding. Drag and drop configs (script bound or separate) to the input edit box or to the icon to load them. Configuration settings can be copied to the clipboard or saved as config files or Au3 scripts. Settings can now be saved directly to an AutoIt3 script. Subsystem independant, can act as a gui or console tool. And much more. See next post for update information. A3C_97.16b.7z A3C_98_18_b.zip1 point
-
mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples1 point
-
GUICtrlCreateDate bgColor
argumentum reacted to JohnOne for a topic
Help file -> "Only Button, Label, Checkbox, Group, Radio, Edit, Input, List, Listview, ListviewItem, Treeview, TreeviewItem, Graphic, Progress, Slider and Combo controls can currently be colored."1 point -
using System; using System.Text.RegularExpressions; namespace PasswordValid { internal class Program { private static void Main() { PasswordValid PW1 = new PasswordValid(); // Create a PasswordValid object. // Set the following properties. PW1.Ints = 2; // Must contain 2 integers. PW1.Length = 6; // Must contain a minimum of 6 characters. PW1.LowerCase = 2; // Must contain at least 2 lowercase characters. PW1.AllowConsecutive = false; // Disallow consecutive characters e.g. the S in password. string password = "4u0"; // Check the following password. Result PW1_Results = PW1.Validate(password); Console.WriteLine("The following password : {0} returned {1}", password, PW1_Results.IsValid); // Returns True or False. if (PW1_Results.HasConsecutive) Console.WriteLine("The password contained repeating characters e.g. S in Password."); if (PW1_Results.HasSpace) Console.WriteLine("The password contained space(s)."); if (PW1_Results.IsInts) Console.WriteLine("The password didn't contain the minimum number of digits."); if (PW1_Results.IsLength) Console.WriteLine("The password didn't match the mininum length."); if (PW1_Results.IsLowerCase) Console.WriteLine("The password didn't contain the minimum number of lowercase characters."); if (PW1_Results.IsSpecial) Console.WriteLine("The password didn't contain the minimum number of special characters."); if (PW1_Results.IsUpperCase) Console.WriteLine("The password didn't contain the minimum number of uppercase characters."); PW1 = null; // Destroy the PasswordValid object. PW1_Results = null; // Destroy the Results object. } } internal class Result // Results class. { public Result(bool isValid, bool hasAllow, bool hasSpace, bool isInts, bool isLength, bool isLowerCase, bool isSpecial, bool isUpperCase) { HasConsecutive = hasAllow; HasSpace = hasSpace; IsInts = isInts; IsLength = isLength; IsLowerCase = isLowerCase; IsSpecial = isSpecial; IsUpperCase = isUpperCase; IsValid = isValid; } public readonly bool HasConsecutive, HasSpace, IsInts, IsLength, IsLowerCase, IsSpecial, IsUpperCase, IsValid; } internal class PasswordValid // Based on code I created with AutoIt: http://www.autoitscript.com/forum/topic/153018-passwordvalid-udf-like-example-of-validating-a-password/ { // Declare and assign instance variables with their default values. private bool isConsecutive = false, isSpace = false; private int iInts = 0, ilength = 0, iLowerCase = 0, iSpecial = 0, iUpperCase = 0; // An enumeration list of flags for which validation checks failed. // private enum flags { none = 0x00, consecutive = 0x01, ints = 0x02, length = 0x04, lowercase = 0x08, space = 0x10, special = 0x20, uppercase = 0x40 }; public PasswordValid() // Constructor - Set default values. This is just to give me an idea of how to create a constructor. { isConsecutive = true; isSpace = true; } // No DeConstructor is required in this class. public bool AllowConsecutive // Properties. This is alot cleaner than public int isConsecutive; as I don't display variable names to the end user. { get { return this.isConsecutive; } set { this.isConsecutive = value; } } public bool AllowSpace { get { return this.isSpace; } set { this.isSpace = value; } } public int Ints { get { return this.iInts; } set { this.iInts = value; } // I could add a try-catch to make sure it's an int or int.TryParse(). } public int Length { get { return this.ilength; } set { this.ilength = value; } } public int LowerCase { get { return this.iLowerCase; } set { this.iLowerCase = value; } } public int Special { get { return this.iSpecial; } set { this.iSpecial = value; } } public int UpperCase { get { return this.iUpperCase; } set { this.iUpperCase = value; } } public Result Validate(string password) // Validate Method(). { int isValid = 1; bool hasConsecutive = false, hasSpace = false, isInts = false, isLength = false, isLowerCase = false, isSpecial = false, isUpperCase = false; if (!this.AllowConsecutive) // Check if characters are consecutive e.g. paasword, where "aa" is invalid. { isValid = isValid * (Regex.IsMatch(password, @"(.)\1") ? 0 : 1); hasConsecutive = (isValid == 0); } if (!this.AllowSpace) // Check if whitespace is found. { isValid = isValid * (Regex.IsMatch(password, @"\s") ? 0 : 1); hasSpace = (isValid == 0); } if (this.Ints > 0) // Check if the minimum number of integers is honoured. { isValid = isValid * (Regex.Split(password, @"\d").Length - 1 >= this.Ints ? 1 : 0); isInts = (isValid == 0); } if (this.Length > 0) // Check if the password length is honoured. { isValid = isValid * (Regex.Split(password, @"\S").Length - 1 >= this.Length ? 1 : 0); isLength = (isValid == 0); } if (this.LowerCase > 0) // Check if the minimum number of lowercase characters is honoured. { isValid = isValid * (Regex.Split(password, @"[a-z]").Length - 1 >= this.LowerCase ? 1 : 0); isLowerCase = (isValid == 0); } /* * Special characters are: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ */ if (this.Special > 0) // Check if the minimum number of special characters is honoured. { isValid = isValid * (Regex.Split(password, @"[[:punct:]]").Length >= this.Special ? 1 : 0); isSpecial = (isValid > 0); } if (this.UpperCase > 0) // Check if the minimum number of uppercase characters is honoured. { isValid = isValid * (Regex.Split(password, @"[A-Z]").Length >= this.UpperCase ? 1 : 0); isUpperCase = (isValid > 0); } return new Result(isValid > 0, hasConsecutive, hasSpace, isInts, isLength, isLowerCase, isSpecial, isUpperCase); } } }1 point
-
_FileReadToArray(@ScriptDir & "\ServerList.csv", $aConfig) For $i = 1 To $aConfig[0] If Stringleft($aConfig[$i], 1) <> "#" Then $aValues = StringSplit($aConfig[$i], ",") $SERVERTYPE = $aValues[1] $IPADDRESS = $aValues[2] $HOSTNAME = $aValues[3] .... Endif Next1 point
-
bug in SciTe 3.3.6
JLogan3o13 reacted to guinness for a topic
Ungrateful comment as ever. Edit: That software uses a constant 15% of my CPU when tested before. Though I applaud the author, I still feel a text editor running in the background shouldn't use anything.1 point -
pixel search
Alexxander reacted to nullschritt for a topic
Try this while 1 Select case PixelSearch(300,60,360,300,4558577) <> 0 And PixelSearch(40,60,100,300,4558577) <> 0 third() case PixelSearch(300,60,360,300,4558577) <> 0 left() Case PixelSearch(40,60,100,300,4558577) <> 0 right() EndSelect Sleep(1000) WEnd1 point -
pixel search
Alexxander reacted to JohnOne for a topic
While 1 If PixelSearch(300, 60, 360, 300, 4558577) And PixelSearch(40, 60, 100, 300, 4558577) <> 0 Then third() Else If PixelSearch(300, 60, 360, 300, 4558577) <> 0 Then left() If PixelSearch(40, 60, 100, 300, 4558577) <> 0 Then right() EndIf Sleep(1000) WEnd1 point -
Hi, The problem was that the SSL certificate was not trusted signed. After manually adding to the local certificate store, it worked.1 point
-
Bug fix update 82.14b download added to main thread Fixed major issues Fixed minor issues A3C new internals A3C new externals Vlad1 point
-
GDI+ animated loading screens build 2014-06-20 (32 examples)
DatMCEyeBall reacted to UEZ for a topic
Added some more examples and more will follow... Just look to the 1st post for screenshots and download link. Br, UEZ1 point -
Please provide a screen shot of what you want to automate. That would be a great help. If anything we may suggest a way of doing what you need without resorting to what your asking for.1 point
-
Hey, Could you give us more details? Maybe an example image that you need to find? Picture find automation should be used as a last resort imo, there could be other more effective ways to do what you want.1 point
-
Check out Image Search Library in the example scripts forum.1 point