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.
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.
Stop currently playing sound
Stop currently playing sound
Is there a way to Stop currently playing sound within EG? thanks 
Automation is life.
Win7 64bit
EG: v0.5.0-rc4
Win7 64bit
EG: v0.5.0-rc4
Re: Stop currently playing sound
From what source?
Re: Stop currently playing sound
eventghost:blaher wrote:From what source?
system > sound card > play sound
Automation is life.
Win7 64bit
EG: v0.5.0-rc4
Win7 64bit
EG: v0.5.0-rc4
Re: Stop currently playing sound
You could press mute using the same part of EventGhost, but I'm not sure how to abort it there. You could always use another external program that can be controlled like winamp, or foobar, and stop it instead.
Re: Stop currently playing sound
Well I have tried with AutoHotkey which would be the most ideal solution but I can't make sound work there for some reason. i don't fancy the idea of having to open a program with a UI just to play a sound file.blaher wrote:You could press mute using the same part of EventGhost, but I'm not sure how to abort it there. You could always use another external program that can be controlled like winamp, or foobar, and stop it instead.
Automation is life.
Win7 64bit
EG: v0.5.0-rc4
Win7 64bit
EG: v0.5.0-rc4
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Stop currently playing sound
I suggest you use CrystalWolf Audio Player. This is a very small, but very good audio player.Remarks :
- The path to the file to be played can be specified as Command line options:. It can be also "{eg.event.payload}" (including the quotation marks !).
- In the combo box you can select Window options: Minimized, so it can be invisible.
You know flattr ? You can 

- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Stop currently playing sound
If it is a big problem, you can use (for example) command line player DLC.Note:skribb wrote:i don't fancy the idea of having to open a program with a UI just to play a sound file.![]()
Command line options may be, for example -w "{eg.event.payload}" (including the quotation marks !).
Contents of Python Script:
Code: Select all
from win32com.client import GetObject
from win32api import OpenProcess, TerminateProcess, CloseHandle
PROCESS_TERMINATE = 1
WMI = GetObject('winmgmts:')
processes = WMI.InstancesOf('Win32_Process')
p = WMI.ExecQuery('select * from Win32_Process where Name="dlc.exe"')
pid = p[0].Properties_('ProcessId').Value
handle = OpenProcess(PROCESS_TERMINATE, False, pid)
TerminateProcess(handle, -1)
CloseHandle(handle)You know flattr ? You can 

Re: Stop currently playing sound
Thank you for the tips
Automation is life.
Win7 64bit
EG: v0.5.0-rc4
Win7 64bit
EG: v0.5.0-rc4
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Stop currently playing sound
This is obviously intended for all users who will solve a similar problem.skribb wrote:Thank you for the tips
It would be nice if you posted your final solution.
Pako
You know flattr ? You can 

Re: Stop currently playing sound
I like the way you think.Pako wrote:This is obviously intended for all users who will solve a similar problem.skribb wrote:Thank you for the tips
It would be nice if you posted your final solution.
Pako
Concerning my solution, I always have like 100 projects simultaneously, so I probably won't get thru with this for several months
Automation is life.
Win7 64bit
EG: v0.5.0-rc4
Win7 64bit
EG: v0.5.0-rc4