PostMessage over seek crashes MediaMonkey

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: PostMessage over seek crashes MediaMonkey

PostMessage over seek crashes MediaMonkey

by VarunAgw » Fri Jan 15, 2021 7:51 pm

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.

Top