Copy link to clipboard
I'm using indesign script which is ( .jsx ) and it's totally diffrent from (.js). Anyhow, are there any alternative for [ includes() or and comparing string function??]. I've tried
if ("somedata" in path)
but it passes every time even if it's not in!
i want to compare between image pathes.
Look at the String.indexOf and String.match methods here: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#String.html
if (str1.indexOf("str2") >= 0 )
Thanks! it worked for me!
Make sure you really have a string in your path variable and not a folder or a file object.
( ACP )