I'd probably open a support ticket for this and send the file to Adobe. Let them figure out what's wrong with IDS...
Re: Is it possible to set a log level for ID and/or IDS when opening an IDML?
Re: Move object by "Reference Point"
Hi Marc,
You may want to consider updating your website with the syntax change -- http://www.indiscripts.com/post/2013/05/indesign-scripting-forum-roundup-4#hd2sb3 as I just happened to notice this today.
Cheers! -TT
Re: Move object by "Reference Point"
Thanks
Code updated.
Best,
Marc
Re: Move object by "Reference Point"
BTW -- great stuff you have there. Thanks for sharing! -TT
Re: Re: Can't ungroup
Hi Uwe,
Thank you so much for this.
Selvam
Re: Line number of selected text from footnote
Hi,
I want the line number of the footnote contents of the particular page.
Re: Align Inline Equation to Baseline
Hi,
InDesign document having lots of equations moved to up position. I used this script to move that equation to baseline without any check. So, Some of the Images are align correctly but some equations are moved to down not in baseline. This is my prob. I dono wat to do..
- Sudha K
Windows : Permission denied on Folder.rename()
Hi all,
First of all, I was told this topic has already been covered but after several searches, still couldn't find any related post. If I missed the obvious, feel free to redirect me.
Here is my problem. I have a routine for renaming folders and subfolders, indesign files and indesign books files. All the links have to be updated regarding to the new name and book also.
On mac, no problem. This can be launched dozens of times in a row without any problems.
On Windows (7&8, didn't try on former versions), the rename routine can be successfully ran once. Then it stops working. The Folder.rename() method systematically returns false. Reason why ? Permission denied. Then I checked the rights, all ok. I tried VB, command line and finally manual rename, I got returned "Permission denied" every time.
For the sake of completeness, the files are on a network drive that users map. So all the rename operations occur through the network. I am guessing that once the first rename happens, some operations keeps hand on the files and folders. But I have no clue how to validate this theory.
Do anyone of you ever faced this issue ? And of course find a way out ?
Thanks in advance for any hint,
Best regards,
Loïc
Re: Windows : Permission denied on Folder.rename()
Longshot: Are you running the script from the User folder or the
Application folder? The Application folder sometimes has higher privileges.
Re: Re: Align Inline Equation to Baseline
I think, you have to find out on what occasion an equation is aligned right and on what occasion it is not.
Since you can know what is the value of "baseline" after reading the EPS, you can do a check with an EPS that is freshly placed. Maybe this test will always involve visually looking at the line, maybe you can find a rule how these EPSes react on a given situation…
$.writeln(baseline);
would write the value of baseline to the JavaScript Console of the ESTK.
var myCharacterThatIsRepresentingTheEPS = app.selection[0].parent.getElements()[0];
would be the character that is representing the placed EPS in the text.
And you could check for any baseline shift or other properties that influence the position of the placed graphic.
Point size would come to my mind.
Oh: And make sure, you do not run the script more than one time on a placed graphic.
Maybe the better idea is to change the baseline of the character that holds the EPS:
app.selection[0].parent.getElements()[0].baselineShift = -1;
Instead of changing the anchored object settings.
Uwe
Re: Windows : Permission denied on Folder.rename()
Hi,
Certainly from the user folder. I will give a try with the application folder.
Thanks for the hint. I com back to you as soon as I have some feddback.
Loic
Re: I want to get all paragraphs of a document
Hi Chinnadk,
Could you please help with your solution? It is giving an error not visible for LearnIndesignScripting:
Re: Windows : Permission denied on Folder.rename()
If this is a generic approach, then don't assume that Mac is too easy. I've had incidents where a folder on a GPFS volume mounted via NFS on a OSX file server, then mounted via AFP on a workstation, would not follow name changes (via separate machine). I tracked that down to caches within the Carbon side of the Mac workstation's OS, outside InDesign. Of course Carbon is dead with CC and I have not retried, but just wanted to mention that case.
If Linux is involved (for the server?), it can also play games with names that in OSX would be expected to be canonized(?) or precomposed, regardless of Carbon or not.
Technical Q&A QA1173: Text Encodings in VFS
On the Mac I found out some of the problems via kernal trace (dtrace, Instruments) and command line utilities such as lsof. Without own experience I think for Windows a good first tool would be Sysinternals / Process Explorer.
Dirk
Re: script with replace some of the characters respectively
Regarding your question about the font:
Hamdifem, perhaps a solution is assign a ch. style before the script is run, if copy-text allows it, like in this example.
*This seems very useful for making massive substitutions... in find-change operations, although I don't know if find/change scripts by list are in the same line. Also, it works with words but those in both lists have to had the same number of characters. How difficult could be change the lines Ariel recommended? Thanks for this piece that works very well.
Re: Re: I want to get all paragraphs of a document
@camilo: Check whether all your text frames are placed in InDesign pages, if the frames are in the pasteboard it will return the index value as null.
You want to ignore the error, use try/catch function.
Vandy
Re: Windows : Permission denied on Folder.rename()
Hi Dirk,
Thanks for you detail feedback and the tools you propose. I will test them and let you know.
Best regards,
Loic
Re: Re: I want to get all paragraphs of a document
vandy, yes, after cleaning the pasteboard the script is not giving error although the output... where is placed?
I am assuming this script is intended to collect stories instead of using other traditional threading scripts that don't include cell items.
Thanks.
Re: How to delete xml content without deleting the content of the object?
Your original code works as you describe for me (assuming text_area is set to the Root element).
Change links path to new server
Hi,
This could also (perhaps more accurately) be titled: "Change a character in link path".
We're migrating to a new NAS file server, and for compatibility with NFS and SAMBA shares, I've had to alter some folder names, by replacing instances of "/" with "-" in the names (don't ask).
So e.g. "Brochures/Literature", a folder name in the link path needs to be changed to "Brochures-Literature", so the link can be re-established on the new server.
I was not aware that Indesign supports scripting until I googled it just now, and I'm hopeful this may present an easier method of updating links 'on the fly' than manual re-linking.
Has anyone created and/or used such a script you can point me to? I have some familiarity with javascript in web development however, I obviously have no experience with using scripts in Indesign, in case that warrants some extra detail on how it's done.
Thanks!
Message was edited by: David Smith for clarity
How to select all text in active text frame?
Hello!
I need a simple script to:
1. select all text in active frame (ctrl+A)
2. paste from clipboard (ctrl+V)
3. go to beginning of new text (ctrl+Home)
and
4. insert 2 paragraph marks (hit enter x2).
That is all.
I tried, but i'm not an scripting expert, only good in DTP and pre-press.
Thank you.