How to extract text, modify it and add it to the same page location in PIOE

print
 
1. Set the area of interest to align the BEGINWINDOWX and ENDWINDOWX to the exact text location.Area of Interest (Region Object)
2. Extract line of text   
3. Extract page fonts to an array variable
4. Assign CURSORX and CURSORY values to a variable
5. Delete line of text
6. Format line of text, adding the new text information
7. Add back to the same page location the line of text modified

Example:
[OBJECT_GET_LINE] OBJECT REGION SCAN0
    BEGINWINDOWX 15792 BEGINWINDOWY 37392
        TEST
            FRONT
        ACTION
            [EXTRACT_LINE] 
            AND [EXTRACT_FONT]
            AND  [EXTRACT_CURSORX]
            AND [EXTRACT_CURSORY]
//         AND [DELETE_LINE]  //Test adding the new line of text to see if it is on the correct location, then uncommented the DELETE action            
            AND [FORMAT_LINE] 
           AND [ADD_NEW_LINE]
    ENDWINDOWX 42888 ENDWINDOWY 38832 
;

[EXTRACT_LINE] EXTRACT [VARIABLE_LINE] FROM TEXT1;
 
[FORMAT_LINE] FORMAT [VARIABLE_LINE_REFORMAT] FROM "%s %s"
[VARIABLE_LINE] AND
"new text added"
;
 
[EXTRACT_CURSORX] EXTRACT [VARIABLE_CURSORX] EQ TEXTCURSORX;
[EXTRACT_CURSORY] EXTRACT [VARIABLE_CURSORY] EQ TEXTCURSORY;
[EXTRACT_FONT] EXTRACT [VARIABLE_FONT_INFO] FROM FONT NUMBER [VARIABLE_FONT_NUMBER];

[DELETE_LINE] DELETE TEXT;
 
[ADD_NEW_LINE] ADD TEXT [VARIABLE_LINE_REFORMAT]
    SIDE RELATIVE 0
    CURSORX ABSOLUTE [VARIABLE_CURSORX]
    CURSORY ABSOLUTE [VARIABLE_CURSORY]
    FONT [VARIABLE_FONT_INFO:1] ROTATION0;
 
The same text font should be used; the array variable [VARIABLE_FONT_INFO: index] is storing all the fonts from the page, determine what font belongs to the text extracted.
The fonts are located on the path: \MGRX.X\system\JOBXXXXX; in order to use them, the fonts should be placed on the vdrsub300 directory.



 
 

UPDATED: April 11, 2017

Contact Us