Search found 66 matches

by rotacak
Sun Sep 03, 2023 10:44 pm
Forum: 3D Programming
Topic: How to use glReadPixels with CanvasGadget ?
Replies: 3
Views: 5272

Re: How to use glReadPixels with CanvasGadget ?

Is possible to capture screenshots also from different OpenGL application (second exe file)?
by rotacak
Sat Sep 02, 2023 9:23 am
Forum: Coding Questions
Topic: Frame gadget + Panel gadget = error
Replies: 6
Views: 1756

Re: Frame gadget + Panel gadget = error


The panel gadget is drawn, but it is completely covered by the frame gadget. This also occurs under PB 6.02.
The frame gadget draws a complete rectangle including the background.

Yes, I mean "is not rendered" = "is not visible".


If you first create the panel gadget and then the second frame ...
by rotacak
Fri Sep 01, 2023 8:00 pm
Forum: Coding Questions
Topic: Frame gadget + Panel gadget = error
Replies: 6
Views: 1756

Frame gadget + Panel gadget = error

Hi,

in "PureBasic 6.02 LTS (Windows - x64)" is weird error with the gadgets. Code below will successfully create frame gadget and inside panel gadget. Ok. But if you will uncomment second frame gadget then panel gadget will not be rendered at all.


Procedure OpenWindow_0(x = 0, y = 0, width = 600 ...
by rotacak
Sat Sep 04, 2021 7:52 am
Forum: Coding Questions
Topic: How to read pointer+offset from other process (like Cheat Engine)?
Replies: 17
Views: 6123

Re: How to read pointer+offset from other process (like Cheat Engine)?

But it will fail on the ReadProcessMemory_(hProcess, ImageBase + $00a55d64, @memadr, 4, 0). It will end before I can try to read address+offset.
by rotacak
Fri Sep 03, 2021 9:21 pm
Forum: Coding Questions
Topic: How to read pointer+offset from other process (like Cheat Engine)?
Replies: 17
Views: 6123

Re: How to read pointer+offset from other process (like Cheat Engine)?

Hmm, I have somewhere something wrong:

Procedure GetBaseAddressPID(dwpid)
Protected hSnapshot.l, me32.MODULEENTRY32, hMod.l
hSnapshot = CreateToolhelp32Snapshot_(#TH32CS_SNAPMODULE, dwPID)
If hSnapshot <> #INVALID_HANDLE_VALUE
me32\dwSize = SizeOf(MODULEENTRY32)
hMod = Module32First ...
by rotacak
Thu Sep 02, 2021 9:10 pm
Forum: Coding Questions
Topic: How to read pointer+offset from other process (like Cheat Engine)?
Replies: 17
Views: 6123

Re: How to read pointer+offset from other process (like Cheat Engine)?

This will read the "Address" variable?:

Code: Select all

ReadProcessMemory_(Handle,ImageBase + RVA ($885D64),Buffer,Bytes,#Null)
If yes, how much Bytes I should read?
by rotacak
Thu Sep 02, 2021 7:15 pm
Forum: Coding Questions
Topic: How to read pointer+offset from other process (like Cheat Engine)?
Replies: 17
Views: 6123

How to read pointer+offset from other process (like Cheat Engine)?

Hello,
I have this working code for reading health value from another game (memory address is 0EECD3C0):


HWND = FindWindowEx_(0, 0, "SDL_app", 0)
GetWindowThreadProcessId_(HWND, @pid)
hProcess = OpenProcess_(#PROCESS_ALL_ACCESS, #False, pid)

aaa:
res = ReadProcessMemory_(hProcess, $0EECD3C0 ...
by rotacak
Sat Sep 26, 2020 2:04 pm
Forum: Coding Questions
Topic: HTTPProgress() return value -5
Replies: 1
Views: 953

HTTPProgress() return value -5

Hello,

my use of HTTPProgress() sometime returns value -5. Which is not it the #pb constants.

What is it?
by rotacak
Tue Jul 21, 2020 8:18 pm
Forum: Tricks 'n' Tips
Topic: Tip: SendKeys procedure (Windows)
Replies: 28
Views: 37108

Re: Tip: SendKeys procedure (Windows)

Anyone have any idea, why this does not work with directx/opengl games?
by rotacak
Sat Jun 27, 2020 3:18 pm
Forum: Tricks 'n' Tips
Topic: Handle an external program via stdin/out/error
Replies: 46
Views: 17217

Re: Handle an external program via stdin/out/error

I solved it in different way. Running RunProgram() in a thread and reading the errors there. When it will hang there then is does not matter, main program still runs without hanging.
by rotacak
Thu Jun 25, 2020 10:56 pm
Forum: Tricks 'n' Tips
Topic: Handle an external program via stdin/out/error
Replies: 46
Views: 17217

Re: Handle an external program via stdin/out/error

Nice code, but sadly the code will hang (at this line Error$ = ReadProgramError(*Parameter\ProgramID, StringMode)) in case that executed program will still runing (5+ sec) after prints errors on the start.
If program only runs, print error and quit, then is everything ok.
by rotacak
Fri Jun 19, 2020 3:54 pm
Forum: Coding Questions
Topic: Slow downloading (ping?) - comparsion
Replies: 1
Views: 904

Slow downloading (ping?) - comparsion

Hello,

I downloading files by this old code below. It works good, but I would like to use direct PB solution. Problem is that when I will use PB function, then it is slow. Downloading itself is fast but when I downloading more files in a row, then it is super slow. Between each downloading is some ...
by rotacak
Wed Aug 21, 2019 11:11 am
Forum: Coding Questions
Topic: Repeatedly aborted async HTTPRequest() will crash
Replies: 5
Views: 2520

Repeatedly aborted async HTTPRequest() will crash

Hi,

when I will run this code then it works few times (+- 10 loops) and then it will crash at a random line.


Repeat
HttpRequest = HTTPRequest(#PB_HTTP_Post, "https://www.google.com", "", #PB_HTTP_Asynchronous)
If HttpRequest
Debug "started"
AbortHTTP(HttpRequest)
FinishHTTP(HttpRequest ...
by rotacak
Fri Jul 05, 2019 7:28 pm
Forum: Tricks 'n' Tips
Topic: RC4
Replies: 41
Views: 24355

Re: RC4

Yes, that is what I need, thanks. I using UTF8 instead of Ascii, like that:

CompilerIf #PB_Compiler_IsMainFile

Define *Key, *Text, i.i, Cipher$, Count, *Buffer, Byte

Debug "Key: Secret Plaintext: Attack at dawn"

*Key = UTF8("Secret") ; includes terminating 0
*Text = UTF8("Attack at dawn ...