Page 1 of 1

Autohotkey using ePSXe emulator

Posted: 25 Nov 2013, 12:40
by empardopo
With F3 key in this emulator you can load a State.

This script doesn't work:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
1::Send {F3}
return
However, this script works fine

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
1::Send {F3 down} {F3 up}
return
I don't understand the difference! Any help, please?

Thanks in advance.

Re: Autohotkey using ePSXe emulator

Posted: 27 Nov 2013, 13:46
by nnnik
I am not sure but I think that the difference is that F3 (down up) is pressed longer then just F3.

Re: Autohotkey using ePSXe emulator

Posted: 01 Dec 2019, 22:40
by krambob2
I know this is an old thread, but the reason the second script works and not the first is that ePSXe is looking for key presses (key up and key down events). Sending the just the key doesn't trigger the up or down event.

Re: Autohotkey using ePSXe emulator

Posted: 02 Dec 2019, 01:39
by Sid4G
What's so difficult to understand, you think you type in "loop send 1" and the game will press 1 millions of times a second? The game should run at million frames per second to register the keypresses... Now check how fast psx games run :crazy:

Re: Autohotkey using ePSXe emulator

Posted: 02 Dec 2019, 02:11
by gregster
Sid4G wrote:
02 Dec 2019, 01:39
What's so difficult to understand, you think you type in "loop send 1" and the game will press 1 millions of times a second? The game should run at million frames per second to register the keypresses... Now check how fast psx games run :crazy:
SidG4, no need to do the crazy eyes here.

Especially, because nobody even mentioned looping some key or speed, it was simply about the difference between these two variants of sending F3:

Code: Select all

SendMode Input 

1::Send {F3}
2::Send {F3 down} {F3 up}
There is actually a subtle difference, but it's not keypress duration, afaik.

krambob2 wrote:
01 Dec 2019, 22:40
I know this is an old thread, but the reason the second script works and not the first is that ePSXe is looking for key presses (key up and key down events). Sending the just the key doesn't trigger the up or down event.
I think that's not true, Bob. Please look at the keyhistory. One difference is that the up-down syntax allows to send one or several keys while F3 is still in down state. This happens for Send {F3}:

Code: Select all

72  03D	i	d	11.09	F3             	
72  03D	i	u	0.00	F3

But this happens for Send {F3 down} {F3 up}. Please note the space that was included already in the original post above:

Code: Select all

72  03D	i	d	5.51	F3             	
20  039	i	d	0.00	Space          	
20  039	i	u	0.02	Space          	
72  03D	i	u	0.00	F3
If you remove that space and use Send {F3 down}{F3 up}, you get the equivalent of Send {F3}:

Code: Select all

72  03D	i	d	6.64	F3             	
72  03D	i	u	0.00	F3