Macro to end QuickTime vidoe recording at in 2.5 hours

I tried to make a macro to start QuickTime recording end at a specific time.

The site that I want recorded requires passwords. It is too complicated to automate it. So I manually open it and start playing the video.

Getting QuickTime to automatically start recording seems very difficult.But there is a problem with how QuickTime is opened. I don't want to save into iCloud. I used Other to open QuickTime in the applications folder.

Now the problem is to get the stop button c(ommand control escape) at a specific time. For example in 2.5 hours. I think I need an apple script.

It would be good to save the video in a specific folder.

I know my macro does not work. Anyway, here it is.
QuickTime timer.kmmacros (2.9 KB)

That sounds like an easy problem to solve. Try this two-action macro. It waits 2.5 hours then sends your key to the frontmost app. There's no need for AppleScript to wait 2.5 hours.

1 Like

Thanks,
That is easy.
Ellen Madono

Sorry to say that but this is by far no way to solve such problems Airy (@Airy).

What if Ellen (@Ellenm) wants to trigger other Macros during that time which are to assist her in her workflow ?!

I can tell you what’s about such Macros - they will never get triggered properly - in fact they mostly will get aborted.

I have a better solution:

  • Build three Macros and an AppleScript App.
  • The first Macro launches the AppleScript App which should ask for the Time how long the recording takes and stay open that exact time, then trigger the second Macro to do the stuff that starts the recording before the delay and after that Macro three should be triggered which will finalize the recording.

I have up to 60 time based workflows which are based on this principle and never got any problems with the Macros I have to assist during these timed sessions. If I didn’t made them to act this way I would’ve had to do everything in these sessions manually without KM to assist me.

Greetings from Germany :de:

Tobias

1 Like

A challenge for you...

One macro that asks for the time duration, starts the recording, and creates a LaunchAgent that'll fire at the appropriate time to stop the recording and then remove itself.

I'm not saying that's a better approach, but it could be a fun little project :wink:

(It could also have applications elsewhere, since the agent would persist across restarts, would fire after wake if the set time had passed, etc.)

Your criticism is welcome. I'm not perfect.

The original question made no mention of any requirement to run other macros (or other apps) while this macro was running, so I didn't address that situation. Since the user marked my code as a "solution", maybe I was right. I was assuming that Quicktime was running and the Mac was unattended while Quicktime was recording.

2 Likes

You guys are super. Unfortunately, the sites where I am recording have clicking on the site for log in, then and email address field, then a passwords. This is beyond my knowledge so I am doing it by hand.

Did my solution solve your problem? You marked it as a solution. Now in your last post it sounds like you aren't satisfied. I don't know what the problem is. You said "I am doing it by hand". What are you "doing by hand"? I provided a macro which simply solved the problem of waiting for 2.5 hours and then sending a key to your app. Are you trying to automate something else, like the login? Almost everything is solvable, but I'm unable to understand what the problem is now.

I found this YouTube. Many years ago I tried to learn KM through YouTube. It was so fast and I was so confused. Years later, today I saw this kind and slow video. I totally get it. I don't have to get into the video manually. Here it is: https://youtu.be/O_AQX9TAs6M?si=v6S9xHYF_HncIXpl

Thanks. All of you on the forum are so helpful.
Even a slowly digital grandma can learn KM.

2 Likes

This is simply not true.

That macro, sitting paused, will not affect any other macro operations.

The only reason not to use this approach is because Keyboard Maestro will use a little more CPU, and if you were to relaunch the Keyboard Maestro Engine or cancel all macros in that time, the final action would not execute.

There are other more complex ways of resolving this, but for this purpose, especially with a new Keyboard Maestro user, this is definitely a good solution and will have no negative impact on using other macros during the time.

1 Like

would not execute. (Sorry to correct you, boss. But there's a new user here who might not understand.)

1 Like

@Macs_Productivity is a poster here -- have a look at his other KM videos too, they're all worth a watch (whatever your KM experience level).

2 Likes

While macros are fun and the below can certainly be wrapped in a macro to make it more user-friendly -- you only need a single shell command:

screencapture -v -V 9000 -R 32,210,1090,612 ~/Documents/My\ Recordings/"$(date "+%Y-%m-%d at %H.%M.%S")".mov

...will screen-record a 1090x612 rectangle anchored at 32,210 for 2.5 hours (9000 seconds), saving the date- and time-stamped file to ~/Documents.

2 Likes

@Nige_s I have no idea where I would place the shell command. In another thread, I was advised to state my goals more clearly so that I can get step by step help. I want to be able to use advise such as yours in KM, so I am 1. storing your shell script. 2. I plan to get more step by step help. I need to record videos of various lengths, so, state my goals more clearly and learn from there. Thank you for your help.

That command, as it is, is more for the assembled helpers. It can be made much more friendly for your macro but, as you say, more detail of how you are going to use this is needed.

  1. Where do you want the files to be saved, or do you want to pick somewhere when you run the macro?
  2. Do you want the files to be named in a consistent way, perhaps with the date and time of the start of the recording, or do you want to create your own name at the start of the macro?
  3. Is the area to record always going to be the same -- if so, what? Or is it the entire front window, or part of the front window (which part?), or maybe the whole screen?

The time is the easiest bit! We just pop up a dialog for you to fill in...

@Nige_S Those are great questions. I will fill out my dream macro. I used the app Downie that you suggested. It is so cheap, easy to use and will save me hours of time recording videos for study. Thank you for all your kind help.