0

I would like to use an AI subtitles sync program (Alass). This is very simple in Linux/bash but I was trying for a way to achieve this using Windows and the context menu. So here my requirement:

  • make the context menu appear when two files are selected AND one of the two files is .srt
  • Given I would select two files in no particular order, the first (%1) would always need to be the video one (mkv/mp4/avi/etc)
  • The second (%2) would always need to be the .srt
  • the third can a static out.srt created in the very same folder where %1 and %2 live

Essentially the user action would be:

  • Select video and subtitles while pressing CTRL
  • right click
  • select "Sync sub"
  • The "C:\program files\alass.bat %1 %2 out.srt" is called
  • Alass is run and saves on the path where %1 and %2 live

Currently using this:

Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\.srt\shell\Alass

command=C:\WINDOWS\system32\cmd.exe /D /C "Start "" /D "%V" "C:\Program Files\Alass\alass.bat" \"%1\" \"%2\" alassout.srt"

But I get a "The app does not have an app associated.... error message" plus the context menu appears only if the .srt only is selected

What I would need help with is:

  • How to I make a .srt extension always be passed as %2 (perhaps a modification of the .bat is needed for this to identify .srt and whatever video in whatever order they are passed?)
  • How do I make the context menu appear if one of the two files is .srt
  • What do I need to pass to the Context command to make it save in the very same folder where %1 and %2 live?

Thank you!

rs232
  • 105
  • 1
  • 10

0 Answers0