Automatically re-enable PopClip after a set time

By email:

For my job, I need to turn off PopClip during demos to avoid confusing people or interrupting the demo. I then sometimes need to remember to re-enable it. It would be great if there were a feature to disable PopClip for the next 1 hour or 30 minutes, for example. After that period, it would re-enable itself. It would be like turning on Do Not Disturb on a Mac.

Thats a cool idea. I wonder if this would be better done using some kind of automation.

PopClip has an AppleScript interface, so you can turn it off and on as follows:


tell application "PopClip" to set enabled to true -- turn on

tell application "PopClip" to set enabled to false -- turn off

tell application "PopClip" to set enabled to not enabled -- toggle

I’m now going to paste this whole text into ChatGPT to get it to suggest how to use Shortcuts to do what you need…

ChatGPT, what say you?


ChatGPT generated response:

To automate the process of enabling and disabling PopClip for a specific duration as you’ve described, you can use Apple’s Shortcuts app in conjunction with AppleScript. Here’s a step-by-step guide to create a shortcut that turns off PopClip for a specified duration and then re-enables it:

  1. Open the Shortcuts App: This app is available on macOS and allows you to create custom workflows.

  2. Create a New Shortcut:

    • Click the “+” button to create a new shortcut.
    • Name your shortcut, e.g., “PopClip Timer”.
  3. Add AppleScript to Disable PopClip:

    • Add a “Run AppleScript” action.
    • Enter the following script:
      tell application "PopClip" to set enabled to false -- turn off
      
  4. Add Wait Action:

    • Add a “Wait” action after the AppleScript action.
    • Set the duration for how long you want PopClip to remain off (e.g., 30 minutes or 1 hour).
  5. Add AppleScript to Re-Enable PopClip:

    • Add another “Run AppleScript” action after the wait action.
    • Enter this script:
      tell application "PopClip" to set enabled to true -- turn on
      
  6. Save and Test the Shortcut:

    • Save your shortcut.
    • Run it to test if it works as expected.
  7. Optional - Add Shortcut to Menu Bar or Dock:

    • If you want quick access to this shortcut, you can add it to the menu bar or the dock for easy activation.

This setup should meet your requirement of a temporary disable feature for PopClip, similar to the Do Not Disturb mode on a Mac.

1 Like

It works! Testing here with just a 2 second wait:

CleanShot 2023-11-15 at 09.53.11

I would suggest pinning it in the menu bar:

CleanShot 2023-11-15 at 09.55.39

1 Like

Found this to be really useful.

@nick I like your approach of consolidating all customer questions to the forum, so it’s easily searchable and available for everyone! Will try to emulate this approach at work! :smiley:

BTW, here is an Alfred workflow. It does- toggle, turn on/off, turn off for X mins

https://www.dropbox.com/scl/fi/7h1lvxvcpzh6p55muuwbe/PopClip.alfredworkflow?rlkey=dto11fm7wox3jf4ldo0xc1ih6&dl=0

1 Like

Thanks for sharing the Alfred workflow!

Yes it’s been a good approach. I can more easily use screenshots/videos, links and code formatting on the forum too than I can in an email. So I will often reply to the customer’s email with a forum post and email them back a link to it. And then, like you say, it becomes searchable in future too. (Including searchable by me, since I forget about stuff I have already written really quickly, and it’s not getting better as I get older :smile:)

1 Like