lihaoyun6 / QuickRecorder

A lightweight screen recorder based on ScreenCapture Kit for macOS / 基于 ScreenCapture Kit 的轻量化多功能 macOS 录屏工具
https://lihaoyun6.github.io/quickrecorder/
GNU Affero General Public License v3.0
4.49k stars 222 forks source link

Support for cli based automation! #128

Open idvorkin opened 2 months ago

idvorkin commented 2 months ago

This tool is fantastic! Works perfectly out of the box. Would be great if we could automate this via the command line, then we can control via any tool we'd like (for me alfred)! Happy to share automations out with folks!

I don't know how other tools do the bridge from cli to service, but if someone setup the server, I could probably put a client together.

idvorkin commented 2 months ago

Hymn, looks like yabai uses sockets ...

https://github.com/koekeishiya/yabai/blob/61bbb9b906a6c24d04292ec3c1f88f9c057d9e6c/src/yabai.c#L86

lihaoyun6 commented 2 months ago

I added AppleScript support to QuickRecorder v1.4.8. You can use the built-in "Script Editor" app of macOS to view the syntax dictionary of QuickRecorder to learn how to use it.

Please note: If you call QuickRecorder when it is not running, please use the activate keyword to activate it first, otherwise it will not work properly.

Example:

tell application "QuickRecorder"
    activate
    record window titled "Google" in application "Safari"
end tell
idvorkin commented 2 months ago

Wow, that was super fast. I'll give it a try thank you.

idvorkin commented 2 months ago

Hymn, when I try to open the app on a new computer, now it's saying it's not signed, does something need to be signed again? (I tried both with brew and direct download )

I can see if my other computer updates when I have access in a few days.