Type your line of code, and leave the cursor at the end of the line and hit Fn-Ctrl-RETURN (hold down Fn and Ctrl, then hit the return key). To execute a script that you highlighted or selected use Ctrl-Opt-Cmd-RETURN.
To make things easy, here are the two paths that you would use with Acrobat XI on a Mac:
Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...