Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nelly22

macrumors 6502
Original poster
Sep 29, 2009
366
5
Why i get this dialog every time i launch my AppleScript app? Should it happen only once?

“SysLogger“ wants access to control “System Events“. Allowing control will provide access to documents and data in “System Events“, and to perform actions within that app.
 
AppleScript application properties and global variables are saved within a script file, so each time the application is run it gets modified, which makes it a different application as far as the system is concerned. The application should be code-signed, embedded script files can be made read-only, or the script application can be created in Xcode to prevent it from being modified when run (note that properties will not persist, so different methods will need to be used to save items between runs).
 
So there is two ways to do it, code-sign app, embedded script files made read only or create script app in Xcode.

I'm newbie. Is there any guide how to do these things?

I installed Xcode and it has tons of confusing stuff like General, Capabilities, Resource Tags, Info, Build Settings, Build Phases, Build Rules, etc.
 
Well, Xcode is a beast no matter how you look at it, so it depends on how serious you are wanting to get. The easiest way, especially if you are just using it yourself, would be to just go to the script inside the application bundle and use the Get Info panel to change its permissions to read-only.

If you are wanting to use Xcode, go to Preferences > Accounts, log in with your Apple ID, select your Team (Personal Team), then add a new certificate with Manage Certificates. After making a certificate, you can set the Signing Certificate (for whatever build) in the General tab to Mac Developer. Beware if you are using Xcode 10 in Mojave, as there are a lot of extra entitlements and permissions gotchas.

If you have Xcode installed, there is also the codesign shell utility, which you can use with a self-signed certificate you create with the Keychain Access utility.

Piece of cake (?!)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.