This AppleScript works on Mojave:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application id "com.apple.systemevents" to tell application process "MobileDeviceUpdater"
set its frontmost to true
delay .2
tell window "Software Update"'s button "Not Now" to perform action "AXPress"
end tell
Here is a macro set to run this when the MobileDeviceUpdater application activates.
Click "Not Now" of "Software Update" of MobileDeviceUpdater .kmmacros (2.7 KB)
You might want to consider:
Create Tell Block for UI Interaction - "UI Browser Lite"
If the macro can't find the app, try running this in Script Editor:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
POSIX path of (path to application "MobileDeviceUpdater")
