Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Total EventGhost noob here

If you have a question or need help, this is the place to be.
Post Reply
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Total EventGhost noob here

Post by Angh »

Hey guys,

dont rip my head off or anything...

Ive just downloaded and installed EventGhost today. But it seems my IQ is a bit too low for understanding what im supposed to do.

Here is what i would like to achieve...

If a window with the title "eSPXe .... " is open then i would like the keys on my remote control to do the following:
1 = Sends F1
2 = Sends F2
3 = Sends F3
Red button = Sends Escape

Ive ofcourse found the Emulate Keystrokes part, but i fail to see how i put that together with an event "Button 1"... Do i need to create a plugin / code stuff to do that?

if your wondering:
I need to be able to use my remote control to save state (f1), choose state (f2), load state (f3) and quit (esc) the epsxe playstation emulator when i have started playing it from within my media center.

I hope this question is ok and not severely retarded.

Hope you can help me.

/Angh
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Total EventGhost noob here

Post by jonib »

Check the last post to this thread it should give you an idea how to start controlling another program.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Re: Total EventGhost noob here

Post by Angh »

Thanks Jonib,

Im a bit confused in the screenshot i see you Enable exclusive: JetAudio

I take it that JetAudio is a plugin ?
and that you wrote that plugin yourself?

So i will need to write code (a plugin) to be able to send keyboard presses to the window of my choice?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Total EventGhost noob here

Post by jonib »

Angh wrote:I take it that JetAudio is a plugin ?
No, it's a folder that I created in Context Folder that was in the default config, where I put some macros.
JetAudiohelp.PNG
JetAudiohelp.PNG (14.58 KiB) Viewed 4307 times
and that you wrote that plugin yourself?
But I'm planning to make a plugin. 8)
So i will need to write code (a plugin) to be able to send keyboard presses to the window of my choice?
There are many ways, but if there is no plugin use Emulate keystrokes.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Re: Total EventGhost noob here

Post by Angh »

Ah that looks pretty much exactly like what i have already done.

I will take a further look at it when i get home today, will post result / screenshot.

Appreciate your time mate.

/Angh

Edit: Btw. where does it get the Play, Rewind and so forth events from ? Do I just type those in and it knows that i mean Play on the remote control ?
Edit: And what is the registered "names" for the 1,2,3 and the red button on remote? (have microsoft remote)

damn i hope i get this working, this is an awesome program, i just need to figure it out.
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Re: Total EventGhost noob here

Post by Angh »

hey jonib,

I got it working!!!

Thanks so much for your help :)

However for some reason it wont emulate the F3 key, gonna have to look into that.
F1, F2 and ESC are all working now.

Do you know what exactly the "use alternate way" to send keypress does in emulate keypress?
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Total EventGhost noob here

Post by jinxdone »

Normal method uses win32api SendInput() function
Alternative method uses win32api PostMessage() and SetKeyboardState() functions

Usually both methods work just fine. Sometimes you might specifically need to use the alternative method, so it's there if you need it..
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Re: Total EventGhost noob here

Post by Angh »

ah i see, sweet.

thanks for the quick response :)

/angh
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Total EventGhost noob here

Post by Bitmonster »

jinxdone wrote:Normal method uses win32api SendInput() function
Alternative method uses win32api PostMessage() and SetKeyboardState() functions

Usually both methods work just fine. Sometimes you might specifically need to use the alternative method, so it's there if you need it..
It is a little more complicated.

Normal method:
If the target window currently has the keyboard focus, EG will use SendInput, otherwise it will use PostMessage/SetKeyboardState. SendInput is generally more reliable, but only works for the front-most window (as does a normal keyboard).

Alternative method:
EG will use PostMessage/SetKeyboardState every time.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Total EventGhost noob here

Post by jinxdone »

Thanks for the better explanation bitmonster, I only looked quicky what the main difference was in the code.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Total EventGhost noob here

Post by jonib »

Angh wrote:Edit: Btw. where does it get the Play, Rewind and so forth events from ? Do I just type those in and it knows that i mean Play on the remote control ?
I made some macros to convert my remote events to easier to remember events, HauppaugeIR.31 is the event my remote creates, so for example the Play macro catches it and triggers a "Play" event, and then I put an Add event "Play" where ever I need it.
I got it working!!!
Great!

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Angh
Posts: 10
Joined: Mon Aug 03, 2009 3:28 pm

Re: Total EventGhost noob here

Post by Angh »

Created a new post for this issue as it is now more specific (and ive learned alot already)

Please See: http://www.eventghost.org/forum/viewtop ... f=2&t=1791
Post Reply