by BoBo » 03 Feb 2022, 02:03
Code: Select all
#SingleInstance Force
mmedia = "%1%"
DetectHiddenWindows, On
Process, Exist
hAHK := WinExist("ahk_pid " . ErrorLevel)
OnMessage(MM_MCINOTIFY := 0x03B9, "MM_MCINOTIFY")
;OnMessage(MM_MCISIGNAL := 0x03CB, "MM_MCISIGNAL")
DllCall("winmm\mciSendStringA", "str", "open " . mmedia . "alias mmedia type mpegvideo style overlapped shareable", "Uint", 0, "Uint", 0, "Uint", 0)
DllCall("winmm\mciSendStringA", "str", "play mmedia notify", "Uint", 0, "Uint", 0, "Uint", hAHK)
MM_MCINOTIFY(wParam, lParam)
{
/*
MCI_NOTIFY_SUCCESSFUL = 0x1
MCI_NOTIFY_SUPERSEDED = 0x2
MCI_NOTIFY_ABORTED = 0x4
MCI_NOTIFY_FAILURE = 0x8
*/
DllCall("winmm\mciSendStringA", "str", "close mmedia", "Uint", 0, "Uint", 0, "Uint", 0)
ExitApp
}
Kann mir/uns das mal jemand "übersetzen"? Ich vermute hier wird ein sound (media file) detected??
[code]
#SingleInstance Force
mmedia = "%1%"
DetectHiddenWindows, On
Process, Exist
hAHK := WinExist("ahk_pid " . ErrorLevel)
OnMessage(MM_MCINOTIFY := 0x03B9, "MM_MCINOTIFY")
;OnMessage(MM_MCISIGNAL := 0x03CB, "MM_MCISIGNAL")
DllCall("winmm\mciSendStringA", "str", "open " . mmedia . "alias mmedia type mpegvideo style overlapped shareable", "Uint", 0, "Uint", 0, "Uint", 0)
DllCall("winmm\mciSendStringA", "str", "play mmedia notify", "Uint", 0, "Uint", 0, "Uint", hAHK)
MM_MCINOTIFY(wParam, lParam)
{
/*
MCI_NOTIFY_SUCCESSFUL = 0x1
MCI_NOTIFY_SUPERSEDED = 0x2
MCI_NOTIFY_ABORTED = 0x4
MCI_NOTIFY_FAILURE = 0x8
*/
DllCall("winmm\mciSendStringA", "str", "close mmedia", "Uint", 0, "Uint", 0, "Uint", 0)
ExitApp
}
[/code]Kann mir/uns das mal jemand "übersetzen"? Ich vermute hier wird ein sound (media file) detected?? :think: