I think the tooltip stay too long before disappear. I tried this today:
Code:
x,y=reaper.GetMousePosition()
reaper.TrackCtl_SetToolTip("hello", x, y, false)
h=reaper.GetTooltipWindow()
time=os.time()
function countdown()
local check=os.time()
if check-time>=2 then --close the tooltip after 2 seconds
reaper.JS_Window_Destroy(h)
else
reaper.defer(countdown)
end
end
countdown()
Actually it worked. But if I run this script again, the tooltip never show, until I restarted REAPER. It looks like it was literally destroied. So is there a correct way to close it?