How to click Mac security alert using applescript - applescript

I am launching and application using apple script but not able to click on "No" in security prompt" How can we do it?

Related

How do I fix "file can't be opened because it is from an unidentified developer" error?

I've published a simple text editing app in the macOS App Store. However, when users select a text file in Finder, choose to "Open with" my app, and double-click the file, they get:
In Xcode I have checked "Automatically manage signing" and in Capabilities I have App Sandbox turned on and "User Selected File" set to Read/Write.
I'm trying to fix this for all users not just on my system.
This error did not have to do with my app, but instead applies to any app and the way "Open with" interacts with Gatekeeper on macOS.
Further details can be found in a discussion about why macOS says I can't open a document from an unidentified developer.

Exported MacOS app prompts "Sign in to use this application on this computer" and "Damaged"

In XCode 8.2 I have two MacOS apps under development that I will refer to as A and B. From Organizer I am able to "Export as a macOS App" for app A and run it on another mac without error. But when I do the exact same for app B the other mac displays a prompt "Sign in to use this application on this computer" and "B was purchased using the App Store on another computer...". I shouldn't have to sign in, but when I do the next result is the "Damaged" error.
Both have "Automatically manage signing" selected. I can validate both for the App Store and "Developer ID-signed".

automating clicking open on " is an application downloaded from the internet" using ant

I am automating an application install on mac os 10.7 to 10.10 using ant and would like to automate clicking the open button on the "xyz is an application downloaded from the internet...." box, preferably using the gui in a testable way. I've looked at applescript but the editor doesn't seem to recognise that button click. How can I do this?

How to programmatically add exception for unidentifed .app

When I create a .app on the desktop of mac os x 10.9, and when user clicks it, they get "unidentified developer" error.
However if they right click, then click open, then from dialog box click open, it adds an exception so in future launches it doesnt throw the "unidentified developer" error and launches.
I was wondering what is the programmatic way or command line or carbon or cocoa api to programmatically add this exception. i know code signing is an option but that requires purhcase of 100$ license, i just want to make a shortcut on the desktop for users of my addon.
image of adding exception with right click > open > open:
It's possible to remove the Quarantine Flag xattr from your application using:
xattr -d com.apple.quarantine My.app

Disable Script Prompt on Mac OSX Lion?

I was wondering...
Is it possible to disable the prompt on Mac OSX Lion that says.
Are you sure you want to run this script? [Yes, Cancel]
I added this script to the "Login Items" File to start automatically when I login, but the prompt still pops up. Any Ideas?
Thanks.
When an Applescript is saved as an application so that it can be run independently of Script Editor with a double-click, there is an option to have a "startup screen" which, in Snow Leopard and before (I don't have Lion), offers a choice between "Run" (the default) or "Quit". I imagine you might have enabled that feature without realizing, or maybe in Lion it is now activated by default.

Resources