Code: Select all
!s:: ;set hotkey to ctrl+s
Code: Select all
#Persistent
#s:: ;set hotkey to Win+s
IfWinExist, Subtitler (lite) mod
{
MsgBox,64,Autohotkey Script started,Autohotkey Script started.Subtitler lite button will be pressed 10 times per second,5
While WinExist(Subtitler (lite) mod)
{
WinActivate Subtitler (lite) mod
Send {Enter}
Sleep, 100
}
MsgBox,0,Autohotkey Script ending,Autohotkey script ending. Press Win+s to restart,4
}
else
{
MsgBox,0, Error, Couldn't find window with title "Subtitler (lite) mod". Press Win+s to try again.
}
Return
Code: Select all
#IfWinExist, Subtitler (lite) mod
#s:: ;set hotkey to Win+s
MsgBox,64,Autohotkey Script started,Autohotkey Script started.Subtitler lite button will be pressed 10 times per second,5
While WinExist(Subtitler (lite) mod)
{
WinActivate Subtitler (lite) mod
Send {Enter}
Sleep, 100
}
MsgBox,0,Autohotkey Script ending,Autohotkey script ending. Press Win+s to restart,4
Return
#IfWinExist
Code: Select all
WScript.Sleep 10000
I had trouble with the original AHK script as well, as it requires the window to be focused. The AHK code below will send the Enter command even if the Subtitler window is minimized. It doesn't interfere with any other windows unless that window also contains 'Subtitler (lite) mod' in the window title. Tested in AHK 2.0 but I'm pretty sure it can easily be run in 1.0 as well.Is it possible to send a keystroke to an inactive window (without activating the "Subtitler (lite) mod" window)?
Is it possible to remember current active application (window), then temporarily activate a dialog box of some VLC Lua Extension and then reactivate the previous application using the AutoHotkey?
Code: Select all
#SingleInstance
TargetWindw := "Subtitler (lite) mod"
#If WinExist (TargetWindw)
MsgBox "Starting Subtitler"
while WinExist(TargetWindw)
{
Sleep 100
ControlSend "{Enter}",,TargetWindw
}
return
Esc::
MsgBox "Ending Subtitler"
ExitApp
return
Code: Select all
TITLE="Subtitler \(lite\) mode"
while true
do
xdotool search --name "${TITLE}" key "Return"
sleep 0.1
done
Return to “Scripting VLC in lua”
Users browsing this forum: No registered users and 7 guests