Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Skrypt modyfikujący obraz w pamięci


Rekomendowane odpowiedzi

Opublikowano

Witam, poszukuję skryptu który jest zdolny wykonać screenshota, zapisać go w pamięci i tam też go modyfikować oraz odczytywać poszczególne pixele. Ktoś widział coś takiego?

Cipka - Najlepszy silnik na świecie. Działa z tłokiem każdej średnicy, wbudowana funkcja samosmarowania, odpalasz jednym palcem i co miesiąc sam się wymienia olej. Szkoda tylko że ma taki pojebany komputer pokładowy.

Opublikowano

Pewnie tak, masz forum autoit poszukaj skryptów do OCR i napisz sobie program od podstaw, wymagania to masz naprawdę z*******e jak chodzi o tworzenie  i działanie programu. 

Mózg to nie mydło; nie ubędzie Ci go, gdy go użyjesz.

Opublikowano

Cóż, ten skrypt ma być tylko częścią całego programu więc wymagania nie są z*******e ;)

Cipka - Najlepszy silnik na świecie. Działa z tłokiem każdej średnicy, wbudowana funkcja samosmarowania, odpalasz jednym palcem i co miesiąc sam się wymienia olej. Szkoda tylko że ma taki pojebany komputer pokładowy.

Opublikowano

A właśnie są bo chcesz wszystko robić w pamięci. Autoit jest na tyle prosty i wolny że bez problemu obrabia dane zapisywane na dysku, do tego jest obsługa już napisana. Do bardziej skomplikowanych to trzeba sobie napisać albo poszukać udf i dopiero myśleć jak złożyć w całość.    

 

