Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'mp'
- function GotoA()
- local A = tonumber(mp.get_property("ab-loop-a"))
- if A ~= nil then
- mp.command("seek " .. A .. " absolute")
- end
- end
- function GotoB()
- local B = tonumber(mp.get_property("ab-loop-b"))
- if B ~= nil then
- mp.command("seek " .. B .. " absolute")
- end
- end
- -- если вдруг метка не поставлена,
- -- mp.get_property("ab-loop-x") возвращает "no"
- -- а tonumber("no") возвращает nil, так что всё норм
- mp.add_forced_key_binding("ctrl+h",GotoA)
- mp.add_forced_key_binding("ctrl+l",GotoB)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement