ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Png problem in script GUI on Mac computer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrei Popa
Png problem in script GUI on Mac computer
on Aug 3, 2018 at 9:06:50 am

Does anyone have problems trying to use .png files in the script GUI? I made a script and it runs an error on Mac. The print screen comes from the person that reviewed my script. I can't get my hand on a Mac for now so i can't test it. Could using .png be the problem? I could easily switch to .jpg but have no Mac to test it, and i don't really want to send it back to review with the same problem.


Andrei
My Envato portfolio.


Return to posts index

Scott McGee
Re: Png problem in script GUI on Mac computer
on Aug 3, 2018 at 10:27:51 am

Hey Andrei,

I'm on Mac and use .png's on my most recent scripts. They work fine.


Return to posts index

Andrei Popa
Re: Png problem in script GUI on Mac computer
on Aug 3, 2018 at 2:25:33 pm

I will post here the part of the script that I think creates problems(the error was for the binary version, so the line count there is not really accurate). I hope you will get some idea about why it gives the error.
var myNewPath = new File($.fileName).parent.toString() + "/Handwriting assets/" + myFont.selection.toString()+".jpg";
var myFile = new File(myNewPath);
var myShowPreview = myFontPanel.add("image",undefined,myFile);


Basically I am trying to put a picture that has the same name as the selected element of the myFont dropdown list. The folder /Handwriting assets/, which contains the images, is in the same folder as the script. First, I thought the person who tested the script did not copy the folder with the images, but when I did that, I got a different error.

Andrei
My Envato portfolio.


Return to posts index


Andrei Popa
Re: Png problem in script GUI on Mac computer
on Aug 3, 2018 at 2:57:42 pm

Fixed it finally. Turns out i failed to test it without the files... Or something. Today i got the same error.

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]