AMApplicationBuild 515 AMApplicationVersion 2.10 AMDocumentVersion 2 actions action AMAccepts Container List Optional Types com.apple.applescript.object AMActionVersion 1.0.2 AMApplication Automator AMParameterProperties source AMProvides Container List Types com.apple.applescript.object ActionBundlePath /System/Library/Automator/Run AppleScript.action ActionName Run AppleScript ActionParameters source # The following function, convertPathToPOSIXString(thePath), is from Apple's documentation page. on convertPathToPOSIXString(thePath) tell application "System Events" try set thePath to path of disk item (thePath as string) on error set thePath to path of thePath end try end tell return POSIX path of thePath end convertPathToPOSIXString on run {input, parameters} set file_open_raw to input as string set file_open to convertPathToPOSIXString(file_open_raw) try display alert "Open file?" message ("You are about to open " & file_open & ". \n\nBeware that if you downloaded the app from a website that you do not usually browse on or is not known, it may most likely damage your operating system and/or your files.") buttons {"× Cancel", "→ Open"} default button 2 cancel button 1 do shell script ("sudo xattr -r -c '" & file_open & "' && sudo touch '" & file_open & "'") with administrator privileges try do shell script ("open '" & file_open & "'") on error try display alert "Couldn't open file." message ("Try to open the file from the Finder") as critical buttons {"× Cancel"} default button 1 cancel button 1 on error # Prevent AppleScript from detecting an error by returning a false value. return false end try end try on error return false end try (* Your script goes here *) return input end run BundleIdentifier com.apple.Automator.RunScript CFBundleVersion 1.0.2 CanShowSelectedItemsWhenRun CanShowWhenRun Category AMCategoryUtilities Class Name RunScriptAction InputUUID D6064ADF-D60A-4546-A3A6-0290FAE67046 Keywords Run OutputUUID E877AFFC-3A4C-4D19-81F8-52D7C70EB10B UUID 09D77354-F3A0-415E-A755-578A1A1CFE79 UnlocalizedApplications Automator arguments 0 default value on run {input, parameters} (* Your script goes here *) return input end run name source required 0 type 0 uuid 0 isViewVisible 1 location 309.000000:368.000000 nibPath /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib isViewVisible 1 connectors workflowMetaData applicationBundleID com.apple.finder applicationBundleIDsByPath /System/Library/CoreServices/Finder.app com.apple.finder applicationPath /System/Library/CoreServices/Finder.app applicationPaths /System/Library/CoreServices/Finder.app inputTypeIdentifier com.apple.Automator.fileSystemObject outputTypeIdentifier com.apple.Automator.nothing presentationMode 15 processesInput 0 serviceApplicationBundleID com.apple.finder serviceApplicationPath /System/Library/CoreServices/Finder.app serviceInputTypeIdentifier com.apple.Automator.fileSystemObject serviceOutputTypeIdentifier com.apple.Automator.nothing serviceProcessesInput 0 systemImageName NSTouchBarCircleAdd useAutomaticInputType 0 workflowTypeIdentifier com.apple.Automator.servicesMenu