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.

[FIXED] WinAPI Soundmixer error

Found a bug in EventGhost? Report it here.
Post Reply
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

[FIXED] WinAPI Soundmixer error

Post 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.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: [BUG] WinAPI Soundmixer error

Post by Bitmonster »

The "WinAPI" was renamed to "WinApi" in the latest versions. Just rename it in your PythonCommand and it should work again.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply