Find Tab position

Hi All,
I need to find the tab position and alignment, and change the following:
1. Change the first tab in the paragraph (Left align tab into Center align tab)
2. Change the second tab in the paragraph (Left align tab into Right align tab)
Before script:
After Script:

Hi Chinnadk,
Excellent Stuff!!!!!
But there is a small confusion, what I explain in the above thread.
Please refer the below screenshots:
After using the below script:
var paras = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements();
for(var i=0;i<paras.length;i++)
    var tabstops = paras[i].tabStops;
    if(tabstops.length>1){
        tabstops[0].alignment = TabStopAlignment.CENTER_ALIGN;
        tabstops[1].alignment = TabStopAlignment.RIGHT_ALIGN;
Output looks likes:
But the Final Requirement is,
1. Extend upto the end of textframe
2. Equal space between the three entry
I need a script for the following things only
Once again Great thankful, If you help for this request.
Could anyone help for this complex task?
Thanks for All
Siraj

Similar Messages

  • Finding the position of the end of a line in a JTextPane

    I'm trying to make a JTextPane which expands horizontally if the text being typed in it reaches the right hand edge. To do this I need to know the position in the Document of the end of the current line.
    I've managed to write a method which expands the JTextPane vertically using getEndPosition() in AbstractDocument.
    There is an endLineAction in the DefaultEditorKit which moves the Caret to the end of the line but I don't want to move the Caret, just find the position of the end of the line. I did have a method before which moved the Caret to the end of the line, stored the position and moved it back but that wasn't suitable.
    I suspected the answer was to do with the View but I can't figure out how the View relates to the JTextPane or Document.
    Can anyone help?

    Well, personally I don't think its a good idea to keep changing the size of the text pane as text is being typed and I doubt the solution will be as easy as you think.
    As you type the text will automatically wrap so it will be a little late trying to change the width after the text has wrapped, which means you would need to increase the width "before" text is typed. But then you have another problem because you don't know how much to increase the width by since a single character could be typed or a string of text could be pasted into the text area (people always forget about pasting when doing stuff like this).
    Also if text is removed you would need to iterate through all the line to find the longest line and reset the width.
    Anyway the only way to know the width would be to play with the modelToView() method. If you want to find the end of the current line then you can use the Element.
    Check out my [Text Utilities|http://www.camick.com/java/blog.html?name=text-utilities] class which might give you some ideas on how to use the Element class and modelToView() method.
    which has example of using the above Class and method that might give you some ideas.

  • How to find the position of view in MM02 transaction for coding BDC?

    Hi Guys,
    Is there any FM or BAPI Available to find the position of the view in MM02 transaction. I tried FM SELECTION_VIEWS_FIND. But getting inconsistent results
    i.e Some materials it is giving correct positions but for others i am getting wrong position. So my BDC is getting failed.
    Thanks in advance.
    Vinod.

    Hi,
    data : i_t133a like t133a occurs 0 with header line,
          ch(1),
           viewno(2) type n.
    clear viewno.
      select * from t133a into corresponding fields of table i_t133a
                    where bilds = '21' and guifu like 'SP%'  .
      loop at i_t133a .
        ch = i_t133a-pstat.
        if mara-vpsta na ch .
          delete i_t133a     .
          continue .
        endif .
      endloop.
      sort i_t133a by guifu ascending .
      loop at i_t133a .
        viewno = viewno + 1 .
        if i_t133a-guifu = 'SP01'.  "FOR BASIC DATA1                CHANGES              ACCORDINGLY REFER TABLE T133A TO FIND VTHE VALUE
          exit .
        endif .
      endloop .
    reward if usefull

  • Finding a position of an item in a list.

    What i am looking to do is find the position of an item in a list. for instance if my list contains [a, b, c, d, e] and on my command line i put a f d, i want it to return a value of 3 for the position of the 'd' in my list. Could anyone please advise the best way to complete this? I think i am having the problem of it recognizing the 'd'. I would appreciate any help. Here is a piece of my code.
    import java.io.InputStreamReader;
    import java.util.LinkedList;
    import java.util.Scanner;
    public class LinknedList {
         public static void main(String args[]) {
              Scanner scanner = new Scanner(new InputStreamReader(System.in));
              // Setting up the link list of strings
              LinkedList<String> list = new LinkedList<String>();
              // MyLinkedList myList = new MyLinkedList();
              while (scanner.hasNext()) {
                   char option = scanner.next().charAt(0);
                   option = Character.toLowerCase(option);
                   switch (option) {
                   // inserts to end of list
                   case 'i':
                        if (scanner.hasNext()) {
                             String value = scanner.next();
                             list.addLast(value);
                             // myList.addLast(value);
                        } else {
                             System.out.println("ERROR: Unexpected end of input \"a\"");
                        break;
                   case 'r':
                        if (!list.isEmpty()) {
                             System.out.println("Removed: " + list.removeFirst());
                        } else {
                             System.out.println("ERROR: List was empty");
                        break;
                   case 'p':
                        System.out.println(list.toString());
                        break;
                   case 'a':
                        if (scanner.hasNext()) {
                             String value = scanner.next();
                             list.add(0, value);
                        } else {
                             System.out.println("ERROR: Unexpected end of input \"a\"");
                        break;
                   case 'd':
                        list.clear();
                        System.out.println("Your list has been deleted.");
                        break;
                   case 's':
                        int num = list.size();
                        if (num == 0) {
                             System.out
                                       .println("The list does not have any items in it.");
                        } else
                             System.out.println("Your list is " + num + " items long.");
                        break;
                   case 'f':
                        // need to find the position of an letter on the command line
                        break;
                   default:
                        System.out.println("Not an option: " + option);
                        break;
                   System.out.println("Java: " + list.toString());
                   System.out.println("Mine: ");
    }

    What i am doing is building a Linked List. It will have a standard input. you have multiple commands. i, a, d, p, s, f. i will insert, a will add, d will delete, p will print, s will display amount of items on the list and f will set the position in the list. For example. if i type:
    a john
    the result will be:
    [john]
    a paul
    the result will be:
    [jon, paul]
    Lets say i have the list with the items [jon, paul, ringo, geroge] in it and i choose:
    f paul
    a stuart
    the result will be:
    [jon, paul, stuart, ringo, george]
    I want the f switch statement to make a new point in the list where the new item will be added.

  • How can I find the position of a robotic arm with a cFP-CTR card?

    Hello,
    I use a CTR-500 to measure the pulses of 3 encoders.
    The encoders are related to the 3 axis (x,y,z), to which a robotic arm is moving.
    Each encoder has 2 channels (A,B) which go to each pair of Count Inputs of the CTR card.
    When the robotic arm is moving on one axis, the corresponding pair of Count Inputs is increasing, but there is a phase between the one Count Input and the second one. What is more, the Count Inputs do not decrease when the robotic arm is moving to the other direction, but they still increase.
    So, I cannot find easily the position of the robotic arm.
    What I have done, is to try finding the position, by using only one Counter Input for each axis. This means that I use the value of the encoder as a counter, and I calculate the position with some software tricks. But for some reason, it does not work properly.
    I have heard that the method I use is not proper. Instead, I have been told that I must use the phase of the 2 Count Inputs, in order to find the direction to which the robotic arm is moving. But, the Count Inputs of the CTR are augmenting in parallel, when the robotic arm is moving forward or backward.
    How can I find the position of the robotic arm, as it is moving like a CNC ?
    Thank you very much.
    Message Edited by nikosfs on 08-21-2009 12:27 PM

    You don't want to use a cFP-CTR-500 card.  What you have are quadrature signals.  You should be using the cFP-QUAD-510.  It has 4 channels that can handle both the A and B signals of a quadrature encoder.  It has the built in circuitry do determine the phasing of A vs. B to know when to count up vs. count down.

  • Need help in finding the position of a SubString in a String

    Hi All,
    I have a VARCHAR2 column in my table which has data similar to '152-425-3265-8-5623-45'.
    I want to find the position of the numbers in the column.
    For example:
    If i give 8 - query should return me 4.
    If i give 425 - query should return me 2.
    The numbers are delimited with '-' value.
    Please help.
    Thanks in advance.
    Edited by: 868171 on Jun 24, 2011 4:33 AM
    Edited by: 868171 on Jun 24, 2011 4:34 AM

    do you know the max number of dashes?
    if so
    with t as (select  '152-425-3265-8-5623-45' code, '425' num from dual union
                   select  '152-425-3265-8-5623-45' code, '8' num from dual)
    select code, num, case num when  regexp_substr( code,'[^\-]+',1,1) then '1'
                   when  regexp_substr( code,'[^\-]+',1,2)  then '2'
                   when  regexp_substr( code,'[^\-]+',1,3) then '3'
                   when  regexp_substr( code,'[^\-]+',1,4)  then '4'
                   when  regexp_substr( code,'[^\-]+',1,5) then '5'
                   when  regexp_substr( code,'[^\-]+',1,6)  then '6'
                   else 'not found' end result
    from t
    CODE     NUM     RESULT
    152-425-3265-8-5623-45     425     2
    152-425-3265-8-5623-45     8     4or if you have 11g you can use regexp_count
    with t as (select  '152-425-3265-8-5623-45' code, '425' num from dual union
                   select  '152-425-3265-8-5623-45' code, '8' num from dual)
    select code, num, regexp_count(regexp_substr(code,'^.*'||num||'.'),'-')
    from tEdited by: pollywog on Jun 24, 2011 7:55 AM

  • Finder tabs get stuck on desktop when dragging out

    Hello everyone
    After the Mavericks update I had some trouble with the new Finder tabs feautures. Whenever I drag a Finder tab and release it on the desktop it seems like it is going to dissapear but during the animation out it freezes. I have attached two screenshots of my desktop where you clearly can see the problem. Does anyone have an idéa how to fix this?
    Thank you
    Yours sincerenly

    Hi,
    MBPro Retina, me too as well… … (and this is not the only one problem I have with the Mavericks Finder).
    I fear that this is due to some "extra" application or prefs … but I have not idea which one.
    I suspect this because me too, logging with another "clean" user account I have not this problem.
    But neither quitting all extra applications or booting in Safe boot does not solve anything.
    Annoying.

  • Find tab will not open in FF25

    After installing FF25 the find tab will not open. Cntrl +F or F3 does not open any find tab. Click on edit, scroll down to Find, click; nothing.
    Even downloaded FindBar Tweak to no avail.
    Using Win Vista.
    Thanks in advance.

    ok, i was just basing this assumption on a report from another users a few minutes ago: https://support.mozilla.org/questions/971806#answer-497599
    as a general troubleshooting procedure, can you try to launch firefox in safemode once and see if the issue is reproducible there too?
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

  • Indent /tab position for text from INCLUDE texts in SAPscript

    Hi, ABAP colleagues!
    Need your help on this sapscript problem:  How to align texts taken from "INCLUDE TEXT" in SAPscript, according to tab defined in Paragraph Format?
    Or, how to control tab positions for texts which were extracted from “INCLUDE text” commands in SAPscript?
    I defined a paragraph format with tab stop at 8 CH so that with 2 commas (,,) my text will be displayed there.  However it always appears to the left (e.g. 1st column) and not indented at the proper column for description/text (e.g. which is in second column). 
    Pls help, bec a different heading and information is not acceptable to client for the Thailand characters. 
    Above is the description of the problem.  Below are some technical details.
    For specific example, I am editing Zversion of standard sap MM form MEDRUCK Window Main -  Text Element Item Text.
    BG ,,&TTXIT-TDTEXT&
    /: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&
    /: NEW-PARAGRAPH BG
    So far, tried these approaches:
    PARAGRAPH
    NEW-PARAGRAPH
    LANGUAGE '2'
    THANGSAN font
    Any ideas?
    Thank you so much in advance for all your help. Our project team will really appreciate it. May the Lord bless you as we go through our SAP work!
    Sincerely,     
    Celeste

    Hello Caleste,
    Please let me know what settings you have done to solve this issue.
    Help me with steps for Spool Request/Print settings.
    Regards!!
    Surya

  • Script Paragraph Format-TAB position Problem....

    In Script- Medruck , There is a line:
    IM   ,,,,,,Qty. ,,Unit   ,,Deliv. date ,,,,&ETUHRTXT&
    where IM is a paragraph format with TAB positions at:2,3,23,24,34,40,51,57.
    what is the meaning of ,,,,,,Qty ????
    what is the difference in writing :
    IM ,,Qty,,Unit,,Deliv. date,,&ETUHRTXT&                                 AND
    IM   ,,,,,,Qty. ,,Unit   ,,Deliv. date ,,,,&ETUHRTXT&
    How would the Display look like??

    Hi Srikar again,
    If you are putting one tab position after every field, in this case count tab position from the starting i.e. from first variable and go on countin till end . This will take you adding position one after other and it will not overlap.
    e.g. Mat,,qty,,price
    and tab position as 1 : 5  2: 10 3: 15 4:20
    then mat will start at 1 to 5 and qty will from 10 onward.
    Regards,
    Vijay

  • N8 GPS can't find my position

    Hello
    I have a big problem with my N8 GPS. I just use Integrated GPS in positioning methods and I disabled A-GPS, Network and Wi-Fi options. But Ovi Map 3.04 can't find my position. I compare my phone with an N79 and a 5800 in similar situation. They can easily find the position in less than a minute! But my N8 still searching and searching…. . It’s embarrassing!!!
    Can anybody help me?! Any suggestion?

    Grrr ! All that "experts" here...
    1, Use AGPS if you want to get a coarse estimation of your position.
    2. Use internal GPS only if you want to get a precise position.
    3. There are no (NO !) differences in position fix speeds caused by software. GPS works in a sequential way: A sequential data stream is sent by the satellites. To get a full position fix, all of that data stream has to be received, from start to end. THIS causes speed differences: If you start the GPS application at the beginning of the data stream, fix is fast. If you start it in the middle of the stream, the device has to wait for the stream starting again from the beginning. This is for collection "almanach" data - data about where the satellites are at present - they're moving.
    4. If that almanach data was received earlier and no too long ago, GPS fix is fast because the device does not have to wait for that almanach data stream. Again: It has NOTHING to do with different software.
    By the way: This is what AGPS does - downloading that almanach data via internet instead of waiting to get that data via the air and trying to triangulate your coarse position with the help of comparing the signal strengths received by different cell towers. Again: This does NOT provide you with precise positioning data - just estimations. Never use AGPS if you need a reliable position fix. .
    5. GPS signals are high frequency signals. Reception of such signals may vary greatly with the phone's position: One or two cm of placing difference may cause a big change in reception.
    6. GO OUT ! Do NOT try the GPS module indoors. You MAY get sufficient signal strength inside buildings - but this is an exception, not the rule.
    7. N8s GPS receiver is really fine, very sensitive. No problem with that.
    In short: Go outside. Don't use AGPS or network-based GPS. Don't believe people saying "Precise (!) GPS fix is much faster with software blabla..." Don't get fooled by a quick display of an estimated position: The real position fix did not get calculated at that point of time; it's still running in the background. This is what's causing that constant change of your position right after the first fix got displayed. A minute later, your position appears stable; and that's the point of time where real positioning data are used - not just coarse estimations.
    It all depends on that almanach data and a clear view of the sky.

  • Tab position change at runtine of tab canvas

    Dear gurus,
    Is it possible to change tab position of tab canvas at runtine in 10g forms?
    George.

    Gerd: Thank you very much for your advice.
    I will explain my situation. I have a form : INV. This has got three tabs : Header, Detail and Expenses. Some users prefer to see Header as the first tab while others want to see Details and still others like to see Expenses.They have their logic - what is important to that particular user he wants to see as the first tab.
    These preferences can be set in a different table(by an admin user) and can be applied once when the form opens and not during the runtime.
    Since tab order change facility is not available in forms, I need to apply the logic in a different way - activate the tab that each user prefers to see as the form opens regardless of the tab order.
    Hope you understand my case.
    George.

  • Find tab in the Carry out sourcing

    Hi experts,
    I'm working with the SRM Bidding Engine. In the Find tab in the Carry out sourcing menu there are two bottons:
    a) Add to work area
    b) Assign to me
    Could you please explain what is the difference between these two options?
    Thanks in advanced!!!
    Mar

    Hi Mar,
    both buttons support two different things:
    Add to work area needs to be pushed by everybody who wants to process a SC.
    Everybody with the authorizations can put a visibile SC into his/her work area
    and process the shopping cart; with the information given within the SC, like the
    Purchasing Group.
    Assign to me only changes the Purchasing Group (new screen follows), but does
    not move the SC into the workarea for processing. It is only an assignment change,
    to enable the assignment to a different purchaser and therefore enable the
    SC to be visible to that purchaser.
    Thanks,
    Claudia

  • SAPscript - Tab Position need more info

    Greetings.
    Could some one help me to explain the purpose of the tab position and what is  SIGN mean for Alignment attributes.
    In the tab position we can declare many TAB position, if we declare Number -1 Tab Position -17.00 CM Alignment - SIGN
    is it mean when we put , is it the position of the characters will be at 17cm from the left?
    Thank you.

    Hi,
    If you give the First tab position as 14 & 2nd Tab position as 17 c.m., it mean the first printing text starts at 14 C.M. and 2nd text starts from 3C.M.(17-14) next to 1st Tab Position (14c.m), i.e., the difference betn 1st Tab & 2nd Tab will 3 c.m.
    NOTE: Always any tab position starts from Origin not from the previous tab position.
    U dont need to give 2 couple of comma's for 2nd tab position.
    Eg:
    If you want the Text2 at 2nd tab position, u have to print like below:
      P1 ,,text1,,text2
    If you want the Text1 at 2nd tab position, print like below:
      P1 ,,,,text1
    Hope its clear!!
    Rgds,
    Pavan

  • Whenever i type something in google or any other website, a find tab with pink colour comes beneath the screen and i cannot type anything on google..whatever i enter goes in the find tab.....plz help

    whenever i type something in google or any other website a find tab pink colour comes beneath the screen and i cannot ype anything on google. whatever i type goes in the find tab and i cannot type anything on website......plz help
    == This happened ==
    Every time Firefox opened
    == 10 days ago

    Do a malware check with a few malware scan programs.
    You need to use all programs because each detects different malware.
    Make sure that you update each program to get the latest version of the database.
    http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    http://www.superantispyware.com/ - SuperAntispyware
    http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for