Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Replace comma form txt file

$
0
0

Hi everyone,

 

I wrote a script to read and replace characters from a .txt file string and insert the result into after effects. Problem : the txt is made with a single copy/paste from excel, and when I import it into my script, the end of each excel line becomes a comma. So, if I replace the comma by a "\r", it affects all the other commas in texts or numbers...

 

example of lines in my .txt file :

1  16  Titre  Association

1  2  Citation  Convention par laquelle deux ou plusieurs personnes mettent en commun, d'une façon permanente, leurs connaissances ou leur activité dans un but autre que de partager des bénéfices@loi de 1901

2  7  Picto Grand  ampoule.png@1,3 millions d'associatons

3  7  Picto Grand  billets.png@70 milliards d'euros de dépenses

4  7  Picto Grand  contrats.png@1,8 millions de salariés

 

and how After Effects see it :

1  16  Titre  Association,1  2  Citation  Convention par laquelle deux ou plusieurs personnes mettent en commun, d'une façon permanente, leurs connaissances ou leur activité dans un but autre que de partager des bénéfices@loi de 1901,2  7  Picto Grand  ampoule.png@1,3 millions d'associatons,3  7  Picto Grand  billets.png@70 milliards d'euros de dépenses,4  7  Picto Grand  contrats.png@1,8 millions de salariés

 

So, is there a way to keep the lines, or to change the comma in another character automatically, or anything else ? Maybe the method to copy/paste from excel...

 

Thanks for your answer
Phil


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>