I'm trying to integrate the zsnes emulator into elite skin.
Basically I have a button that loads a skin showing a list of roms to choose from, as in current playlist.
After you select your rom, another skin is loaded and zsnes is launched by command line then embedded in the skin.
Now I need to send keys to the zsnes, like pause (P key) and quit (ESC key). I tried with SENDKEY command but have no success at all, even if I first activate the zsnes window then send the key.
This is the command associated to the pause button:
The window activation works correctly so that if I stroke P on the keyboard the game pauses; the sendkey instead seems to fail, and I can't understand why!!
Then I tried with Autohotkey, wrote a macro like that:
So that when I press CTRL+ALT+a the ZSNES window first receive focus then receive a "p" keystroke. Tried outside RR and it does not work!! Again, focus on zsnes window works correctly but no keystroke seems to been sent.
After a lot of reading and tries I reached that form of script:
Not too different from the previous one but... this works!
The only difference is on the duration of the keystroke.
Maybe the Sendkey command in RR suffer the same problem?
Any idea on how to solve?
Attached to this message you will find the skin definitions and png images; there's also a line added in the skin.ini just to externalize the roms path from the skin files (any advice on how to improve this is welcome!)