PostMessage over seek crashes MediaMonkey

This forum is for reporting bugs in MediaMonkey for Windows 4. Note that version 4 is no longer actively maintained as it has been replaced by version 5.

Moderator: Gurus

VarunAgw
Posts: 11
Joined: Thu Apr 21, 2016 4:15 am

PostMessage over seek crashes MediaMonkey

Post 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.