Copy link to clipboard
Copied
At the end of my lenghthy script the display of the document does not reflect the work of the script.
I always must type CTRL+l to refresh the display.
Now I tried to use this function:
function ZRefresh() { // === Refresh screen =======================================================
FcodeList = new Array(FCodes.KBD_REFRESHWIN);
Fcodes(FcodeList);
}
But this does not the trick - I still need to use the keyboard myself...
Any suggestions?
Maybe a function to switch to master pages and back (igrnoring overwrites).
Better approches?
2 Correct answers
Hi Klaus,
just use Reformat() and Redisplay() instead of ReFormat() and ReDisplay()
Redisplay (); // Lowercase d
Reformat (); // Lowercase f
Copy link to clipboard
Copied
Hi Klaus,
On document Level there are two functions
ReDisplay();
ReFormatting();
Does this help?
Markus
Copy link to clipboard
Copied
Thank You, Markus,
app.ActiveDoc.ReFormatting(); did it!
Maybe CTL+l is the equivalent to ReFormatting() and not to ReDisplay(), which has no effect in my case.
But... also this works only randomly...
ExtendScript seems to be a simulation of a gambling hall (at least in my current perception).
Copy link to clipboard
Copied
Sorry Markus to tell you this:
// RefreshDisplay.jsx ============================ UTF-8 =========
// Refresh document display
// Environmnt FM-14, ES-toolkit CC (4.0.0.1) ES 4.5.5
app.ActiveDoc.ReDisplay(); // app.ActiveDoc.ReDisplay is not a function
app.ActiveDoc.ReFormat(); // app.ActiveDoc.ReFormat is not a function
My previous comment about randomness came from the fact that I did not look into the console log, where this error message was all the time for both methods.
Copy link to clipboard
Copied
Hi Klaus,
just use Reformat() and Redisplay() instead of ReFormat() and ReDisplay()
Copy link to clipboard
Copied
Redisplay (); // Lowercase d
Reformat (); // Lowercase f
Copy link to clipboard
Copied
Ah, Rick - even in in Klaus Göbel's post I didnt grab it! Staring to long on code lines makes blind.
I already had a verbose alternative - which I now don't need:
function RefreshDisplay () { // === Refresh document display ======================================
// Called by FMbiblio >
// Comment The following does nothing at all:
// FcodeList = new Array(FCodes.KBD_REFRESHWIN);
// Fcodes(FcodeList);
// TestEnv. FM-14, ES-toolkit CC (4.0.0.1) ES 4.5.5
oDoc = app.ActiveDoc
oMasterPage = oDoc.FirstMasterPageInDoc;
oTextFrame = oDoc.NewTextFrame (oMasterPage.PageFrame);
oTextFrame.Delete ();
}

