[DiscordArchive] Trying a different way of going about this (the goal is to send normal left/right clicks while Toggl
[DiscordArchive] Trying a different way of going about this (the goal is to send normal left/right clicks while Toggl
erformDefaultAction(), but I'm having a hard time calling it manually.
erformDefaultAction(CGWorldFrame *this,MOUSEBUTTON param_1)
erformDefaultAction(int param_1_00,int param_1)
rintf(buffer, 512, "WorldFrame: %p", cwf);
erformDefaultAction(&cwf, 1);Archived author: Stelmo • Posted: 2025-04-07T17:46:14.531000+00:00
Original source
Trying a different way of going about this (the goal is to send normal left/right clicks while ToggleMouseLook() is active).
It seems like the function I want is CGWorldFrame:
erformDefaultAction(), but I'm having a hard time calling it manually.
I'm guessing my calling convention or something is wrong, because it seems to find the WorldFrame address, but crashes immediately when PerformDefaultAction() is called
```cpp
struct WorldFrame;
namespace CGWorldFrame
{
// ghidra decomp 4.1.0 + symbols calling convention
// undefined4 __thiscall CGWorldFrame:
erformDefaultAction(CGWorldFrame *this,MOUSEBUTTON param_1)
CLIENT_FUNCTION(PerformDefaultAction, 0x4F7880, __cdecl, void, (WorldFrame**, int))
// ghidra decomp 3.3.5 calling convention (seems incorrect)
// undefined4 __thiscall CGWorldFrame:
erformDefaultAction(int param_1_00,int param_1)
// CLIENT_FUNCTION(PerformDefaultAction, 0x4F7880, __stdcall, void, (int, int))
}
//* get worldframe ptr
WorldFrame* cwf = *(WorldFrame**)(0xB7436C);
//? debug: print pointer address to verify that we found the worldframe [SEEMS TO BE WORKING]
char buffer[512];
SStr:
rintf(buffer, 512, "WorldFrame: %p", cwf);
CGChat::AddChatMessage(buffer, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
//! crashes here
CGWorldFrame:
erformDefaultAction(&cwf, 1);
```
Any C++ wizards know where I'm going wrong?
erformDefaultAction` for me (IDA)
Archived author: Jerry • Posted: 2025-04-07T18:04:39.241000+00:00
Original source
`signed int __thiscall CGWorldFrame:
erformDefaultAction` for me (IDA)
Archived author: Stelmo • Posted: 2025-04-07T18:26:34.574000+00:00
Original source
Where in the world did I pull __cdecl from lmao, that's what I get for lazily copy-pasting code
No longer crashing at least, so thanks for pointing me in the right direction!
Now to figure out why it's not actually clicking/if I've been barking up the wrong tree with that function