Copy link to clipboard
Copied
Hey guys, I have a script that I run from InDesign and it uses bridgetalk to open up the selected image in photoshop, scale it up and resave it in a specific directory.....
This all works fine on my windows machine at home, but at work I'm using a mac and working from a network drive, which is annoyingly called "WIP:» " which is causing a weird problem.
if I get an image filepath or document path within indesign it returns the correct filepath containing "WIP:» " for example something like "WIP:» JobFolder:12345:resources:image.jpg" however if I then try to pass this string into photoshop via bridgetalk, it now comes out instead with the unicode for », so it returns this "WIP:\u00BB JobFolder:12345:resources:image.jpg"
This seemed like a minor hurdle and I initially got around it with this line
var imagePath = imagePath.replace(/(^.*)(\u00BB.)/, "WIP:» ");
which worked fine and as it should for a few days, however now it's started returning unexpected results, instead of replacing with the » like I specified in my code, it replaces it with this ¬ª
I have no idea why it's suddenly changed , maybe something to do with the filestructure on the network drive.
does anybody know of workaround that I can insert the correct » back into my string with the unicode value or anything like that?
nevermind, finally found a solution that works
var stupidChar = String.fromCharCode(0x00BB);
var imagePath = imagePath.replace(/(^.*)(\u00BB.)/, "WIP:" +stupidChar+ " ");
🙂
Copy link to clipboard
Copied
nevermind, finally found a solution that works
var stupidChar = String.fromCharCode(0x00BB);
var imagePath = imagePath.replace(/(^.*)(\u00BB.)/, "WIP:" +stupidChar+ " ");
🙂