How to translate this slider value change from AppleScript to JavaScript
问题 This bit of AppleScript works. If I have the System Preferences Sound panel open, and run it in the Script Editor app, it changes the volume to be at 50%. tell application "System Events" tell process "System Preferences" set v to value of slider 0 of window 0 log v set value of slider 0 of window 0 to 0.5 end tell end tell This, which tries to be the same thing, fails. Anyone know how to fix it? var se = Application("System Events"); var spp = se.processes["System Preferences"]; spp.windows