Forum Replies Created

  • Crystal Goh

    September 2, 2020 at 12:54 pm in reply to: Can’t read filepath as File() makes whitespace to %20

    Hi Tomas, thanks for taking the time for replying!

    Sadly I’ve tried those and they didnt turn out well..

    1- I felt it was risky to change /Adobe After Effects/ path, which official comes with the spaces, so I didn’t rouch it

    2- It was something I’ve tried, but it still returns back the %20, because I may have decoded the string, but once I made it back as a path using new File(), the %20 returns, like as if asking a new File encodes back the URI.

    Thanks for the comment still! Appreciate it

  • Positive on that.

    But now that you mention that I think its really odd, I might probably do a factory reset or something because I used an older ver of the script in my workflow and that same line of code worked fine, maybe thats a solution for it

    Thank you!

  • I need it to change because the script Im working also will edit the contents in .txt after a button onClick, i have no clue why the file can read the .txt file and import its data in, but I can’t save in new data to it with these ‘%20’, even if im taking the same variable (f) containing the file in it


    var filPathStr = "~/Program Files/Adobe/Adobe After Effects 2020/Support Files/Scripts/ScriptUI/txt.txt";
    var f = File (filPathStr);
    // f == c/Program%20Files/Adobe/Adobe%20After%20Effects%202020/Support%20Files/Scripts/ScriptUI/txt.txt;

    f.open("w");
    f.write("data");
    f.close();

    // new data written into 'f' still not reflected in the txt.txt file

    Thing is the script is actually working, just that when %20 isnt involved in the file’s Path.

  • Thats a good fix actually, but yea thats not the intent of the script sadly.

    Managed to fix it yesterday though
    I think the problematic area was at
    layer("\""+selLay[0].name+"\""
    : Instead of getting the selectedLayer’s name, I get their index instead, which takes away the “\””quotation marks, which makes lay a valid object when I use the looseJsonParse(obj) function
    looseJsonParse(obj)lay.toString())

    thanks for the reply!

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