Code:
function GetMarkerPos(name0)
local retval, num_markers, num_regions = reaper.CountProjectMarkers( 0 )
for idx = 1, num_markers + num_regions do
local _, isrgn, pos, _, name = reaper.EnumProjectMarkers3( 0, idx-1 )
if not isrgn and name:match(name0) then return pos end
end
end
pos = GetMarkerPos('test')