Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Png problem in script GUI on Mac computer

  • Png problem in script GUI on Mac computer

    Posted by Andrei Popa on August 3, 2018 at 9:06 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.

    Andrei Popa replied 7 years, 9 months ago 2 Members · 3 Replies
  • 3 Replies
  • Scott Mcgee

    August 3, 2018 at 10:27 am

    Hey Andrei,

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

  • Andrei Popa

    August 3, 2018 at 2:25 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.

  • Andrei Popa

    August 3, 2018 at 2:57 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.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy