I am trying to make an app in Automator to hide or show the top menu bar and dock. I couldn't think of a better way to do it, so I used the "record" function so it could watch me carry it out. I tested it in automator, and it worked fine.
Like I said, it works fine when I hit the "run" button in Automator, but when I export it as an application, it opens System Preferences, but stops working as soon as it hits the "Watch Me Do" function, and gives me this message:
Here's a video of the whole thing if it helps: