How to find the last pasted paragraphs FMP?
I'm sticking FMP several objects at once in a file (a file of changes to the sections containing the changebars) in the main text flow. I want a separator line to go at the end of each pasted section, so I try to insert one after the paste operation. But instead of a line between each section, all lines are added at the end of the file, after all the sections. So if there are 3 glued sections at the end of the file are three lines. My code is below, do you know how I could fix this?
Thank you, Mark
function copyPasteChanges (doc, chgRange) {}
Select the section with changebar and copy it.
doc. TextSelection = chgRange;
doc. Copy();
Prepare for the changes doc and paste there the modified section.
var firstChgPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;
var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);
var changesTRange = new TextRange (changesTloc, changesTloc);
changesDoc.TextSelection = changesTRange;
changesDoc.Paste ();
To go at the end of the file again (I think)
var lastPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;
var dividerPgf = changesDoc.NewSeriesPgf (lastPgf);
var TLoc = new TextLoc (dividerPgf, 0);
changesDoc.AddText (TLoc, '_');
}
Hi Mark,
The problem is that the dough does not occur when you think. The dividing line is added at the end of the file, but are not your actions of dough. Actually, I think that maybe a little random where pasta is produced, because this line:
var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);
.. .is does not create a valid text location. You can check this by abandoning the service after:
changesDoc.TextSelection = changesTRange;
.. and look at where's the insertion point. It will probably be everywhere where you left it last, because the call is not valid. I can't tell you exactly why, except that it has something to do with the fact that you are using the last paragraph in the stream. There is something weird to try to define a range of full-paragraph text with the last paragraph. I'm sure it's related to how the last TFP in a stream does not show a mark of FMP, but beyond that, I don't know how to do what you're trying to do with the last paragraph.
Having no knowledge of how do it right, any time I need to do this, I create a paragraph "dummy" at the end of the flow to fill that space strange 'last FMP", then do the work around it. In the end, I just want to remove fake TFP. I don't know if it's a good idea or not, but it's the only way I ever get it to work and it sorts the mirror how you could do this manually in the GUI.
With this, I modified your script as follows, and it seems to work better. Note that I also modified the logic of how to find the last paragraph of the flow by writing a separate function. Your call to the 'FirstTextFrameInFlow' is OK, unless your doc begins to span several pages and/or begins with several empty pages. The function I wrote ensures that you really the last TFP in the stream.
I hope this helps.
Russ
function copyPasteChanges (doc, chgRange) {}
Select the section with changebar and copy it.
doc. TextSelection = chgRange;
doc. Copy();
Prepare for the changes doc and paste there the modified section.
var lastPgf = getLastPgf (changesDoc);
var dummyPgf = changesDoc.NewSeriesPgf (lastPgf);
var changesTloc = new TextLoc (dummyPgf, 0);
var changesTRange = new TextRange (changesTloc, changesTloc);
changesDoc.TextSelection = changesTRange;
changesDoc.Paste ();
To go at the end of the file again (I think)
Don't forget that last TFP is now fake TFP
lastPgf = getLastPgf (changesDoc);
var dividerPgf = changesDoc.NewSeriesPgf (lastPgf.PrevPgfInFlow);
var TLoc = new TextLoc (dividerPgf, 0);
changesDoc.AddText (TLoc, '_');
dummyPgf.Delete ();
}
function getLastPgf (doc)
{
textFrame var is doc. MainFlowInDoc.LastTextFrameInFlow;
var lastPgf = textFrame.LastPgf;
While (! lastPgf.ObjectValid () & textFrame.ObjectValid ())
{
textFrame = textFrame.PrevTextFrameInFlow;
lastPgf = textFrame.LastPgf;
}
Return lastPgf;
}
Tags: Adobe FrameMaker
Similar Questions
-
How to find the last date of execution of the objects in database
Hi all
We're going for an upgrade of the database 11g and for the same thing, we want to know the last date of the following-
Packages, Tables, views
Conc. programs / value Sets / look up / profile options
Is there a way we can find the same thing.
The answers would be really useful.
Kind regards
ShrutiSo can you provide clues on how to find the last opportunity registration
I don't think you can find such a script with having activated audit.
Thank you
Hussein -
Mr President, how to find the last DML operations
Hello
Please tell me how to find the last DML operations at least a minimum of 30 queries.
Thanks in advance,Select sql_id, sql_text, last_load_Time from V$ SQLAREA
or
Select * from v$ sqltext
Must be one of them. But don't know what exactly you are looking at.
I usually use v$ sqlarea to see recent queries.
Maybe you can limit the rows using rownum, order of last_load_time.
I understand, if the same query is used again then only recent transaction is stored.
-
How to find the last update date, time and user of the file field peoplecode
How to find the last updated date time fields of peoplecode records?
Thank you.We can check the update date-time using the following query
SELECT LASTUPDDTTM IN THE PSPCMPROG WHERE OBJECTVALUE1 LIKE "RECNAME" AND OBJECTVALUE2 AS "FIELDNAME".
-
How to find the last time that a user has performed an activity?
Hi guys,.
How to find on any sysdba user, when a user has been active last connection?
Suppose user SCOTT logon time is 10:00 and it is INACTIVE ( SELECT username, STATUS, SID, SERIAL # FROM V$ SESSION) @ 11:00
I want to know his last activity, as when he fired any principle request.
Thanks in advance
(Edited)
I found my solution:
SELECT username, terminal, SID, Serial #, status, SchemaName, to_char (LOGON_TIME, 'DD HH24') Logon_Time,.
Floor(last_call_et / 60) 'Ideal_Minutes', to_char (Sysdate, 'DD HH24') 'SYSDATE.
from v$ session by LAST_CALL_ET
When Status = 'INACTIVE ';
-
How to find the last value of the row in a Datagrid?
Hello world
Thanks in advance.
I need your help to find the latest data from the line in the Datagrid control.
In fact I use Datagrid to display my data in flex. In my data, I stored the value of gender of the employees. So if the last row in my datagrid 'female' I need to highlight this particular line. So please help me to solve this problem.
Thank you
Charles. J
mylastrowitem dg.dataProvider.getItemAt = (dg.dataProvider.length - 1).
-
How to find the last person from my iPad that is locked
I need help to find who is the person who took my iPad 2, so I can't unlock
Unfortunately, it is to you to find the previous owner. We can not help you with that.
If you are trying to accomplish something else, we would need more information.
-
How to find the last time that the execution of the procedure and by whom?
Hi all
Can be found as the last run and the procedure by which the user in the dictionary of data or something else?
Thanks in advance.
At least that audit you, you can probably not.
If the goal is a particular stored procedure, you can maintain a work table so he can follow the execution time, audit owner etc.
Concerning
Biju
-
How to find the last schema change hour?
Hello. I would like to get the following info on our list of schema full of db (11 GR 2 Linux x 64) and every scheme of last modification time (so, if changes have been made in any table, etc.). It is may also get info about who was last modifier, but if I understand correctly, it is not possible without verification turned on?DML changes is not something Oracle titles unless explicitly, you're doing something like enable auditing.
There should be that all the tables in the full schema of analysis, but you could do
select max(ora_rowscn ) from schema_name.table_name
and choose the largest value. Assuming that you care cuts, that would give you the SCN for the last INSERT or UPDATE on a table in the schema. If the last such change was relatively recent, you can convert it into a timestamp by calling SCN_TO_TIMESTAMP. But this mapping is only kept for a few days. If "long" means more than a week, and then you try to extrapolate a SNA in time which is likely to be very error-prone.
Justin
-
Please how to find the last location? !
my iphone stolen and he sent me last location and this place deleted after 24 hours and always offline I need this place once again please
How can I find it? !
What to do if your iOS device is turned off or offline?
If your missing device is turned off or offline, you can still implement this Mode lost, lockor remote wipe. The next time your device is online, these measures will take effect. If you remove the device from your account while it is offline, pending actions for the device will be cancelled.
-
How to find the last orders for dell inpiron laptop 1545?
Some time my Bluetooth software working properly? How can I solve the problem. Someone knows please answer me at the mail address of * address email is removed from privacy? *
Some time my Bluetooth software working properly? How can I solve the problem. Someone knows please answer me at the mail address of * address email is removed from privacy? *
Go to the manufacturer's Web and website research to this place:
or make an automatic detection of the products dell here:
http://www.Dell.com/support/drivers/us/en/19/DriversHome/NeedProductSelection
or go here:
or here:
or page 1 here:
or page 2 here:
or page 3 here:
Bluetooth has a limitation of distance and I think that he needs direct visibility between two devices bluetooth-enabled for it to work.
-
How to find the last record of the extracted records
Dear members,
I have an OFA Page in which I view record master detail. For each master record can one or more detail records.
In the page I got the button NEXT. If the user clicks the next button, I'm populating the next record of the master and its corresponding detail records.
To achieve this, I wrote the code below in AM:_
Public Sub findNextRec()
*{*
String headerID = null;
Rank rank is getMaster_VO1 () .next ();.
if(Row!=null)
*{*
headerID = row.getAttribute ("HeaderId") m:System.NET.SocketAddress.ToString ();
getDetail_VO1 (.setMaxFetchSize(-1));
getDetail_VO1 () .setWhereClause (null);
getDetail_VO1 () .addWhereClause ("header_id in (: 1)" ");
getDetail_VO1 () .setWhereClauseParams (null);
getDetail_VO1 (.setWhereClauseParam(0,headerID));
getDetail_VO1 () .executeQuery ();
*}*
*}*
My CO code in processFormRequest method is as follows:_
If (PageContext.GetParameter ("Next")! = null)
*{*
am.invokeMethod ("findNextRec");
*}*
Here my requirement is that if it's a last drive, I want to show the user a message saying it's last recording. To achieve this please let me know what the code should be written.
Thanks in advance.
Best regards
Arun D. ReddyArun,
If my interpretation is correct, then you can achieve the same thing by making some minor changes to your existing code.
public void findNextRec() { String headerID=null; Row row = getMaster_VO1().next(); if(row!=null) //your code will return null when if there is no record { headerID=row.getAttribute("HeaderId").toString(); getDetail_VO1().setMaxFetchSize(-1); getDetail_VO1().setWhereClause(null); getDetail_VO1().addWhereClause("header_id in (:1)"); getDetail_VO1().setWhereClauseParams(null); getDetail_VO1().setWhereClauseParam(0,headerID); getDetail_VO1().executeQuery(); } else{ //write down the message that there exist no more rows (custom message) } }
Kind regards
GYAN -
My iPhone is dead and the lack of how find the last location?
How to find the last location of the iphone
Apple has sent sms on my phone number. We found your lost iphone please refer to the specific location. Apple. messageios.com apple support. What shoud I do
-
Camera: Find the last image?
Hello
Are there examples of how to find the last image taken after invoking the camera?
Thank you
Hi and welcome to the forums!
If you take the picture and save, and can't find it? Or you take pictures
Return to the back and you want to know where they are stored as you pull?
Go to the media and click the photos, as soon as the images are displayed
Highlight it, click menu, properties. It will show you, device, media and file
and size.
You can set the previous directory. Unit > menu button > options.
Here you can set options for the camera with flash, color, size, and storage in the
media folders,
Thank you
Bifocals
-
How do you find the last time an old hotmail address was used... especially if you can't remember the exact password?
original title: old hotmail addressHow do you find the last time an old hotmail address was used... especially if you can't remember the exact password?
Good enough if you can't on the account and you can't prove it is yours in order to regain access (via password self-service reset, etc)-then you won't know anything about the account.
Maybe you are looking for
-
AT200 - problems of network connection to day ics
I tried several times to update to ICS, but I can't download the software package! When I try this at home, I get about one-fifth of the full download before he says "could not download the software.Please check your network connection. I tried to do
-
Need drivers and manual for Satellite Pro 4360
Hellopower led flashes after passage and the laptop does not start.Who knows where to find manual for Satellite Pro 4360? and where you can find drivers for windows 2000? TX, michtec
-
m1070n media center power problem
I am running XP Pro on an HP m1070n media center & is no longer powers upward. I checked the power supply & it tests OK. I noticed that when I plug the cable of 12 volt 4-pin on the motherboard that the power supply light turns off and stays off. If
-
Windows 1.0 mouse problem
Hi, I have Windows 1.0 running on 5.0 BACK in Virtualbox. but my mouse does not work, I think it's because the new usb mouse are not supported by the old software. But if anyone can tell me how to run my keyboard, or solve the problem of mouse that w
-
Pavilion P251NQ: Is Windows 8 supported on the Pavilion p251nq?
Hi, guys! The portable newly purchased came with Free DOS. I have an old Windows 8 install DVD that I intend to use, but check this site I see there are only drivers for WIndows 8.1. My question is: should I go and install Win 8, hoping that the syst