How do I get an ICC profile into a form I can embed into an image using Apple Script/Image Events?
I'm using the form below
make new profile with properties {location:"Macintosh HD/Users/user_N/Desktop/sRGB Profile.icc"}"
embed this_image with source profile
I've also tried setting the color space property of the image.
set the color space of this_image to RGB
of course there is more to the code but that is just the part I'm having issues with.
I get the error message "Image got an error: can't make profile into type profile"
and, error "The variable profile is not defined." number -2753 from "profile"
What am I missing here, Anyone know?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm trying to set a boolean value to myVariable using the "Folder" property, but the Applescript editor keeps interpreting it as a class.
Here is a shorted code. this is part of a bigger code to identify files dropped into a folder and create a new folder which it renames based on the date of the file that is dropped into the folder. Unfortunately, it keeps making folders every time it makes a new folder. Resalting in continuous loop of folders being created and renamed to "2025".
The plan is to us an IF condition to prevent the creation of folders when a folder/s are dropped into my folder with my Folder Action.
property directory : "Catalina:Users:Username:Desktop:Folder:File.pdf
tell application "Finder"
set pathname to POSIX path of directory
set item_info to the info for directory
set myVariable to Folder of item_info
return myVariable
end tell
I noticed the following when I compile the script
The color of the "Folder" is blue. I believe this means it's a class. Normally when I call a property, the color turns pink. it does it correctly when I use "set the file_name to the "name" of this_file". I also tried declaring the "Folder" property in brackets "Folder". did not help
I noticed the following when I run the script:
It returns ---error number -10004 "A privilege violation occurred. When it runs the "info for" command.
I gave the Script Editor Full File access, Full Accessibility access and the FolderActionsDispatcher has full Finder access.
Can anyone point me in the right direction!
What is the cause of the privilege violation or how would I find what the cause is?
How do I force the Script Editor to get the "Folder" property of a folder?