r/applescript • u/ale3smm • Aug 24 '21
Make mac react when I copy something to the clipboard
does anyone know how to automatically execute an apple script when copying specific text to the clipboard? thanks for the help.
4
Upvotes
1
u/Amal97 Nov 12 '24
Hey,
If you’re looking for a powerful clipboard management tool with lots of customization, check out my app, ClipScript.
It’s designed for macOS and allows you to create custom actions, manage your clipboard history, and apply functions like search and replace, regex, and case conversion directly on clipboard content.
It even has global shortcuts to streamline workflows, which can be a big time saver. Let me know if you have any questions or need more details!
ClipScript
1
u/copperdomebodha Aug 24 '21
You cannot hook the "copy" universally. This would require a kext ( kernel extension ) and that isn't possible under the current OS.
1
u/ssharky Aug 24 '21
This is kind of convoluted but I think that it would work.
i.e.
tell application "System Events" to keystroke "c" using {control down, option down, shift down, command down}Now when you press ⌘C, it should run your service instead of copying. Your service will copy and then run your custom script.
If that doesn’t work there may be a way to do this with karabiner, keyboard maestro, or btt
3
u/[deleted] Aug 24 '21
[removed] — view removed comment