OK, I'll just explain what I was trying to accomplish in my previous post.
Because I can't get it to work myself. Can't seem to wrap my head around global variables
(if that's even what I'm supposed to be using).
I'm trying to speed up the process of writing my own subtitle (.srt) files for my own videos.
• First I record the video, featuring my voice.
• Then I listen to the video again, slowly, and type out what I said.
• Then I (theoretically) use AHK to help make the time stamps.
• Lastly I move each subtitle under its respective time stamp, and save the document as .srt
So, how to use AHK to help with the time stamps?
Well, I wanted to use just a single key,
which I press down when I hear myself start speaking the sentence,
and I lift up when I finish speaking the sentence.
And what AHK will do is spit out the starting and ending time for each sentence, down to the millisecond.
Here's a proof of concept, with nonsense time stamps, and without the milliseconds:
Code: Select all
z:: {
global mySub
t:=FormatTime(A_Now,"00:00:ss;000")
SendInput(mySub++ "`n" t)
KeyWait("z")
}
z UP:: {
t:=FormatTime(A_Now,"00:00:ss;000")
SendInput( " --> " t "`n`n")
}
So in this case I'm just using [z] down for the start time stamp,
and [z] up for the ending time stamp,
but I guess I'd need to use another hotkey to start a “timer”,
which the [z] hotkey could go back and reference over and over.
Can someone help me out with this?
Thanks!