This post describes the difficulty of restarting Shapr3D on macOS to get around bugs, and a Shortcut (shortcuts app) to easily help you monitor it until it quits.
Problem:
Shapr3D still has a bunch of bugs on macOS and many of them are solved by simply quitting and restarting it.
Unfortunately, Shapr3D Takes a reeeealy long time to actually quit behind the scenes. To the user it looks like it quits instantly, but it’s actually still running just with no user facing stuff. On my machine it’s ~37 seconds before it finally quits.
If you restart it before it’s fully shut down it just redraws the window instead of actually “restarting” because it never actually quit.
So, if you need to actually restart it to get past a bug you need to wait until it fully quits, so you need to know when it fully quits.
Solution:
Create a new Shortcut with the Shortcuts app that opens Activity Monitor and searches for Shapr so that you know when it’s actually quit and can be restarted.
Here’s what it looks like:
It’s a simple 2 step Shortcut.
- “Open App” action with “Activity Monitor” as the name of the app to open.
- “Run Applescript” action with the following text in it.
on run {input, parameters}
(* Your script goes here *)
tell application "Activity Monitor" to activate
tell application "System Events"
keystroke "f" using {command down, option down}
keystroke "Shapr"
end tell
return input
end run
You’ll Also need to go grant the Shortcuts app the permission to type things.
System Settings > Privacy & Security > Accessibility - toggle the switch next to Shortcuts.
Full disclosure this does mean that if you run shortcuts you didn’t create they could do anything you can do with a keyboard, which is a potential security risk.
When you run this script it opens Activity Monitor, and types the keycombo to select the search box. Then it types in “Shapr”. After a short pause for the net poll of Activity Monitor you should see this.
just wait for the row with the Shapr3D icon to go away. That’s when it’s finished quitting.
BONUS:
Did you know you can invoke shortcuts from the Elgato Stream Deck? Now I’ve got a physical button on my desk that I can press to invoke this. Yes, I have to do it that often.