Page 1 of 1

Help me Obi Wan......

Posted: Wed May 28, 2014 3:08 pm
by Speshal
First off a big hello there, and please excuse me I am a n00b to all of this :D

Let me explain my problem and I really hope you guys can help, essentially I want to trigger an EG macro from a VB script using the sendkeys method.

I've got EG set up so that when I press the physical keys on the keyboard the desired action happens but I get nothing when I try it via sendkeys. (I don't speak python :( )

I'm using EG to send to WINLirc that then goes to an Iguanaworks IR transmitter

I've attached a picture to help explain. E.g. to mute the TV, I press Ctrl and F1 an this works fine from my physical keyboard but not when I trigger this script...

Code: Select all

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys ("%{F1}")
Do I need another plugin? if so which one?

Image

I searched high and low through the forum and found this post - viewtopic.php?f=9&t=5339&p=25842&hilit=sendkeys#p25842

Which led me to this post viewtopic.php?f=10&t=1322&p=7747&hilit= ... asic#p7747 which may as well be in Greek to me lol

This is the only thing holding up my project and I really hope you guys can help, point me in the right direction or chuck me a python script that an idiot could modify :)

Thanks in advance :D

Re: Help me Obi Wan......

Posted: Wed May 28, 2014 5:10 pm
by jonib
I think the easiest way is to use the EventGhost commandline option"-event". Sending a key is probably not the way to send an event to EventGhost.
If you want a more direct way look at the Broadcast plugin.

jonib

Re: Help me Obi Wan......

Posted: Wed May 28, 2014 6:01 pm
by Speshal
Thanks for that :)

How would I phrase a command line event then?

Code: Select all

D:\EventGhost\EventGhost.exe -event (what to put here? this is the bit I get stuck at)

Re: Help me Obi Wan......

Posted: Wed May 28, 2014 7:44 pm
by jonib
Speshal wrote:How would I phrase a command line event then?
You can put almost anything and it becomes the event so..

This command will:

Code: Select all

EventGhost.exe -e eventname
Create this event:

Code: Select all

Main.eventname
If you put a space after eventname anything after will be put in the event payload.

jonib

Re: Help me Obi Wan......

Posted: Wed May 28, 2014 8:53 pm
by Speshal
Thanks very much, it's all working now and aside from having a cmd prompt on my screen momentarily (doesn't matter as the control PC won't have a monitor anyway) I now have voice control over my TV :D