Forum Replies Created
-
AuthorPosts
-
Robert Ploch
MemberHi,
try this simple piece fo code. Id saves a text file filled with complete list od used fonts on the same level as original INDD file.
In my opinion it is the simplest and most flexible way to have a font list. You can use it with INDD or/and e.g. Excell.Best regards Robert
if ( !app.documents.length ) { alert ( ‘Open document, please !’ ); exit(); }
var doc = app.activeDocument, dp = doc.filePath.fsName, dn = doc.name.slice(0,-5), fonts = doc.fonts.everyItem().name;
var raport = fonts.join( ‘\r’ );
saveTextFile ( raport );
function saveTextFile ( text ) {
var tf = new File ( dp + ‘/’ + dn + ‘_FontList.txt’ );
tf.open ( ‘w’ ); tf.encoding = ‘utf-8’; tf.write( text ); tf.close();
}Robert Ploch
MemberHi Theunis,
thank you for very accurate remark, I’ve missed that property :)Robert Ploch
MemberHi,
first of all to get the first page in document you should use: myDoc.pages.item(0) ….. :)If I properly understand your idea, CURRENT page is one of currently visible pages ?
If, so try this code:
app.activeWindow.activeSpread.pages[n];
n – corresponds to one of pages from which is the spread ( one or more pages) consist.
0 is the first oneregards
RobertDecember 18, 2019 at 10:02 am in reply to: Anyone know where to get Sort Tables script by Peter Kahrel? #14323422Robert Ploch
MemberHi, James
look at that link :)
https://indesignsecrets.com/peter-kahrels-script-repository-comes-to-creativepro.php
Regards Robert
December 18, 2019 at 9:52 am in reply to: Help – Export linked images – sorted in folders by page number #14323423Robert Ploch
Memberthe second occurrence of line :
newFolder.create();
is to delete, of course :)
December 18, 2019 at 9:38 am in reply to: Help – Export linked images – sorted in folders by page number #14323424Robert Ploch
Memberin case of problems with copy and paste the code into e.g. ExtendSrpipt Toolkit, write me please you e-mial, so I’ll send you the script file.
regards
RobertDecember 18, 2019 at 9:37 am in reply to: Help – Export linked images – sorted in folders by page number #14323425Robert Ploch
MemberHi Peter,
try this snippet of code … I hope I’ve understood your idea :) In my test environment it works ! I’ve put .AI .PDF and.JPG graphic files.
This solution copy the link from original path and put it in folder named page’s numer and relink to the new copied file …If you will need some modifications just write :)
Best regards Robert
var doc = app.activeDocument, pages = doc.pages, i = pages.length;
var docName = doc.name, docPath = doc.filePath;while ( i– ) {
var g = pages[i].allGraphics, j = g.length;
while ( j– ) {
var pageName = g[j].parentPage.name;
var link = g[j].itemLink;
var newFolder = new Folder( docPath + ‘/’ + pageName + ‘/’ );
if ( !newFolder.exists ) {
newFolder.create();
}
newFolder.create();
newLinkFile = new File( newFolder + ‘/’ + link.name );
if ( !newLinkFile.exists ) {
link.copyLink( newLinkFile );
}
}
}Robert Ploch
MemberHi, Julie
Yes, I’ve improved the script in some cases (e.g. it can add as many pages od listing as it is needed), and I works fine for me. The best way to share the script is to send you it as a file direct to your e-mail, as we’ve done with Risk :). So please write me your e-mail and I’ll send you the script tonight or tomorrow. Best regards RobertOctober 20, 2019 at 9:19 pm in reply to: Catalina and the change from ESTK to Visual Studio Code + Extendscript Debugger #14323891Robert Ploch
MemberThe OMV from ESTK is not very helpfull not only in my opinion :)
I like this by Gregor Fellenz very much and I’m using it every day, insted of OMV from ESTK
https://www.indesignjs.de/extendscriptAPI/indesign14/#about.html
redgards
RobertOctober 20, 2019 at 4:31 am in reply to: Catalina and the change from ESTK to Visual Studio Code + Extendscript Debugger #14323895Robert Ploch
Memberhere are some basic things:
0. install debugger
1. first of all always save the script in case of proper code completion and code colorization
2. on the bottom right stripe of VS select Target Application (the same in ExtendScript on upper left par )
3. to run the script use F5If you will have questions don’t hasitate to write : ploszek@me.com. I will try to help :)
regards
RobertOctober 20, 2019 at 4:26 am in reply to: Catalina and the change from ESTK to Visual Studio Code + Extendscript Debugger #14323897Robert Ploch
MemberIt is not nesecesary, I think. Try to read and watch the instructions on VS and Adobe Debugger sites … For me it was enough !
In my opinion nothing importatnt has changed in scripts writing and it is more simple now becouse of e.g. code completion, color shemes etc :)regards
RobertOctober 20, 2019 at 4:14 am in reply to: Catalina and the change from ESTK to Visual Studio Code + Extendscript Debugger #14323899Robert Ploch
MemberHi Terre,
I’m using VS Code + Extendscript debugger since 1 month, but still on macOS 14. In my opinion such tandem is much better than old good ExtendScript by Adobe. It looks better and works very smoothly … and is full of customization possibilities :)
Best regards
RobertRobert Ploch
MemberHi Gianguido,
write me please your email, so I’ll send you a script which will return a table in Insesign document full of labels of frames and parent pages of them … :)
regards RobertOctober 10, 2019 at 12:18 pm in reply to: Create a table with specific number of row and column with JavaScript #14323953Robert Ploch
MemberThank you David for very iteresting and handy articles about table scripting … :)
best regrads
RobertOctober 10, 2019 at 12:14 pm in reply to: Create a table with specific number of row and column with JavaScript #14323954Robert Ploch
MemberHi,
the simplest way is to draw a text frame with active blinking text cursor ( insertionPoint ) and fire this line of code from ExtendSrcript Toolkit or VS Code … :)app.selection[0].tables.add({columnCount : 10, bodyRowCount : 10});
best regards
Robert -
AuthorPosts
