22 posts in this topic
I'm trying to read value of a base pointer + offset.
With only address I can easily the value but with base addres (pointer) I really don't know how I can do that.
Looking for working code to get full path of process - both 32 & 64 bit.
I tryed this bellow, but it works only for 32-bit processes, even if compiled for x64...
Thanx for suggestions!
Func _ProcessGetPath($vProcess) ;get the program path done by MrCreatoR Local $iPID = ProcessExists($vProcess) If NOT $iPID Then Return SetError(1, 0, -1) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If NOT IsArray($aProc) OR NOT $aProc Then Return SetError(2, 0, -1) Local $vStruct = DllStructCreate('int') Local $hPsapi_Dll = DllOpen('Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@SystemDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@WindowsDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then Return SetError(3, 0, '') DllCall($hPsapi_Dll, 'int', 'EnumProcessModules', _ 'hwnd', $aProc, _ 'ptr', DllStructGetPtr($vStruct), _ 'int', DllStructGetSize($vStruct), _ 'int_ptr', 0) Local $aRet = DllCall($hPsapi_Dll, 'int', 'GetModuleFileNameEx', _ 'hwnd', $aProc, _ 'int', DllStructGetData($vStruct, 1), _ 'str', '', _ 'int', 2048) DllClose($hPsapi_Dll) If NOT IsArray($aRet) OR StringLen($aRet) = 0 Then Return SetError(4, 0, '') Return $aRet EndFunc
Hi, I have a problem, my functions do not work with each other. Separately, each works very well. Features that do not work together it's loot() and pos1(). It looks that after spreadsheet function loot() script stops working even though everything is in the While 1-Wend loop. Can someone help me please?
Since my last topic were closed because bot scripting aren't allowed to be discussed anymore on here.
Could anyone possibly give me a good example to learn memory read/write? , i can't figure out anything else which would be a good level of difficulty to practice than "tetris bot" but since it aint legal, i wont be asking for that let me know ur ideas and i would highly appreciate if examples could be posted (My last project was a imgsrch/pxlsrch) so thought i woud move on to memory read/write, if this somehow came out wrong lmk.
AND NO I'M NOT ASKING FOR A FULL CODE I WANNA CODE/SCRIPT IT MY SELF, Just show me some simple examples of Memory read/write if u can/will TYVM.
I honestly didn't try anything yet.
But i was thinking about my next step would be to try creating a tetris bot for educational purpose only. Last time i created a automation script / bot for ClubPenguin, which was simply made with PixelSearch If NOT(@error) Then , bla bla u know the drill aight, so i thought i would give my self a little harder challenge instead of keep making Pixelbots, i would love to try making a Memory bot or w/e u call , i read something about memory read/record was used for Tetris bots, since i haven't used Memory, i would love to know if anyone could give me a good guide or smth to follow :-) Either a complete tetris bot guide or a guide that explains memory totally in depth ish. :-)