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.

Leaving Girder but need some answers, please

If you have a question or need help, this is the place to be.
Post Reply
charlesj
Posts: 3
Joined: Fri Feb 01, 2008 3:14 pm

Leaving Girder but need some answers, please

Post by charlesj »

Dear gents.

I'm in the process to move away from Girder since things are getting complicated. With their latest release, Girder 5, you need to be a LUA programmer to make it work. Anyway, so far, Eventghost fit the need. I like the fact it has a plugin for my Denon receiver, application is light weight and easy to use.

The only little problems I have with Eventghost to complete its certification are the following:

- I would need to get the status (current level) of the Windows master volume to trigger the right preset volume for my Denon receiver. Let me explain, when the volume is a "0" I would like to trigger a "Mute" action. When the volume is at 1, trigger a preset value of -50db, so on and so forth until the max is reached were I'm going to trigger 0db for Denon. I haven't seen any such instruction in Eventghost where I can compute this on volume change. I'm referring to Girder since itÔÇÖs the only automation application I used so far but maybe there is a way to achieve the same work in a different way with your software.

- The other thing is IÔÇÖm planning to move to Vista Ultimate Media Center. I heard across different forums that Vista Media Center does not respond to simulated keystroke. Because of the DirectX interface, simulated keystroke need to be sent a different way to work. Guys here, have you come across that issue? Is there a way to work around it?

Otherwise, I'm in business with EventGhost and ready to leave Girder boat.

About donation, I have no problem with that, I know that software dev is a long process and support is not easy. Can you tell me what are the basic rules $$$ As you know, Girder is a pretty expensive piece of software but if I can get the same result or better, I don't mind in giving a generous donation.

Regards to all,

Charles
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Leaving Girder but need some answers, please

Post by Bartman »

The volume control would require some scripting in EG too.

Code: Select all

eg.WinAPI.SoundMixer.GetMasterVolume()
should return the master volume.
I'm getting an error though. Maybe I can see why.

Simulating keystrokes should only be the last resort, if the application doesn't allow anything else.
I'm pretty sure the Vista MediaCenter can be controlled another way.

Unfortunatly BitMonster (the main developer) currently cannot support the project for personal reasons.
charlesj
Posts: 3
Joined: Fri Feb 01, 2008 3:14 pm

Re: Leaving Girder but need some answers, please

Post by charlesj »

Hello Bartman

Here some ohter questions for you,

The volume control would require some scripting in EG too. I guess in the Python script? This is LUA programming?

Code:
eg.WinAPI.SoundMixer.GetMasterVolume()
should return the master volume.
I'm getting an error though. Maybe I can see why. Me too I'm getting an error. Is it possible that we need to put a value of the device in the brakets

Is it possible to use conditional statements like ( If Mastervolume > 0 then MacroX else MacroY) ?

Simulating keystrokes should only be the last resort, if the application doesn't allow anything else.
I'm pretty sure the Vista MediaCenter can be controlled another way. I think I found a way to do it with Sendmessage. Need to test it to see
Unfortunatly BitMonster (the main developer) currently cannot support the project for personal reasons.

Thanks for your support, we are getting there!

Charles
easy
Posts: 46
Joined: Wed Dec 05, 2007 10:05 pm

Re: Leaving Girder but need some answers, please

Post by easy »

charlesj wrote:Hello Bartman

Here some ohter questions for you,

The volume control would require some scripting in EG too. I guess in the Python script? This is LUA programming?

Code:
eg.WinAPI.SoundMixer.GetMasterVolume()
should return the master volume.
I'm getting an error though. Maybe I can see why. Me too I'm getting an error. Is it possible that we need to put a value of the device in the brakets

Is it possible to use conditional statements like ( If Mastervolume > 0 then MacroX else MacroY) ?

Simulating keystrokes should only be the last resort, if the application doesn't allow anything else.
I'm pretty sure the Vista MediaCenter can be controlled another way. I think I found a way to do it with Sendmessage. Need to test it to see
Unfortunatly BitMonster (the main developer) currently cannot support the project for personal reasons.

Thanks for your support, we are getting there!

Charles
I like python so much... BTW - I started to use it when I'we encountered EG. Now I am already moving my websites to python...
I didn't try whole code in python, but getting master volume is really working:

Code: Select all

if eg.WinAPI.SoundMixer.GetMasterVolume(0) ==0: eg.TriggerEvent("Zero")
if eg.WinAPI.SoundMixer.GetMasterVolume(0) ==1: eg.TriggerEvent("One")
Or, if You're gonna do lots of checks it could be maybe better to get sound value once:

Code: Select all

mySound = eg.WinAPI.SoundMixer.GetMasterVolume(1)
if mySound ==0: eg.TriggerEvent("Zero")
if mySound ==1: eg.TriggerEvent("One")
python's memory allocation is still a mistery for me, so this could or could not be true :)

Or the way You wrote:

Code: Select all

mySound = eg.WinAPI.SoundMixer.GetMasterVolume(1)
if mySound > 0: eg.TriggerEvent("Zero")
else: TriggerEvent("One")
python is really, I mean it, really simple. I have used perl(for God's sake), php, pascal, delphi basic, VB - python rules all of them. Except maybe php, but only because of php's perfect documentation - for python there is almost none easily understandable docs...
ste-vv
Posts: 4
Joined: Mon Jan 07, 2008 4:12 am

Re: Leaving Girder but need some answers, please

Post by ste-vv »

Getting master volume read :

http://www.eventghost.org/forum/viewtop ... &view=next

So it follows that if you set volume increase to 0.0% you will get the current volume - and no errors (I don't think you can call eg.WinAPI.SoundMixer.GetMasterVolume() directly without some set up)

I'm new at python but you have to watch the indent so an "if" statement has to be a certain way

cut/paste this in eventghost to see how you could get the volume to do tricks:

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1242">
<Macro Name="Get Volume" Expanded="True">
<Event Name="Get Volume">
</Event>
<Action>
System.ChangeMasterVolumeBy(0.0, 0)
</Action>
<Action>
EventGhost.PythonScript(u'\nif eg.result ==0: \n eg.TriggerEvent("Zero")\nif eg.result >1: \n eg.TriggerEvent("Fade MasterVol To")\n\nprint eg.result\n\n')
</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.59999999999999998, 0.29999999999999999, 0.01, 3.0)
</Action>
</Macro>
<Macro Name="Fade MasterVol To" Expanded="True">
<Event Name="Main.Fade MasterVol To">
</Event>
<Action>
DenonSerial.MasterFade(u'-50')
</Action>
</Macro>
</EventGhost>
Post Reply