to use it add this to your EG macros
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Folder Name="intercom" Expanded="True">
<Macro Name="reducevolume" Expanded="True">
<Event Name="HID.Blue" />
<Event Name="MCE_Vista.Mce.Details" />
<Action>
EventGhost.TriggerEvent(u'restoreVolume', 6.0)
</Action>
<Action>
Window.FindWindow(u'VoxCommando.exe', None, None, None, None, None, False, 0.0, 2)
</Action>
<Action>
EventGhost.NewJumpIf(XmlIdLink(40), 1, False)
</Action>
<Action>
Window.SendMessage(273, 1, 325, 0)
</Action>
<Action>
EventGhost.PythonScript(u'import time\nimport thread\n\ntry:\n intercomactive = eg.globals.intercomactive\n print intercomactive\nexcept AttributeError:\n eg.globals.intercomactive = False\n print "intercomactive was not initialized setting to false"\n \n \nif (not eg.globals.intercomactive):\n eg.globals.regularvolume =eg.plugins.System.ChangeMasterVolumeBy(0, 0)\n eg.globals.intercomactive = True\n reducedvolume=int(eg.globals.regularvolume*.2)\n print "regular vol: "\n print eg.globals.regularvolume\n print "target vol: "\n print reducedvolume\n \n iVol=eg.globals.regularvolume\n while iVol>reducedvolume:\n #print iVol\n iVol = iVol *.8\n eg.plugins.System.SetMasterVolume(iVol, 0)\n time.sleep(0.04)\n eg.plugins.System.SetMasterVolume(reducedvolume, 0)')
</Action>
</Macro>
<Macro Name="restore volume" Expanded="True">
<Event Name="Main.restoreVolume" />
<Event Name="Broadcast.Restorevolume" />
<Action>
EventGhost.PythonScript(u'import time\nimport thread\n\ntry:\n intercomactive = eg.globals.intercomactive \nexcept AttributeError:\n eg.globals.intercomactive = False\n #print "intercomactive was not initialized setting to false"\n\nif (eg.globals.intercomactive): \n targetvolume = int(eg.globals.regularvolume) \n while eg.plugins.System.ChangeMasterVolumeBy(5, 0)<targetvolume-5:\n time.sleep(0.1)\n #print "restoring volume"\n eg.plugins.System.SetMasterVolume(targetvolume, 0)\n eg.globals.intercomactive = False\n')
</Action>
<Action Enabled="False">
Window.FindWindow(u'VoxCommando.exe', None, None, None, None, None, False, 0.0, 0)
</Action>
<Action Enabled="False">
Window.SendMessage(273, 1, 326, 0)
</Action>
</Macro>
<Macro Name="Start Program: VoxCommando.exe" id="40">
<Action>
System.Execute(u'C:\\VoxCommando\\VoxCommando.exe', u'', 0, False, 2, u'')
</Action>
</Macro>
</Folder>
</EventGhost>