Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ilayaharoni

Suspended
Original poster
Feb 20, 2021
6
0
I want to create a shortcut that disables all notifications when I open an app (including banners (so dnd is not what I want)), and when I close that app the shortcut enables back all notifications. To do that I need to change the value of "show previews" in the settings.

How can I do it?
 
I think you can use “do not disturb” to achieve this.

EDIT: create a short cut like “when open app whatever do -> set do not disturb to ON -> whatever else you want”
 
I think you can use “do not disturb” to achieve this.
it does not take out banners previews, I mentioned it.
but lets say it does, I do want to change other settings values for other shortcut ideas. Not just for this idea.
so do you have a suggestion on how to do it?
 
you could set “do not disturb” simply to “always”, couldn’t you?

EDIT: if internet is not required set the device in airplane mode while using the desired app e.g. keynote
 
Are you paying attention to what I said?
I do.
"I do want to change other settings values for other shortcut ideas"
But according to your first post you want to set certain things (absolutely no notification) while you run a certain app.
So create a shortcut where you set do not disturb to always, as well as show preview to never WHILE running your app.

If you running into problems getting the ”original” default values restored when ending your shortcut, do an additional one which allows to all defaults and call this whenever needed.
 
Thank you.
But the point is to find out how to change setting value from settings app on shortcuts.
Lets say I want to do something like when I exit safari browser, clear safari browser history.
Is changing setting value from settings app on shortcuts can be done?
 
While you can change some settings directly from within Shortcuts, others require user intervention. prefs:root=SAFARI is such a case. What I find surprising is that this information is literally at your finger tips. Did you ever Google/DuckDuckGo/whatever? I recommend some reading on programming in general and shortcuts in particular and then participate on something like reddit/r/shortcuts.
 
While you can change some settings directly from within Shortcuts, others require user intervention. prefs:root=SAFARI is such a case. What I find surprising is that this information is literally at your finger tips. Did you ever Google/DuckDuckGo/whatever? I recommend some reading on programming in general and shortcuts in particular and then participate on something like reddit/r/shortcuts.
I know that, you can open a settings page by opening the url prefs:root=SAFARI or something, but, I have not managed to change settings or click on settings like clear safari browser history.
Let me know if manage to find out on how to do that. Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.