Tag Archives: development

BaaS (Backend as a service) review – 2014

MBaaS (Mobile Backend as a Service)
MBaaS (Mobile Backend as a Service)

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:

Have a good day!
mim, 😉

Hard at work on an InDesign plugin! (wait for beta testing release!)

In-Design plugin preview (one of the few dialogs of the UI)
In-Design plugin preview (one of the few dialogs of the UI)

Once I said:

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! :))

Ok, back to work! 😉 have a good day!

manage paths in Adobe Extend-Script

Adobe Exten-Script (source: internet)
Adobe Exten-Script (source: internet)

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:


And get:

alert(app.activeDocument.filePath);
alert(app.activeDocument.filePath);

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):

  1. 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!
  2. 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.
  3. It is an object and not a string (apparently!) and you can send, save or sometimes even use the myPath variable for instance directly! (it will give you an [object] instead of the path, which I guess should be the parent File object itself)
  4. in addition if our file wasn’t in our Desktop folder and was in a disk drive instead, we would have this problem too:
    alert(app.activeDocument.filePath);
    alert(app.activeDocument.filePath);

    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!

  5.     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 fsName instead of filePath eliminating other problems (like getting “relative paths” (or fake absolutes!) instead of absolutes and the beginning slash character)
    And the result:

    alert(app.activeDocument.fullName.parent.fsName).toString().replace(/\\/g, '/');
    alert(app.activeDocument.fullName.parent.fsName).toString().replace(/\\/g, ‘/’);

    Awesome! 😀
    Please let me know if you have a better idea to this or if you see a problem or something, I appreciate it 😉
    mim,