Obsługa pamięci np  nomadmemory z obsługą grafik, obsługa zapisu obrazu ( masz w autoit możliwość screenów ), program do OCR ( wymagany zewnętrzny program, analiza obrazu ( pewnie kolor , może kształty ) algorytmy do wykrywania i wyszukiwania tego co chcesz. Jak widzisz podstawy są brak złożenia i użycia. 

 

Nikt nie pisze dla kogoś skryptów, jak napiszesz i masz problemy to nie ma problemu znajdą się chętni pomóc w poprawie błędów i rozwiązaniu problemu. 

Mózg to nie mydło; nie ubędzie Ci go, gdy go użyjesz.

Opublikowano

Znalazłem UDF do robienia screenshotów do pamięci i odczytywania ich. Brak mu tylko funkcji do modyfikowania go. Może jakieś pomysły jak dodać taką funkcję?

 

#include <ScreenCapture.au3>
#include-once
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_CreateDC
; Description ...: Creates a DC for use with the other _PixelGetColor functions.
; Syntax.........: _PixelGetColor_CreateDC()
; Parameters ....: None.
; Return values .: Success - Returns the handle to a compatible DC.
;                  Failure - Returns 0 and Sets @ according to @ from the DllCall.
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGetColor_CaptureRegion, _PixelGetcolor_GetPixel, _PixelGetColor_GetPixelRaw, _PixelGetColor_ReleaseRegion, _PixelGet_Color_ReleaseDC
; Example .......; No
;
; ;==========================================================================================
Func _PixelGetColor_CreateDC($hDll = "gdi32.dll")
$iPixelGetColor_MemoryContext = DllCall($hDll, "int", "CreateCompatibleDC", "int", 0)
If @ Then Return SetError(@,0,0)
Return $iPixelGetColor_MemoryContext[0]
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_CaptureRegion
; Description ...: Captures the user defined region and reads it to a memory DC.
; Syntax.........: _PixelGetColor_CaptureRegion($iPixelGetColor_MemoryContext, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $fCursor = False)
; Parameters ....: $iPixelGetColor_MemoryContext - The DC as returned by _PixelGetColor_CreateDC
;     $iLeft  - Left side of the screen for use with the region
;     $iTop  - Top side of the screen for use with the region
;     $iRight  - Right side of the screen for use with the region
;     $iBottom - Bottom side of the screen for use with the region
;     $iCursor  - If this is true, then the cursor is also read into memory
; Return values .: Success - Returns the handle to a region.
;                  Failure -
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGet_Color_CreateDC, _PixelGetcolor_GetPixel, _PixelGetColor_GetPixelRaw, _PixelGetColor_ReleaseRegion, _PixelGet_Color_ReleaseDC
; Example .......; No
;
; ;==========================================================================================
Func _PixelGetColor_CaptureRegion($iPixelGetColor_MemoryContext, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $fCursor = False, $hDll = "gdi32.dll")
$HBITMAP = _ScreenCapture_Capture("", $iLeft, $iTop, $iRight, $iBottom, $fCursor)
DllCall($hDll, "hwnd", "SelectObject", "int", $iPixelGetColor_MemoryContext, "hwnd", $HBITMAP)
Return $HBITMAP
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_GetPixel
; Description ...: Gets a pixel color from the DC in decimal BGR and converts it to RGB in 6 digit hexadecimal.
; Syntax.........: _PixelGetColor_GetPixel($iPixelGetColor_MemoryContext,$iX,$iY)
; Parameters ....: $iPixelGetColor_MemoryContext - The DC as returned by _PixelGetColor_CreateDC
;     $iX  - The X coordinate in the captured region
;     $iY  - The Y coordinate in the captured regoin
; Return values .: Success - Returns the 6 digit hex BGR color.
;                  Failure - Returns -1 and Sets @ to 1.
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGetColor_CreateDC, _PixelGetColor_CaptureRegion, _PixelGetColor_GetPixelRaw, _PixelGetColor_ReleaseRegion, _PixelGet_Color_ReleaseDC
; Example .......; Yes
;
; ;==========================================================================================
Func _PixelGetColor_GetPixel($iPixelGetColor_MemoryContext,$iX,$iY, $hDll = "gdi32.dll")
$iColor = DllCall($hDll,"int","GetPixel","int",$iPixelGetColor_MemoryContext,"int",$iX,"int",$iY)
If $iColor[0] = -1 then Return SetError(1,0,-1)
$sColor = Hex($iColor[0],6)
Return StringRight($sColor,2) & StringMid($sColor,3,2) & StringLeft($sColor,2)
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_GetPixelRaw
; Description ...: Gets a pixel color from the DC in decimal BGR.
; Syntax.........: _PixelGetColor_GetPixelRaw($iPixelGetColor_MemoryContext,$iX,$iY)
; Parameters ....: $iPixelGetColor_MemoryContext - The DC as returned by _PixelGetColor_CreateDC
;     $iX  - The X coordinate in the captured region
;     $iY  - The Y coordinate in the captured regoin
; Return values .: Success - Returns the color in decimal BGR.
;                  Failure - Returns -1 and Sets @ to 1.
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGetColor_CreateDC, _PixelGetColor_CaptureRegion, _PixelGetColor_GetPixel, _PixelGetColor_ReleaseRegion, _PixelGet_Color_ReleaseDC
; Example .......; No
;
; ;==========================================================================================
Func _PixelGetColor_GetPixelRaw($iPixelGetColor_MemoryContext,$iX,$iY, $hDll = "gdi32.dll")
$iColor = DllCall($hDll,"int","GetPixel","int",$iPixelGetColor_MemoryContext,"int",$iX,"int",$iY)
Return $iColor[0]
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_ReleaseRegion
; Description ...: Releases a region previously created by calling _PixelGetColor_CaptureRegion
; Syntax.........: _PixelGetColor_ReleaseRegion($HBITMAP)
; Parameters ....: $HBITMAP - Previously returned by _PixelGetColor_CaptureRegion
; Return values .: None.
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGetColor_CreateDC, _PixelGetColor_CaptureRegion, _PixelGetcolor_GetPixel, _PixelGetColor_GetPixelRaw, _PixelGet_Color_ReleaseDC
; Example .......; No
;
; ;==========================================================================================
Func _PixelGetColor_ReleaseRegion($HBITMAP)
_WinAPI_DeleteObject($HBITMAP)
EndFunc
; #FUNCTION# ;===============================================================================
;
; Name...........: _PixelGetColor_ReleaseDC
; Description ...: Releases a region previously created by calling _PixelGetColor_CreateDC
; Syntax.........: _PixelGetColor_ReleaseDC($iPixelGetColor_MemoryContext)
; Parameters ....: $iPixelGetColor_MemoryContext - Previously returned by _PixelGetColor_CreateDC
; Return values .: None.
; Author ........: Jos van Egmond
; Modified.......:
; Remarks .......:
; Related .......: _PixelGetColor_CreateDC, _PixelGetColor_CaptureRegion, _PixelGetcolor_GetPixel, _PixelGetColor_GetPixelRaw, _PixelGetColor_ReleaseRegion
; Example .......; No
;
; ;==========================================================================================
Func _PixelGetColor_ReleaseDC($iPixelGetColor_MemoryContext, $hDll = "gdi32.dll")
DllCall($hDll, "int", "DeleteDC", "hwnd", $iPixelGetColor_MemoryContext)
EndFunc

Cipka - Najlepszy silnik na świecie. Działa z tłokiem każdej średnicy, wbudowana funkcja samosmarowania, odpalasz jednym palcem i co miesiąc sam się wymienia olej. Szkoda tylko że ma taki pojebany komputer pokładowy.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...