Page 1 of 1

[FIXED] WinAPI Soundmixer error

Posted: Sat Apr 12, 2008 11:11 am
by stisev
Came out of nowhere. Nothing was changed except a few versions of Eventghost.

Code: Select all

Error in Action: "eg.WinAPI.SoundMixer.GetMasterVolume()"
Traceback (most recent call last) (1376):
  File "D:\Applications\EventGhost\eg\Classes\ActionClass.py", line 155, in CallWrapper
  File "D:\Applications\EventGhost\plugins\EventGhost\__init__.py", line 83, in __call__
  File "<string>", line 1, in <module>
  File "D:\Applications\EventGhost\eg\Init.py", line 260, in __getattr__
ImportError: No module named WinAPI

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1376">
    <Macro Name="Decrease Volume (for everything except !! ZP !!)" id="653">
        <Event Name="Firefly.ChannelDown" />
        <Action>
            EventGhost.PythonCommand(u'eg.WinAPI.SoundMixer.GetMasterVolume()')
        </Action>
        <Action>
            System.ChangeMasterVolumeBy(-10.0, 0)
        </Action>
        <Action>
            EventGhost.ShowOSD(u'Volume Up ({int(eg.result)}%)', None, (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>
</EventGhost>


Now, even though Autom Highlight Event is turned OFF, EG still highlights the macro/event when my firefly's key is pressed.

Re: [BUG] WinAPI Soundmixer error

Posted: Sat Apr 12, 2008 4:17 pm
by Bitmonster
The "WinAPI" was renamed to "WinApi" in the latest versions. Just rename it in your PythonCommand and it should work again.