Issues with a code: GetURLs
Copy link to clipboard
Copied
Dear Readers,
I am reaching out to you because I am currently facing issues with a downloaded code that I am trying to use in Adobe InDesign. I obtained the script from the following link: http://rorohiko.blogspot.com/2013/01/geturlsjsx.html.
The problem arises when I try to run the code (in the latest version of InDesign on the Mac). I receive an error message and I am unable to execute the code correctly. I have attached the relevant InDesign document containing the code for your reference.
Would someone be kind enough to assist me with this? I would greatly appreciate any help that can be provided.
Thank you very much in advance!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Did you make the changes suggested by Kris the script author regarding issues with CS5 in the ParseURL method? I quote the relevant section below. This could be mostly likely relevant in latest version as well
With regards to InDesign CS5: the downloadable code won't work as-is with CS5 due to some oddity with the String.replace function.
To work around the issue, you need to change the ParseURL function to read:
...
function ParseURL(url)
{
url=url.replace(/([a-z]*):\/\/([-\._a-z0-9A-Z]*)(:[0-9]*)?\/?(.*)/,"$1/$2/$3/$4");
url=url.split("/");
// ADD THE LINE BELOW FOR INDESIGN CS5
if (url[2] == "undefined") url[2] = "80";
var parsedURL =
...
That fixes it up so it works with CS5 too...
For details see the following blogpost
http://rorohiko.blogspot.com/2008_07_01_archive.html
-Manan
Copy link to clipboard
Copied
Yes it was already in there. You could also see that in the package i send, the script was included.
Copy link to clipboard
Copied
Apologies for the oversight. I have now realized that my files were not included. Here are the files I intended to add.
https://we.tl/t-Fy3H7Enhlw
Copy link to clipboard
Copied
Man, that code is _old_. I've since had at least two rewrites and other approaches which work better.
Unless you really, really want to use that old code, make sure to check out JSXGetURL (https://coppieters.nz/?p=720) and ExtendExtendScript https://coppieters.nz/?p=220
If you have good reason to want to use this very old version, let me know, but if I could choose, I'd prefer to put the old GetURL.jsx out to pasture...
Copy link to clipboard
Copied
Also, you haven't answered Uwe's question: what is the URL you're trying to access by way of getURL? I suspect that might be where the issue lies.