Good morning all, I would like to be able to turn the system sounds on my mac off (and back on) with an applescript activated as an extension for Alfred.
I have little knowledge of applescripts but I have found that I can open the system preference pane. How do I check and uncheck the "Play user interface sound effects" and "Play feedback when volume is changed" check boxes?

The start of my code is as follows
tell application "System Preferences" to activate (reveal anchor "effects" of pane id "com.apple.preference.sound")
Thanks guys