For my projects I was studying some of the services available today and to keep track of the results in future and also to share them with anyone who would be interested I’ll put a list of services I found promising here:
Developing software is like panning for gold, you may find something that shines to you, but before getting it to market you just don’t know if it is real!!
I’m hard at work on my first InDesign plugin! and that’s why I’m not that active for the moment here! It’s been more than two weeks already that I started working on it and it’s going very well so far!
So I think I’ll be able to announce a pre-release beta testing call for it in few days (or weeks perhaps!), I worked really hard on it and the plugin with all its options won’t be available for free ( will be free during beta testing) but I will release a free version as well for folks just like myself who can’t afford paying for these kind of stuff! After all I hope to be able to sell a few of it after all these nights staying awake and writing codes till morning!
Please let me know if you are interested in the beta release.
Also I have to pick a name for my plugin! so please let me know if you have an idea about it! :))
Managing paths obtained from Adobe Extend-Script, Specially when you want to share these paths with an external 3th application (to do things which aren’t possible with just ExtendScript) is kind of difficult!
For instance let’s say we want to get the Path of an In-Design file being opened (and in front) in in-Design, we may simply do:
But there is obviously 3 (+1 not obvious here!) possible problems with this path (even if you can transfer that variable as easily as shout it out in an alert! look at #3):
the Tilde (~) character at the beginning, an environment variable meaning “Home Directory“, which is not a recognizable standard character in all the different programing environments (for instance it’d be %~dp0 in Batch scripting and user.home, (more or less!) in Java) although it is supposed to be the absolute path using above code!
existence of Slash characters (/) in the path instead of Backslash (\), making it hard (not so much tho!) to send it through a JSON package for example (or save it in a batch file -again- for instance), be-cause in most environments it’d be considered as a escape character and not a path level separator.
It is an object and not a string (apparently!) and you can send, save or sometimes even use the myPathvariable for instance directly! (it will give you an [object] instead of the path, which I guess should be the parent File object itself)
in addition if our file wasn’t in our Desktop folder and was in a disk drive instead, we would have this problem too:
as you can see, an additional Slash character (/) before the Drive letter (c)! which is incomprehensible to me why it is!! but it seems that Extend-Script itself doesn’t have any problem with it, but as I said when you want o communicate with 3th party apps it will become a problem immediately!
So as you may guess there is a lot of solutions for any and each of mentioned problems, but here I just wanted to suggest the most convenient one I figured out after trying a lot of different shenanigan techniques!
Here we used Regular Expression Patterns to Replace() all (by using the g pseudo) the Slashes with Backslashes and by using fsNameinstead of filePatheliminating other problems (like getting “relative paths” (or fake absolutes!) instead of absolutes and the beginning slash character)
And the result:
Please let me know if you have a better idea to this or if you see a problem or something, I appreciate it 😉