Substitutions - access to clipboard contents?

I frequently have to put time stamps into the documents I produce.
I do this pretty efficiently I think, I’ve got it down to 9 keystrokes:

F5 - to copy the time from my playback program
\t - triggers my substitution which replaces that with [Time: ]
to get my cursor in the correct spot to paste the time
Ctrl+V - to paste the time in
- to get my cursor back to my typing position.

And that gives me something like this: [Time: 0:19:25.3]

But it occurs to me that I could reduce that to four keystrokes if I could access the current clipboard contents via a code or something in the Substitutions dialog:

F5 - to copy the time
\t - to trigger the substitution which would replace that with [Time: %%ClipboardContents%%]

I don’t suppose that currently exists in any form? If not, maybe it’s wish list worthy?

I think the tool you want is AutoHotkey. It’s not just a macro playback tool; it’s an extremely sophisticated manager of system objects. Your script would be something like this, to put the timestamp on Ctrl-Alt-T. :

; AutoHotkey inserts some additional mumbo jumbo here when you create a new script in Explorer.
^!T::
FormatTime, TimeString3,, H:mm:ss
send [Time: %TimeString3%]
return

Although I don’t know about those tenths of a second in your example. You probably would need the %clipboard% variable in that case.

Good Luck
Jerome

Thanks for that. I think that’s the second (or maybe third) time that program’s been mentioned in response one of my requests, I really must look into it sometime. :laughing:

Meanwhile, I streamlined the process somewhat using just Scrivener.

F5 to capture the time (that function’s built into the playback software, and its keyboard shortcuts work system wide - so if Scriv has any native F5 function, I’m overriding it)

Ctrl+V
\

which gives me something like this: \0:10:44.8\ in the document.

And then using the Project Replacements at compile, I set up a replacement for $@\ to change it to [Time: $@]. In early testing that seems to work out pretty well, and gets me down to 5 keystrokes.

I’ve bookmarked AutoHotKey to look at when I get a chance.

The best way I’ve found to solve the time/date stamp problem in my Windows computers is with the ArsClip clipboard utility:

http://www.joejoesoft.com/vcms/97/

In addition to providing a highly customizable way to save multiple Windows clipboard items, ArsClip supports Permanent Clips/Macros. Said macros include the ability to create a user-configurable time stamp format which can then be pasted with a user-specified key combination.

In my specific case, I created an ArsClip macro named TimeStamp of this form:

[DATE="yyyy-mm-dd_hhmm_"]
I then assigned that ArsClip macro to CTRL+SHIFT+T. Pressing that key combination immediately pastes the time ala 2013-11-22_1640_.

ArsClip macros provide many other keystroke and command capabilities.

Cheers & hope this helps,
Riley
SFO

Of course, if you’re happy with the system time format and just want the current date stamp in your text editor, Ctrl-F6 (Edit/Insert/Current Date and Time) always works. :slight_smile:

That just uses the Windows Long date + Long time formats from the Region and Language control panel.

Good to know.

In my case it’s not actually the system time I need, but the current playback position in the recording I’m working on (just realized I never actually said that - oops), but that’s certainly a good tip none the less. I’ll file that for future reference.

Edit: I don’t suppose there’s any chance of getting a keyboard shortcut for “Insert Playback Position of Current Media File” (or something along those lines)? If that was there I might be able to use Scrivener for playback as well.

I’ll look into that as well.

Thanks all.

Actually I did notice that you were specifically extracting time stamp information out of a video player, but the topic kind of drifted so I figured any future readers ought to know you don’t need a macro program to insert the current time and date. Not to knock text macro programs though! I am a huge fan of those and make extensive use of mine. :slight_smile: I’ve probably saved who knows how many hundreds of hours of typing by now.

Or, it would be really nice if you could make a Scrivener Link to a timestamp in a video. Then you could just click that thing and it would load up on the other split and start playing from where you marked the position. I don’t know if that’s what you’re looking for, or how feasible that is with the toolkit we’re using, but it’s just something that came to mind.

That’s an interesting idea as well.

I’m transcribing audio interviews and one of my clients once asked for a time stamp in the document after every five minutes of audio. So I just do that for everyone now as a matter of course.

Some require more time stamps as well - for instance when speaking to someone using an augmentative and alternative communication device it’s important to know how long it took them to compose an answer on that device. Or with people with brain injuries (or the elderly) it can be important to know how long they’ve paused to think of an answer. Or if there’s an interpreter involved, it can be useful to know how long that process took. Et cetera.

It also recently occurred to me that I could potentially be making way better use of the power of Scrivener. At the moment I’m just producing a transcript pretty similar to what I used to get out of OpenOffice. But with some judicious document splitting I could be also offering a lot more options in terms of the files I produce. For instance a version of the transcript with just the respondent’s answers (or in the case of a focus group a separate file for each respondent). Are they looking for certain keywords for their data analysis? I could compile a collection of just the sections where those keywords cropped up.

Of course all that would require a lot of time stamps (or some sort of marker) just so the RA’s receiving all this can keep everything straight and in continuity on their end, so that’s why I was interested in streamlining my time stamp process as much as possible.

And I have other ideas for features that aren’t even in the Windows version yet (or maybe not even on the Mac side yet) - like being able to export filtered word frequency lists for a single interview, or a whole study of 40 or so interviews, or any subset thereof.

And once I can sync with Aeon Timeline I could potentially produce a visual representation of the interviews - who spoke when, for how long, when keywords cropped up. Did one person dominate the focus group or was the discussion evenly split.

And I’m sure I can come up with other things I could potentially be doing.

I don’t even know if any of that would be useful in terms of the data analysis, but I thought if I have the ability to do those kind of things, I should learn how and then offer it (perhaps at an added fee :mrgreen: ).