6 Replies
      Latest reply on Oct 16, 2018 12:46 AM by malacate
      malacate Level 1 Level 1 (0 points)

        Hi guys,

        someone else has encountered this error with XCode 10 and Mojave? A simple fragment of code, that works fine on applescript, fail during the compilation on XCode with the error "Not authorized to send Apple Events to System Events. (error -1743).

         

        on applicationWillFinishLaunching_(aNotification)
             tell application "System Events"
                  -- any fragment of code that comes to mind
                  tell appearance preferences
                       set dark mode to not dark mode
                  end tell
             end tell
        end applicationWillFinishLaunching_

         

             I have searched in google but I have not found anything,

        thanks for help