Dirk Becker
Guide
Dirk Becker
Guide
Activity
‎Mar 11, 2025
08:49 AM
Once upon a time script compatibility across versions was a high priority. While AppleScript still supports the alias type for HFS paths, someone missed that InDesign's general switch to posix paths trickled thru to the scripting subsystem. And, incompletely at that. E.g. the file path property of your active document still yields an alias. On the other hand, the export now requires a posix file. Btw no need for the double tell application …. tell application id "com.adobe.InDesign" set mgFolderAlias to file path of active document set mgFolder to POSIX path of mgFolderAlias set mgName to name of active document set text item delimiters of AppleScript to {"."} set mgShortName to text item 1 of mgName set text item delimiters of AppleScript to "" set page range of PDF export preferences to "All" set mgFilePath to mgFolder & mgShortName & ".pdf" as string tell active document export format PDF type to mgFilePath using "Kosmos_BoardGame_2017" with page range without showing options end tell display alert "A pdf elkészült a Kosmos_BoardGame_2017 presettel." end tell
... View more
‎Mar 07, 2025
02:29 AM
1 Upvote
Have a look at Japanese fonts … E.g. this one from MacOS: I don't know how they fare with InDesign's numbered lists, though.
... View more
‎Mar 05, 2025
03:51 AM
1 Upvote
Do you use a typescript preprocessor? Otherwise try const { app } = require("indesign");
... View more
‎Mar 01, 2025
08:52 PM
1 Upvote
See the bottom section on ICML of https://helpx.adobe.com/indesign/using/sharing-content.html – could be you remember that.
... View more
‎Feb 26, 2025
09:25 AM
1 Upvote
You're right, the crash log by DaddyDoom in the other thread looks the same.
... View more
‎Feb 26, 2025
09:12 AM
No. Reading crash logs includes some guessing, so I could be wrong anywhere. it is not about the document. For proof - try (copies of) other documents. Instead, it is about application preferences - those where you set defaults for new documents. InDesign has the (to me annoying) feature to rearrange palette panels on several occasions, including when you close the last document window. It does so by activating a different "workspace" - you might have seen Essentials, Typography and so forth. Same mechanism. I don't know which workspace that would be in your case, as the typical view with no documents should hide the panels and show document presets or recent documents. Big open question to me. Anyway, the workspace operation, triggered from closing the window, as of your crash, arranges palette panels - move, size them to your screen, and the one having trouble is the object styles panel. The list of object styles. When you create an object style, go to the generic properties, below based-on, you can assign a keyboard shortcut. This shortcut is also displayed in the list, left from the rhs icons (Wahl+A = Option+A below). On resize of the panel (as the workspace is still automatically doing), that particular shortcut display "widget" is doing something (maybe looking at the style name to squeeze it) that is leading to the crash. Maybe I'm also wrong and it is indeed an object style from the document being closed? Do you use styles for your drop shadow? Was the object styles panel open before your document close? Everything else is up to you. Check whether your application defaults have different object styles, whether they have associated keyboard shortcuts. Need not be, the shortcut could be just blank and resize for that. Watch out for unusual things in this area. Look at the application's object styles before you open the document, by opening the panel from the windows menu. Anything unusual there? This tinkering won't likely solve the issue, but it might give more hints. You can nuke the preferences and defaults along the typical instructions. Also rebuild your document via IDML. If either solves the issue, fine. We just won't learn about the real cause, and repeat.
... View more
‎Feb 26, 2025
05:52 AM
1 Upvote
Reading the crash thread bottom up. When closing the (last) document window "ClosePresentation", InDesign switches to a different workspace. The document should already be detached, so corruption is unlikely with it. Workspaces are XML files, therefor …Expat, XMLParser. Shuffling panel and contained widgets around (adapt, resize, yadda …) The actual one is a style list entry, namely in use by object styles UI. Therein, a widget for (keyboard) shortcuts. When adjusting, widgets look around - could be the name or other part of style info. Some object is missing, so a NULL is dereferenced - boom. Explicitly vague here, some Adobe engineer can tell more from the first line in the crash. Anyway we're talking about object styles present in application defaults. Not sure how you "dump" preferences, try launching InDesign with all modifier keys down (I'd use Dock right click >> InDesign >> Open) to rebuild them from scratch. Eugene's link should have a section on that. Also switch to a default keyboard shortcut set in the unlikely case anything in those is broken. Some related experiments: all the shuffling only takes place when the final document window is closed. So maybe have another document open instead … Switch to other workspaces straight after launch, while there is no document yet open. Especially one workspace that displays the object styles. It should also crash.
... View more
‎Feb 26, 2025
12:32 AM
1 Upvote
Sounds like you're planning an Archive rather than generic DAM. In comparable scenarios that I've seen, ongoing optimization of issues like image data access were the task of a dedicated team of administrators with focus on their hosting platforms. "Best" also fluctuates with system versions, hardware changes, network changes, application versions e.g. the InDesign team fighting locking problems, and usage patterns. Some file systems were better for static large files such as images, others were better for log files, even others for configuration and scripts, or temporary working files. Regarding the plugin - if user interaction is the problem, ask the developer to work around that, unless you have other reasons. Traditional plug-ins (rather than scripted plugins) should already be split between model/functionality and UI anyway. E.g. I have a set of plugins which started with tons of UI mirroring the otherwise web based DAM, down to article structure predating InDesign's. This has gone thru several DAM system generations, supported at least 3 different editorial systems and it is still feeding the accounting system from a server based version along the current web centric "cloud" fashion. Regarding the license - you'd choose it by the price tag, as long your architecture complies with the license limitations. Alternatively your purchase department talks to their contacts at Adobe. Suggestions for your volume problem: decouple, the link subsystem of InDesign is extensible.
... View more
‎Feb 25, 2025
10:45 PM
1 Upvote
APFS changed the order of files delivered by the operating system. Sort the result if you depend on a specific order. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html Calling readdir(2) on a directory in APFS returns filenames in hash order, whereas HFS+ returns filenames in lexicographical order.
... View more
‎Feb 23, 2025
08:47 AM
@Eugene Tyson not sure why you warm up all these old, never answered discussions. My guess would be that the returned object is still a File object, but the UXP way. https://developer.adobe.com/indesign/uxp/reference/uxp-api/reference-js/Modules/uxp/Persistent%20File%20Storage/File/ If so, you'd also better read on and consider all security sensitivities of UXP, namely that a UXP plugin requires extra manifest entries for access anywhere outside its sandbox.
... View more
‎Feb 22, 2025
11:54 PM
@Robert at ID-Tasker you missed bringToFront(ref) which in theory should work similar to move(… LocationOptions.BEFORE …) . Unfortunately here it also fails, complaining the objects have different parents. Adding a group via grp.groups.add(app.selection,…) also failed. Edit: My UI steps removed, they were a duplicate of Keith's. I should not post on tiny laptop screens. Robert, maybe contentPlace() gets you further?
... View more
‎Feb 22, 2025
09:39 AM
2 Upvotes
CSS ain't here nor there for this, since it can only manage style changes, not content. CSS can add content, as described for a list bullet here: https://www.w3.org/Style/Examples/007/color-bullets.en.html .
... View more
‎Feb 17, 2025
01:25 AM
1 Upvote
🤔 For completeness sake, I think this does not preserve the previous user choice of the "Query" dropdown … Looking at the OM, I haven't found a way to get that value.
... View more
‎Feb 15, 2025
12:37 PM
1 Upvote
Follow Peter's link. Find the about page. Think. For your particular problem better also use Uservoice and the point product's (InDesign) developer prerelease program. Put more effort on the latter. A good test case that illustrates the problem, added straight to the bug base, improves chances to get issues resolved. Also prepare the move to UXP, even though it has its own issues it is at least undergoing active development.
... View more
‎Feb 10, 2025
03:35 AM
1 Upvote
I should have checked the SDK first. Above was from 2018 when I last tried to examine such an object. Gradients are a rendering object similar to color swatches, tint etc., applying such a rendering object should do. I'd first try IGradientFillInstall though.
... View more
‎Feb 10, 2025
03:15 AM
1 Upvote
AGM is an old library exposed via wrappers ony, the actual AGM* structures remain opaque / forward declarations, similar to CT* structures. Related methods are in a private (no headers provided) gradient utils class. Please file a feature request in developer prerelease to expose the header.
... View more
‎Feb 08, 2025
10:12 AM
While we're at speculation, how about an unchecked "allow pages to shuffle" with debris from a temporarily wider spread of 3 or more pages.
... View more
‎Feb 08, 2025
08:37 AM
1 Upvote
The InDesign document is an "object oriented database". Objects identified by the ID that also scripters come across for most objects. There are atomic changes via commands that can commit or rollback - you know them as undo steps. You can group commands into sequences / transactions - see doScript + undo modes. And see the recent history panel (guessing the name from my German version). On the other hand, keeping track of the changes requires disk space. Remember, when the original code was written in the mid 90s, really big disks had maybe one GB of space. Watch the history panel, or the undo menu item, after close+reopen both reset. If you run a script with plenty edits on many pages, it helps to save the document every now and then, also InDesign may decide this on its own. The transaction log is discarded, some disk space is reclaimed. Some other space is lost - growing documents, save-copy-as takes care of that. What you wish for is already starting to show for cloud based documents. There is a panel for document versions/revisions, and you can walk along some kind of history for 60 days. Steps do not yet tell you about the changes, and the preview only shows the first page. A long way to go.
... View more
‎Feb 06, 2025
07:34 AM
1 Upvote
Forget the ITextFocus, read the programming guide about selection suites. You'll implement one that picks up the selected text model and text range from ITextTarget. Ensure that the text is already composed, and does not refer to overset. To get to the wax, query the frame list from the text model, it has an IWaxStrand. The wax strand gives you a wax iterator. Search the first wax line for your range, then descend to wax runs.
... View more
‎Feb 03, 2025
06:06 AM
1 Upvote
This is also the former indesign-sdk (plug-in developers) forum merged into the "SDK" tag. The debug version is used for plug-in development, access is via the developers prerelease program. Someone who can help already has reached out to lyj.
... View more
‎Feb 02, 2025
10:02 AM
Just read other crashes mentioned "alt-drag". Is that also the case for you - an alt-drag within InDesign? If so, it should not have gone thru the operating system / external drag, could be a recent change.
... View more
‎Feb 02, 2025
08:07 AM
1 Upvote
The crash log provides some hints: You're dragging some file from outside the application. If this is a document to open, try the open menu. If this is an image to place, try the place action instead. Anyway, as part of your drag, something is drawn. Likely target highlight, a surrounding frame or alike. This draw trickles down thru umpteen levels, until it reaches the "Control Panel". Could this be the recently introduced most helpful UI invention since sliced bread, I mean the contextual bar? Try to disable, I think there is a preference for that from its "…" menu. Otherwise, try to avoid the old control strip on your drag, or reduce the sections showing therein.
... View more
‎Feb 01, 2025
03:33 PM
Thanks for bringing up Quick apply, I missed that. Neat opportunity for a crashing bug - the widget pointer is NULL in that case. @jackbrannen_pl While it is possible to attach scripts to native actions, I'd refrain from that because the particular action is complicated. Please open another thread "Relink script" for the particular purpose and add the scripting tag. Describe how a script should work - e.g. we can look at the native action and trigger that if enabled, but for the case of the closed palette, we'd start from the selection. Also think about some edge cases: Your selection holds a group of 10 images, or 3 images individually, one of them with a bad link state. What should happen. Or, there is also a text frame. Relink that (different link kind), or better only the anchored images within?
... View more
‎Feb 01, 2025
02:30 PM
In other words, a "speedy fix" would have to consider and modify each action. Specify the particular action "check out" and tell what it is supposed to address. When the panel is minimized or closed (so there is no in-panel selection), should it address the selection? If so, differentiate by selection type - text selection in galley view or within the notes panel, xml item in structure view, empty selection in the layout window, could mean all. Do you really mean that, or would a "check-out" across the entire document be undesirable? Furthermore, actions are scriptable, not only the scripting-backed actions. You can find them by ID.. You can look at them for their name which may refer to the targeted item, and also to their enabling, you can even invoke them. If you change semantics of the action, you may break things somewhere.
... View more
‎Feb 01, 2025
02:11 PM
1 Upvote
@James Gifford—NitroPress is right. Beyond scripting, the callback methods for the menu actions receive a pointer "widget" to the related widget, and work their way down to determine the actually referenced object. Another considered parameter is the mouse location, e.g. for a layout hit-test. UpdateActionStates() is the equivalent to "beforeDisplay" - check/uncheck, enable/disable or rename the action. DoAction() is "onInvoke". If the action is tied to a panel, it may look up the selection of the panel's listbox - that can even allow for multiple selected items. This works beyond the panel selection: you can directly hit an unselected list item with a context menu click (passing the list item as widget) and address that instead of the panel's selection. Think about panels where you can have multiple instances - library, book.
... View more
‎Jan 31, 2025
08:23 AM
Try an IDML roundtrip first, it could be sufficient.
... View more
‎Jan 30, 2025
12:58 PM
There is no difference in the preferences: tell application id "com.adobe.indesign" get properties of preferences end tell Looking from the plug-in side, the command is kSetUIScalingPrefsCmdBoss working on "InDesign Defaults". As you have to restart InDesign anyway for "changes to take effect", I'd try the brutal approach and swap that file with differently scaled copies.
... View more
‎Jan 22, 2025
09:59 AM
On some platforms, clipboard operations are available from the platform scripting system. var text = app.doScript("the clipboard as text",ScriptLanguage.APPLESCRIPT_LANGUAGE); On other platforms, search recommends to use the HTMLFile object. https://stackoverflow.com/questions/19696308/how-can-i-use-clipboard-in-vbscript
... View more
‎Jan 21, 2025
12:26 PM
The "Common Files" … folder is the location where application installers place static OMV.xml There were also "Scripting Dictionaries CS4" and so forth. The InDesign family can run versioned scripts using older terminology, and it creates the plenty versioned OMV files dynamically because plug-ins can also add their share. ESTK fetches these files from a running InDesign and stores them in the "Roaming" path.
... View more
‎Jan 21, 2025
10:51 AM
There was a recent discussion with the same kind of script. If this is not about homework, maybe borrow some code from there. https://community.adobe.com/t5/indesign-discussions/save-only-one-fontfamilyname-in-a-dropdownlist/m-p/15091056#M605888 Anyway a script should not crash InDesign. Share the crash log (pastebin?) and provide a link here. As you're dealing with fonts anyway, a bad font could be a reason. Disable user fonts by temporarily moving them somewhere else, then retry.
... View more