Jump to content

Werty

Active Members
  • Posts

    1,242
  • Joined

  • Last visited

  • Days Won

    42

Werty last won the day on September 2

Werty had the most liked content!

Profile Information

  • Member Title
    ♥ 96.7k
  • Location
    Danmark

Recent Profile Visitors

2,710 profile views

Werty's Achievements

  1. You pretty much got what we are allowed to discuss on that subject, going deeper would be against forum rules as it's not allowed to discuss keylogging or keypresses other than a few simple _IsPressed() which you already got.
  2. Ok that works, kinda, it doesnt trigger until I moved the mouse from the start button and into the window.
  3. Same thing, atleast if I'm doing it right, could you post an example of what exactly you mean?
  4. I'm on win10 and have hidden taskbar, your script triggers when I only hover over the start button, without clicking and opening it.
  5. Exit test() Func test() Local $sStr = "a ''' 123 ''' b" ConsoleWrite(@CRLF & StringReplace(StringLeft($sStr, StringLen($sStr)/2+1), "'''", "*'") & StringReplace(StringRight($sStr, StringLen($sStr)/2), "'''", "'*") & @CRLF & @CRLF) ; ' a *' 123 *' b ' EndFunc Not pretty but works 😛
  6. f in C# means float, but you are treating them as Hex. So it's just $t =$Hue * 6 in AU3, removing the f.
  7. Then why not use a hardware serial like baseboard serial so the program can only be run on that machine.
  8. May not be related, but in AutoIt after version 3.3.12 there were things that were broken, like stuff I was able to do in 3.3.12 didnt work in later AutoIt versions, but that was concerning ImageMagick.dll COM object, dont know if that also ruined stuff like your problem. Reference post https://www.autoitscript.com/forum/topic/199781-rgb-imgs-to-cmyk-to-tiff/#comment-1433227
  9. Also... Func _RGBSaturation($r, $g, $b) Local $m = $r >= $g ? $r : $g >= $b ? $g : $b If $m = 0 Then Return 0 Return (($m - ($r <= $g ? $r : $g <= $b ? $g : $b)) / $m) * 100 EndFunc ..and then get rid of the _Max() and _Min() functions. With a little more effort the whole thing could probably be a one liner and getting rid of the RGBSaturation() func also.
  10. Nice You dont have to use stride/offset or nested loop, nested loops are slow so use a single loop, the result is the same, also dont have to create that struct inside the loop all the time... Func _IsImageGrayScale_rafforzata($sInFile, $iEveryNthPixel = 1, $iTolerance = 8, $fGrayThreshold = 0.97) Local $qn=25 ;valore del quasi nero. originale 25 Local $saturazione = 10 ;valore della saturazione. Originale 10 _GDIPlus_Startup() Local $hImage = _GDIPlus_ImageLoadFromFile($sInFile) If @error Or $hImage = 0 Then _GDIPlus_Shutdown() Return SetError(1, 0, False) EndIf Local $iW = _GDIPlus_ImageGetWidth($hImage) Local $iH = _GDIPlus_ImageGetHeight($hImage) Local $hBitmap = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iW, $iH, $GDIP_PXF32ARGB) _GDIPlus_ImageDispose($hImage) Local $tBitmapData = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $iW, $iH, $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local $tPixels = DllStructCreate("dword[" & $iW * $iH & "];", $tBitmapData.Scan0) Local $iTotal = 0, $iGray = 0 For $Loop = 1 To $iW * $iH Step $iEveryNthPixel Local $rgb = DllStructGetData($tPixels, 1, $Loop) Local $r = BitAND($rgb, 0xFF) Local $g = BitAND(BitShift($rgb, 8), 0xFF) Local $b = BitAND(BitShift($rgb, 16), 0xFF) ; Ignora pixel quasi bianchi o quasi neri (soglie più larghe) If ($r > 230 And $g > 230 And $b > 230) Or ($r < $qn And $g < $qn And $b < $qn) Then ContinueLoop $iTotal += 1 ;~ ; Metodo 1: tolleranza RGB If (Abs($r - $g) <= $iTolerance) And (Abs($r - $b) <= $iTolerance) And (Abs($g - $b) <= $iTolerance) Then $iGray += 1 ContinueLoop EndIf ;~ ; Metodo 2: saturazione If _RGBSaturation($r, $g, $b) < $saturazione Then $iGray += 1 EndIf Next _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() If $iTotal = 0 Then Return True ; Solo bianco/nero Return ($iGray / $iTotal) >= $fGrayThreshold EndFunc Func _RGBSaturation($r, $g, $b) Local $max = _Max3($r, $g, $b) Local $min = _Min3($r, $g, $b) If $max = 0 Then Return 0 Return (($max - $min) / $max) * 100 EndFunc ;---------------------------------------------------------------- Func _Max3($a,$b,$c) local $m=$a if $m<$b then $m=$b if $m<$c then $m=$c Return $m EndFunc Func _Min3($a,$b,$c) local $m=$a if $m>$b then $m=$b if $m>$c then $m=$c Return $m EndFunc On a side note, instead of... Local $iStride = DllStructGetData($tBitmapData, "Stride") Local $iScan0 = DllStructGetData($tBitmapData, "Scan0") ...you can do it like this Local $iStride = $tBitmapData.Stride Local $iScan0 = $tBitmapData.Scan0
  11. It´s DELETE THIS.......................PLEASE!
  12. Npcap supports Silent Install with no graphical interface or prompts. https://npcap.com/guide/npcap-users-guide.html /edit, just saw that silent install option is only available for OEM version of npcap, not the free version, dont know which you use.
  13. I dont see $btny used anywhere, $btnx appears to be used for both X and Y positions.
  14. It's usually called "Strike(through)", not "Stripe", and maybe put an Underline under the characters in the bmp's that can be ctrl'ed, and maybe put a lowercase "u" in front of "uLine". It looks nice, havent tried it though, cant be bothered installing fonts nor compile it as exe. Btw, please put all the files in a folder before zipping, so people dont have to create a folder in their examples scripts folder themselfes.
×
×
  • Create New...