I tried to piece together a macro this evening that would do a fast user switch to a different user account, launch an app, then switch back. The macro works to switch accounts, and then it launches the app successfully, but fails to perform the fast user switch BACK to the original account.
I was kinda surprised the macro kept executing once the other account was launched… Could this actually work?
Ok, so I modified the above to switch into the Chris account at login. BTW, the “at login” trigger isn’t working for me on Sierra, but the same macro executes as expected on 10.11. So on my Sierra machine I have an AppleScript call the macro at login. This works. I switch out of my user, and get the login screen for Chris. The macro is able to insert the password. (Yes yes I know plain text…) That all works.
I then made a new macro in the Chris Account, and an Applescript to run it 30 seconds after login. The macro sucessfully triggers, but the Fast User Switch step fails. In the console it reports:
2017-01-16 17:19:10 Async NSAppleScript error 2017-01-16 17:19:10.231 CompileAppleScript[12458:1709245] Keyboard Maestro Internal AppleScript Execute Error: System Events got an error: Can’t get attribute “AXDescription” of every menu bar item of menu bar 1 of process “SystemUIServer”.