Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/11/2020 in all areas

  1. dHash generates a “difference hash” for a given image - a perceptual hash based on Neal Krawetz’s dHash algorithm in this “Hacker Factor” blog entry. http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html 1. Reduce size 2. Reduce color 3. Compute the difference 4. Assign bits The resulting hash value represents the relative change in brightness intensity. To compare two hashes, just count the number of bits that are different (called Hamming distance.) A value of 0 indicates the same hash and likely a similar picture. A value greater than 10 is likely a different image, and a value between 1 and 10 is potentially a variation. dHs - dHash_v0003.zip
    2 points
  2. To make this perfectly clear: The post above is completely rubbish, completely useless and totally wrong. It's simply misinformation. It is fake news. The most significant mistake made is that the OP believes that because the internal AutoIt code is C++ code, AutoIt variables are also C++ variables. But that is not the case. AutoIt variables are not C++ variables. They are AutoIt variables. And you can't talk about dereferencing AutoIt variables. The closest approach to direct access to AutoIt variables and arrays is demonstrated in Accessing AutoIt Variables.
    2 points
  3. I don't know if the following is an appropriate way of using @genius257's "AutoItObject Pure AutoIt", and if this way can be useful to you, but this script shows how to "clone" "mirror" a variable (or better, an object) ; https://www.autoitscript.com/forum/topic/185720-autoitobject-pure-autoit/ #include <AutoItObject_Internal.au3> $a = IDispatch() $b = $a $a.value = 1 MsgBox(0, '', $b.value) $b.value = 0 MsgBox(0, '', $a.value)
    2 points
  4. pixelsearch

    CSV file editor

    Version 901w (Jan 10, 2020) Two functionalities added : 1) Close File button, which allows to import other csv file(s) during the same session 2) Import speed has been improved (and probably reached his maximum with this version) Download link at the end of 1st post
    2 points
  5. My guess is it would have been better to stay on-topic instead of posting this.... but that could be just the "dude" you PMed. in other words: When you really badly want to be taken serious, it would help when you actually start behaving like an adult. ... oh, for what it is worth: You haven't proved much yet that prove the other statements made as invalid. Jos
    1 point
  6. Here is a way which will build a dynamic list of addresses and then open each address in a new tab (wasn't sure if you wanted to print this list or open each item). #include <Array.au3> #include <IE.au3> Const $navOpenInNewTab = 0x0800 Local $oIE = _IECreate("https://hiva.site/", 1) Sleep(3000) Global $aLinks[0] Global $oLinks = _IELinkGetCollection($oIE) If IsObj($oLinks) Then For $i = 0 To $oLinks.length - 1 If $oLinks($i).className = "movie-poster col-xs-3 no-padding" Then ReDim $aLinks[UBound($aLinks) + 1] ;~ Expand $aLinks Array $aLinks[UBound($aLinks) - 1] = $oLinks($i).href EndIf Next EndIf _ArrayDisplay($aLinks) For $i = 0 To UBound($aLinks) - 1 $oIE.Navigate2($aLinks[$i], $navOpenInNewTab) Next
    1 point
  7. To make this perfectly clear: The post above is completely rubbish, completely useless and totally wrong. It's simply misinformation. Data in AutoIt variables is internally stored in variants. Data in AutoIt arrays is internally stored in safearrays of variants. Autoit variables are references to these variants and safearrays, but they are not pointers to data. It makes no sense to consider an AutoIt variable as a pointer and try to extract data using that pointer. The Ptr() function is a simple data type conversion function that can convert e.g. a string to pointer. In the same way that Int() can convert a string to an integer. Pointers in AutoIt are primarily used as parameters in functions in external DLLs e.g. all the functions in the Microsoft DLLs.
    1 point
  8. pixelsearch

    CSV file editor

    Version 901u (Jan 6, 2020) 1 functionality added : Natural sort. Thanks to jchd for the idea and Melba23 for his function ArrayMultiColSort() included in the script. Czardas read this thread a couple of days ago and that's great, I hope he liked the way his CSV splitting function was reused Download link at the end of 1st post
    1 point
  9. Needed this for copying specific colors without the need for color lookup. Just figured it might be useful to someone. tracks your mouse and gives color feedback in realtime; in hex, dec, and rgb, as well as mouse coordinates F1 to toggle pause. up/down/left/right to move 1 pixel at a time. #include <GUIConstants.au3> #include <Color.au3> #include <WindowsConstants.au3> #include <Misc.au3> HotKeySet("{F1}", "Toggle") Global $Mpos_x Global $Mpos_y Global $ColorVar Global $iColor Global $Red, $Green, $Blue Global $ToggleState $GUI = GUICreate("Coords", 125, 195, 0, 0, $WS_POPUP) $bar = GUICtrlCreateLabel("", -5, -5, 135, 20) GUICtrlCreateInput("",-1,-1, 1, 1) GUICtrlSetBkColor($bar, 0x898989) GUICtrlSetState($bar, $GUI_DISABLE) $close = GUICtrlCreateLabel("", 110, -1, 15, 20) GUICtrlSetBkColor($close, 0xD9403B) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") $xylabel = GUICtrlCreateLabel("X=" & @CRLF & "Y=", 1, 20, 15, 30) $Label_x_value = GUICtrlCreateLabel("", 17, 20, 50, 11) $Label_y_value = GUICtrlCreateLabel("", 17, 35, 50, 11) GUICtrlCreateLabel("R,G,B", 65, 25, 35, 11) $RGB = GUICtrlCreateLabel("", 60, 40, 60, 11) $copyrgb = GUICtrlCreateButton("+", 97, 23, 25, 15) GUICtrlSetTip($copyrgb, "Copy RGB to clipboard") GUICtrlCreateLabel("Hex Color", 1, 55, 50, 11) $hextext = GUICtrlCreateLabel("", 1, 70, 55, 11) $copyhex = GUICtrlCreateButton("+", 55, 55, 15, 25) GUICtrlSetTip($copyhex, "Copy HEX to clipboard") GUICtrlCreateLabel("Dec Color", 1, 85, 55, 11) $dectext = GUICtrlCreateLabel("", 1, 100, 50, 11) $copydec = GUICtrlCreateButton("+", 55, 85, 15, 25) GUICtrlSetTip($copydec, "Copy DEC to clipboard") $buttoncolor = GUICtrlCreateButton("", 73, 55, 50, 57) $colorset1 = GUICtrlCreateButton("", 1, 115, 35, 35) $set1 = GUICtrlCreateButton("-", 1, 115, 15, 15) GUICtrlSetState($colorset1, $GUI_DISABLE) $colorset2 = GUICtrlCreateButton("", 43, 115, 35, 35) $set2 = GUICtrlCreateButton("-", 43, 115, 15, 15) GUICtrlSetState($colorset2, $GUI_DISABLE) $colorset3 = GUICtrlCreateButton("", 85, 115, 35, 35) $set3 = GUICtrlCreateButton("-", 85, 115, 15, 15) GUICtrlSetState($colorset3, $GUI_DISABLE) $colorset4 = GUICtrlCreateButton("", 1, 155, 35, 35) $set4 = GUICtrlCreateButton("-", 1, 155, 15, 15) GUICtrlSetState($colorset4, $GUI_DISABLE) $colorset5 = GUICtrlCreateButton("", 43, 155, 35, 35) $set5 = GUICtrlCreateButton("-", 43, 155, 15, 15) GUICtrlSetState($colorset5, $GUI_DISABLE) $colorset6 = GUICtrlCreateButton("", 85, 155, 35, 35) $set6 = GUICtrlCreateButton("-", 85, 155, 15, 15) GUICtrlSetState($colorset6, $GUI_DISABLE) GUISetState(@SW_SHOW) Toggle() While 1 Sleep(10) SwitchCheck() WEnd Func Toggle() $ToggleState = Not $ToggleState While $ToggleState Sleep(10) Get_Mouse_Pos() SwitchCheck() IfPressed() If Not $ToggleState Then Sleep(10) EndIf WEnd EndFunc Func SwitchCheck() $nMsg = GUIGetMsg() Switch $nMsg Case $close Exit Case $copyhex ClipPut($ColorVar) Case $copydec ClipPut($iColor) Case $copyrgb ClipPut($Red&","&$Green&","&$Blue) Case $set1 GUICtrlSetBkColor($colorset1, $ColorVar) Case $set2 GUICtrlSetBkColor($colorset2, $ColorVar) Case $set3 GUICtrlSetBkColor($colorset3, $ColorVar) Case $set4 GUICtrlSetBkColor($colorset4, $ColorVar) Case $set5 GUICtrlSetBkColor($colorset5, $ColorVar) Case $set6 GUICtrlSetBkColor($colorset6, $ColorVar) EndSwitch EndFunc Func Get_Mouse_Pos() GUISetState(@SW_SHOW) $Mpos = MouseGetPos() $Mpos_x = $Mpos[0] $Mpos_y = $Mpos[1] GUICtrlSetData($Label_x_value, $Mpos_x) GUICtrlSetData($Label_y_value, $Mpos_y) $iColor = PixelGetColor($Mpos[0], $Mpos[1]) $ColorVar = "0x" & Hex($iColor, 6) GUICtrlSetBkColor($buttoncolor, $ColorVar) GUICtrlSetData($hextext, $ColorVar) GUICtrlSetData($dectext, $iColor) $Red = _ColorGetRed($iColor) $Green = _ColorGetGreen($iColor) $Blue = _ColorGetBlue($iColor) GUICtrlSetData($RGB, $Red&","&$Green&","&$Blue) EndFunc Func IfPressed() If _IsPressed(26) Then Sleep(100) MouseMove(($Mpos_x + 0) , ($Mpos_y - 1), 0) EndIf If _IsPressed(28) Then Sleep(100) MouseMove(($Mpos_x + 0) , ($Mpos_y + 1), 0) EndIf If _IsPressed(25) Then Sleep(100) MouseMove(($Mpos_x - 1) , ($Mpos_y + 0), 0) EndIf If _IsPressed(27) Then Sleep(100) MouseMove(($Mpos_x + 1) , ($Mpos_y + 0), 0) EndIf EndFunc Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) If $hWnd = $gui And $iMsg = $WM_NCHITTEST Then Return $HTCAPTION EndFunc
    1 point
  10. HankHell

    Resizable Screenshot

    Opens up a semi-transparent resizable GUI window, then takes a screenshot of the size and location with PrintScreen #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <ScreenCapture.au3> HotKeySet("{PRINTSCREEN}", "Takepic") $gui = GUICreate("gui", 100, 100, @DesktopWidth /2, @DesktopHeight /2, BitOR($WS_POPUP, $WS_THICKFRAME), $WS_EX_TOPMOST) GUICtrlCreateLabel("", 0, 0, 100, 100, -1, $GUI_WS_EX_PARENTDRAG) WinSetTrans($gui, "", 150) GUISetState(@SW_SHOW) While 1 Sleep(100) $winsize = WinGetClientSize($gui) $winpos = WinGetPos($gui) WEnd Func Takepic() WinSetTrans($gui, "", 0) Local $randomness = Random(0, 999999) $randomnumber = Round($randomness) _ScreenCapture_Capture($randomnumber&".jpg", $winpos[0]+7, $winpos[1]+7, ($winsize[0]+$winpos[0]+6), ($winsize[1]+$winpos[1]+6)) Exit EndFunc
    1 point
  11. TreatJ

    Find Text in Files

    Attached to this post is a Windows 10 Zipped File that contains a Text Finding program. I coded, tested and compiled it on Windows 10 Home / 64-bit OS... I have not tested it on any other version of Windows (ex... Win7, 8.0, 8.1). Will not work on x86 (32-bit). Just download...unzip... and place main folder "TxtFinderV475" on any drive you like... Then just double click on "TxtFinderV475.au3" ... Creating a shortcut to it works very well. I have done alot of debugging but I am not perfect... If anyone finds any issues with it please let me know! Thanks ***** Windows 11 Notepad 11.2302.16.0 now has tabs... I updated my program to work with it.... My latest versions is 5.12.... I also added a "Copy Text" button to the File Viewer window TxtFinderV475.zip TxtFinderV512.zip
    1 point
  12. Do you mind removing your "rider" bc I clearly proved my point. The rider is the definition of fake news. Thanks
    0 points
×
×
  • Create New...