Page 1 of 1

PostMessage over seek crashes MediaMonkey

Posted: Fri Jan 15, 2021 7:51 pm
by VarunAgw
I have this code snippet.

/*
Bug when seeking out of range in left and maybe right too
^+a::
RButton & WheelUp::
; Seek backward
DetectHiddenWindows On
PostMessage, WM_COMMAND,40144,,,ahk_exe MediaMonkey.exe ahk_class TFMainWindow
Return

^+s::
RButton & WheelDown::
; Seek forward
DetectHiddenWindows On
PostMessage, WM_COMMAND,40148,,,ahk_exe MediaMonkey.exe ahk_class TFMainWindow
Return
*/

The issue is when I seek backward and it reaches the beginning of the song, instead of doing nothing, it tries to seek anyway which causes MediaMonkey to crashes.

Can you please add a check for duration before seeking.