Post

Replies

Boosts

Views

Activity

AppleScript problem with Catalina?
AppleScript 2.7, ScriptEditor 2.11, OS Catalina 10.15 (latest Udqate)After updating to Catalina I can't run some AppleScripts. Firstly I thought about a bug in my code, therefore I tried some AppleScripts published on the Apple developer site and got the same error bevahiour. Can anybody explain why this happens and how to solve this?Here the source of the scripts I tried without success:https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ManipulateImages.htmlListing 38-1AppleScript: Opening an image with Image Events-- Prompt for an imageset theImageFile to choose file of type "public.image" with prompt ""-- Launch Image Events and open the imagetell application "Image Events" launch open theImageFileend tell--> Result: image "My Image.png" of application "Image Events"error Output:tell application "Script Editor" choose file of type "public.image" with prompt "" --> alias "Intenso 4TB:Test:Work:Result:GOPR5491.jpg"end telltell application "Image Events" launch open alias "Intenso 4TB:Test:Work:Result:GOPR5491.jpg" --> missing valueend tellErgebnis:missing valueListing 38-5AppleScript: Scaling an image-- Prompt for an imageset theImageFile to choose file of type "public.image" with prompt ""-- Locate an output folderset theOutputFolder to (path to desktop folder as string)-- To scale by percentage, set this value to true. To scale to a specific size, set it to false.set scaleByPercentage to true-- Launch Image Eventstell application "Image Events" launch -- Open the image set theImage to open theImageFile tell theImage -- Determine a save name for the image set theName to name set theSaveName to "temp-" & theName -- Scale the image by 50% if scaleByPercentage = true then scale by factor 0.5 -- Scale the image to 100px on its longese side else scale to size 100 end if -- Save the image to the output folder, using the save name save as file type in (theOutputFolder & theSaveName) -- Close the image close end tellend tellResult on Catalina 10.15:error "„name of missing value“ can not read." number -1728 from name of missing valueHere's the script output:tell application "Script Editor" choose file of type "public.image" with prompt "" --> alias "Intenso 4TB:Test:Work:Result:GOPR5491.jpg"end telltell current application path to desktop as string --> "Macintosh HD:Users:raimund:Desktop:"end telltell application "Image Events" launch open alias "Intenso 4TB:Test:Work:Result:GOPR5491.jpg" --> missing valueErgebnis:error "„name of missing value“ kann nicht gelesen werden." number -1728 from name of missing value
11
1
7.6k
Oct ’19