Copy link to clipboard
Copied
Hi there, I recently started embedding images in my scripts...
Today for some reason, AFX doesn't like loading any scripts with embedded graphics...
"Unable to load temporary image file" is the message I am getting.
and the script crashes... restarted, AFX, ESTK and pc ... same deal.
Any idea what is causing the conflict....?
Thanks
Alan.
Copy link to clipboard
Copied
Thanks Alan. A couple more questions: is the user instructed to place that folder inside the ScriptUI folder? Do you have a unique folder name for each of your scripts?
Thanks again for your time and help!
--Arie
Copy link to clipboard
Copied
hey there, I just use a pre launch function before script does anything - useful for filtering AE versions and checking the scripting security preference.
So below I am checking for the folder and the first icon, that should be good enough that the user hasn't deleted everything and we are good to launch.
Usually I have the folder corresponding to the script name.
//Check folder present.
var thisFile = File($.fileName); //this file as an obj.
var thisFileFolder = Folder(thisFile.parent); // parent folder object.
var strFolder = Folder(thisFileFolder.fsName + "/AED_CornerCutters/Icons").toString();
var testFile = new File(strFolder + "/AED_TidyUp.png");
if (!testFile.exists) {
alert("Please make sure the supplied folder 'AED_CornerCutters' and it's contents are in the same " +
"folder as this script. Either the folder or some of it's contents are missing. (Check the zip file you downloaded.) Script will now exit.", "Corner Cutters");
return true; //There are errors.
}
Copy link to clipboard
Copied
Thanks Alan, that looks like a solid way to handle it. Much appreciated for sharing your code!
--Arie
Copy link to clipboard
Copied
Hi,
I need your help, i want convert a png to a string, like this; u0089PNG..... etc
would you please help me ? I´m new in javascript
Thanks
Find more inspiration, events, and resources on the new Adobe Community
Explore Now