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.

Parsing Events

If you have a question or need help, this is the place to be.
falkyre
Posts: 19
Joined: Mon Apr 03, 2006 10:15 am

Post by falkyre »

Sounds good to me. I don't mind playing with the scripting (wanted to learn Python anyways) but it might make things more powerful for users that don't want to get their hands dirty coding and want to just manage creating everything via the GUI.

Thanks again for everything!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

I started a new page in the wiki, that should explain some things related to scripting in EG:
http://www.eventghost.org/wiki/Scripting
falkyre
Posts: 19
Joined: Mon Apr 03, 2006 10:15 am

Post by falkyre »

Thanks!

I think I'm going to start looking into the code a bit so I can get more familiar with it. Thanks for all of your help.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

I have enabled file-listing for http://www.eventghost.org/downloads/ so you can always see, which version is the newest "experimental pre-release" I have uploaded.

Keep in mind, that if the newest version is an "_Update.exe", you have to install the latest "_Setup.exe" before.
falkyre
Posts: 19
Joined: Mon Apr 03, 2006 10:15 am

Post by falkyre »

Cool,

Thanks for doing that. Just to let you know that with your help, I have now sucessfully got MediaPortal working at changing channels on my set top box.

Thanks!
thug
Plugin Developer
Posts: 64
Joined: Sat Jul 22, 2006 2:37 pm
Location: Australia

Post by thug »

I have encountered an issue... :(

I have a macro called "Normal All" and have an event assigned to it named "Tira.*"

This works great!

Now also in that same macro I have the action (Jump if long press) called "If button is held down 0.5 sec, go to: Repeat All"

I have another macro called "Repeat All", this has an action (AutoRepeat Current Macro) assigned to is called "Autorepeat current macro: 0.5"

so....

Code: Select all

-... Normal All
|    |...(Event) Tira.*
|    L...(JILP) If button is held down 0.5 sec, go to: Repeat All
|
-... Repeat All 
     L...(ARCM) Autorepeat current macro: 0.5
(Yeah I know, My ascii art sux)

Now when I press a remote button once I get the event in the logger (GREAT).
But when I press and hold a remote button i get the jump if held executing but only 1 autorepeat in the logger, no continuous autorepeat.

I have tested by making the "Tira.*" event an actual button event (Tira.A386F5D755D5) and I get the held down event and the autorepeats "continuously" (until i release the button of course).

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

Post by Bitmonster »

Do you mean, this only happens if you use wildcarded events? I have a similiar macro working for volume control. On a single press it only changes the value by one percent. On long press it does an autorepeat with two percent increments.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="853">
    <Folder Name="Volume Control" Expanded="True">
        <Macro Name="Decrease Volume" id="533" Expanded="True">
            <Action>
                System.ChangeMasterVolumeBy(-2.0)
            </Action>
            <Action>
                EventGhost.ShowOSD(u'Volume: {int(eg.result)}%', u'0;-32;0;0;0;400;0;0;0;0;0;0;0;0;', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
            </Action>
            <Action>
                EventGhost.AutoRepeat(0.0, 0.29999999999999999, 0.01, 3.0)
            </Action>
        </Macro>
        <Macro Name="Start Decrease Volume" Expanded="True">
            <Event Name="VolumeDown">
            </Event>
            <Action>
                System.ChangeMasterVolumeBy(-1.0)
            </Action>
            <Action>
                EventGhost.ShowOSD(u'Volume: {int(eg.result)}%', u'0;-32;0;0;0;400;0;0;0;0;0;0;0;0;', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
            </Action>
            <Action>
                EventGhost.JumpIfLongPress(0.40000000000000002, XmlIdLink(533))
            </Action>
        </Macro>
        <Macro Name="Increase Volume" id="542" Expanded="True">
            <Action>
                System.ChangeMasterVolumeBy(2.0)
            </Action>
            <Action>
                EventGhost.ShowOSD(u'Volume: {int(eg.result)}%', u'0;-32;0;0;0;400;0;0;0;0;0;0;0;0;', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
            </Action>
            <Action>
                EventGhost.AutoRepeat(0.0, 0.29999999999999999, 0.01, 3.0)
            </Action>
        </Macro>
        <Macro Name="Start Increase Volume" Expanded="True">
            <Event Name="VolumeUp">
            </Event>
            <Action>
                System.ChangeMasterVolumeBy(1.0)
            </Action>
            <Action>
                EventGhost.ShowOSD(u'Volume: {int(eg.result)}%', u'0;-32;0;0;0;400;0;0;0;0;0;0;0;0;', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
            </Action>
            <Action>
                EventGhost.JumpIfLongPress(0.40000000000000002, XmlIdLink(542))
            </Action>
        </Macro>
    </Folder>
</EventGhost>
thug
Plugin Developer
Posts: 64
Joined: Sat Jul 22, 2006 2:37 pm
Location: Australia

Post by thug »

Yes, that's right, only happens for wild card events. 8)
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

I just looked at the source of 851 and there seems no difference in the handling of wild carded events or fully qualified events. So this is mysterious. Is there any other macro kicking in before?
thug
Plugin Developer
Posts: 64
Joined: Sat Jul 22, 2006 2:37 pm
Location: Australia

Post by thug »

Oh... that's weird....

No, no macro beforehand.....

back to weird....

I just disabled my "Normal All" and recreated it ("Test run") and now it works fine.

Sorry for the bogus post.

:oops:
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Parsing Events

Post by krambriw »

Hello,

I have an event and it looks like this:

Code: Select all

19:55:14   Main.UPM.DeviceCode|1|UPM.HouseCode|8|UPM.Humidity|106|UPM.LowBattery|0|UPM.Temp|1204|
I try to parse it using wild cards in the macro. I would like to use

Code: Select all

UPM.DeviceCode|1|UPM.HouseCode|8|.*
but so far I have only managed with

Code: Select all

*

Can you provide me with some hints of what "wildcarding" is working?

Best regards, Walter

Image2.jpg
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Parsing Events

Post by Bartman »

Middle parts won't work. I guess thatwould make it neccessary to match against a lot of combinations

Code: Select all

Main.UPM.DeviceCode|1|UPM.HouseCode|8|.*
including "Main." should work.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Parsing Events

Post by krambriw »

Thanks Bartman,
Unfortunately it doesn't work either,,,
Maybe some characters in the string is messing up things

BestR Walter
Post Reply