Programmatically trigger Screenshot
- Johan
-
Topic Author
Less
More
Hi,
I am looking for a way to programmatically trigger Reshade, trough ScriptHookVDotNet SDK, the Effect Toggle and Screenshot key.
I tried using SendKeys.Send("{PRTSC}") - nothing happens.
Does anyone has a suggestion how this can be accomplished?
Thanks in advance.
Johan
I am looking for a way to programmatically trigger Reshade, trough ScriptHookVDotNet SDK, the Effect Toggle and Screenshot key.
I tried using SendKeys.Send("{PRTSC}") - nothing happens.
Does anyone has a suggestion how this can be accomplished?
Thanks in advance.
Johan
Please Log in or Create an account to join the conversation.
- crosire
-
Less
More
4 years 3 weeks ago - 4 years 3 weeks ago #2
by crosire
Replied by crosire on topic Programmatically trigger Screenshot
Untested, but should point you in the right direction:
ReShade monitors the window message queue for input events, so sending one to it should make ReShade pick it up.
[DllImport("user32.dll")]
static extern int SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
[DllImport("user32.dll")]
static extern IntPtr GetActiveWindow();
...
IntPtr hWnd = GetActiveWindow();
SendMessage(hWnd, 0x0100 /*WM_KEYDOWN*/, 0x2C /*VK_SNAPSHOT*/, 0);
SendMessage(hWnd, 0x0101 /*WM_KEYUP*/, 0x2C /*VK_SNAPSHOT*/, 0);
ReShade monitors the window message queue for input events, so sending one to it should make ReShade pick it up.
Last edit: 4 years 3 weeks ago by crosire.
The following user(s) said Thank You: Johan
Please Log in or Create an account to join the conversation.
- Johan
-
Topic Author
Less
More
4 years 3 weeks ago - 4 years 3 weeks ago #3
by Johan
Replied by Johan on topic Programmatically trigger Screenshot
Hi
Just now I decidet to become a patreon of yours. Such excellent work has to be supported!
I was hoping to get some additional advice from you to get my screenshot issue solved.
The following has to be accomplished with c# somehow:
Futhermode I would like to know if there is a way to extract a higher than 8bit depth image?
Is there a Date yet for releasing the next Reshade version with path tracing?
Thank you in advance.
Johan
Just now I decidet to become a patreon of yours. Such excellent work has to be supported!

I was hoping to get some additional advice from you to get my screenshot issue solved.
The following has to be accomplished with c# somehow:
if (e.KeyCode == Keys.H)
{
GTA.Script.Wait(2000);
Game.Pause(true);
SendKeys.Send("{PRTSC}"); //Take Picture without modified ReShade shader
SendKeys.Send("{PGDN}"); //Toggle to preselected ReShade shader
SendKeys.Send("{PRTSC}"); //Take Picture with additional shader
SendKeys.Send("{PGDN}"); //Toggle back
Game.Pause(false);
}
Futhermode I would like to know if there is a way to extract a higher than 8bit depth image?
Is there a Date yet for releasing the next Reshade version with path tracing?
Thank you in advance.
Johan
Last edit: 4 years 3 weeks ago by Johan.
Please Log in or Create an account to join the conversation.
- crosire
-
Less
More
I don't have a Patreon, so that would surprise me. The code I posted above is C#. As for depth: Those buffers already have at least 16-bit. But ReShade can only save 8-bit screenshots. There is also no ReShade version with path tracing, nor is one planned (ReShade does post processing, not path tracing). If you mean Marty's SSRTGI shader, then that's in beta and can already be downloaded.
Please Log in or Create an account to join the conversation.
- Johan
-
Topic Author
Less
More
Hi,
then Pascal is the lucky one
Well I will give it another try then!
regards
then Pascal is the lucky one

Well I will give it another try then!
regards
Please Log in or Create an account to join the conversation.
- Johan
-
Topic Author
Less
More
Hi Crosire,
This issue is extremly frustrating, I tried varios approches with my modest skillset in this area without making any progress.
Is there a way to get a working codesnipped from you for scipthookVdotnet (GTAV)?
- because this is very important for me, feel free to charge me for that!
thank you
This issue is extremly frustrating, I tried varios approches with my modest skillset in this area without making any progress.
Is there a way to get a working codesnipped from you for scipthookVdotnet (GTAV)?
- because this is very important for me, feel free to charge me for that!
thank you
Please Log in or Create an account to join the conversation.
- Johan
-
Topic Author
Less
More
4 years 3 weeks ago - 4 years 3 weeks ago #7
by Johan
Replied by Johan on topic Programmatically trigger Screenshot
Hi Crosire,
I hope that I am not totally on my own now - am I
?! However, after doing my "research", I guess GTA V is actively filtering low level "SendInput" calls.
Trying to untilize various wrappers like InputSimulator and Inputmanager where not successful at all.
In fact, only by inserting the namespace of these two, resultet in a "script does nothing".
How would you explain this strange behaviour?
Even stranger is, that the script becomes undebugable . No error was cought.
Is there something like a payed unofficial "professional support" for Reshade or SkripthookVdotnetSDK which I can take in demand?
It would be nice hearing from you in this regard.
Thank you
I hope that I am not totally on my own now - am I

Trying to untilize various wrappers like InputSimulator and Inputmanager where not successful at all.
In fact, only by inserting the namespace of these two, resultet in a "script does nothing".
How would you explain this strange behaviour?
Even stranger is, that the script becomes undebugable . No error was cought.
Is there something like a payed unofficial "professional support" for Reshade or SkripthookVdotnetSDK which I can take in demand?
It would be nice hearing from you in this regard.
Thank you
Last edit: 4 years 3 weeks ago by Johan.
Please Log in or Create an account to join the conversation.