' Open SRT file (subtitles) in Google Chrome to translate it ' Video
Set toolkit = CreateObject("VbsEdit.Toolkit") files=toolkit.OpenFileDialog("","SRT Files (*.srt)|*.srt",False,"Open a subtitle file") If UBound(files)<0 Then Wscript.Quit End If
Set WshShell = WScript.CreateObject("Wscript.Shell")
On Error Resume Next chrome = wshshell.RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe\") If Err.number<>0 Then chrome = wshshell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe\") End If
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
If fso.FileExists(chrome) Then wshshell.Run """" & chrome & """ """ & dest & """",1,False Else WScript.Echo "could not locate Chrome." End If