How do I set tabs in textFrames with tabStops?

Could anyone show me the javascript syntax, or point me to a script, that sets tabStops and positions them.
I can't get it working.
Please ask if any further clarification or explanation would be usefull.

I see that overnight the JavaScript heavyweights have waded in. Thanks Guys. It seems I can't edit my original post now, so I'm having to reply to it.
From what I gather you are saying, I can't create a tabs with a script. But maybe if my template document had a text box containing tabs I could copy the paragraph attributes to a new paragraph and them manipulate the TabStop.position value.  Would that be the way to proceed?
Carlos, you asked to see what I'd done so far so here it is!  As you will see I'm an enthusiastic novice with a lot to learn when it comes to javascript, so any comments or suggested improvements anyone cares to make would be most welcome.
I am creating ai files containing text and graphic elements created from data in a XML file, mostly these are tabular data. Below is the function that handles the text elements.
function layOutText(ele){
    var eleText;
    if (ele.@type=="area") {
        var rectRef = doc.pathItems.rectangle(ele.position[0]/1, ele.position[1]/1, ele.size[0]/1, ele.size[1]/1);
        eleText = doc.textFrames.areaText(rectRef);       
        if (ele.@class=="dataTabbed"){
            var dataArray= new Array ();
            eleText.contents=splitDataString(ele.value.toString());//this is a call to a function that splits and puts in the command characters for the tabs and
            eleText.paragraphs[0].paragraphAttributes.tabStops.length=ele.tab.length();
            for (tab=0; tab<ele.tab.length(); tab++){
             eleText.paragraphs[0].paragraphAttributes.tabStops[tab].tabStopsInfo.position=ele.tab[tab ];// this doesn't work
        else {
            eleText.contents= ele.value.toString ();
        if (eleText.paragraphs)eleText.paragraphs[0].hyphenation=false;
    else {
        eleText = doc.textFrames.add();
        eleText.position=[ele.position[0]/1, ele.position[1]/1];
        eleText.contents= ele.value.toString ();
    eleText.textRange.characterAttributes.textFont=app.textFonts.getByName(ele.fontStyle.font .toString());
    eleText.textRange.characterAttributes.fillColor=giveColor(ele.fontStyle.colour.toString() );
    if (ele.justification.@type=="center") eleText.paragraphs[0].justification = Justification.CENTER;
I am passing it a XML objects that prints out something like
<textElement type="area" class="dataTabbed">
  <value>Benefit t £9,600 t 40% t 23% r Clarins t £7,000 t 10% t -13% r Dior Beaute t £4,500 t 5% t 26% r No7 t £21,500 t -10% t -16% r YSL t £3,200 t -20% t 37%</value>
  <tab type="left">400</tab>
  <tab type="left">600</tab>
  <tab type="left">800</tab>
  <tab type="left">1000</tab>
  <tab type="left">1500</tab>
  <position type="top">275</position>
  <position type="left">10</position>
  <size type="width">350</size>
  <size type="height">140</size>
  <justification type="left"/>
  <fontStyle class="data">
    <font>Tahoma</font>
    <size>11</size>
    <colour>black</colour>
  </fontStyle>
</textElement>
Thank you.

Similar Messages

  • How can i set tab within a table?

    how can i set tab within a table?

    With a live insertion point in a cell, type Alt/Opt+TAB, or, right-click and choose > Insert Special Character > Other > Tab, or, press Ctrl/Cmd+Shift+T to bring up the Tabs panel.

  • How do i set up a slideshow with pictures from multiple iphoto libraries?

    How do i set up a slideshow with pictures from multiple iphoto libraries? One library is in my Macbook Harddrive, the other 2 libraries are in an external harddrive. Thank you!!

    You can't, simply. An iPhoto Slideshow can only draw from a single library, so you'll need to get all the images into one.
    Alternatives to iPhoto's slideshow include:
    iMovie is on every Mac sold.
    Others, in order of price:
    PhotoToMovie  $49.95
    PulpMotion  $129
    FotoMagico $99
    Final Cut Pro X $299
    It's difficult to compare these apps. They have differences in capability - some are driven off templates. some aren't. Some have a wider variety of transitions. Others will have excellent audio controls. It's worth checking them out to see what meets your needs. However, there is no doubt that Final Cut Pro X is the most capable app of them all. You get what you pay for.

  • How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    How can I set up two iPhones with the same contact, photos, music etc... but a different sim card and phone number. They will both be my phones, but one will be for use in other countries.

    Phone A = phone with information you want duplicated
    Phone B = phone that you want to copy from A
    Backup Phone A.
    Wipe Phone B using these instructions. What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support
    Phone B should be on the 'Hello' screen. Do not swipe it. Launch iTunes. Plug in Phone B.
    When iTunes asks if you want to set up as new phone or restore from backup, choose restore from backup of Phone A.
    After this setup, any changes to one phone (i.e. adding a contact, downloading an app) will have to be manually duplicated on the second phone, if that is your desire). Making changes to one phone will not affect the other after setup.

  • How do I set up home sharing with I pad

    HOw do I set up home sharing with Apple TV on my I pad?

    don't believe ios devices support home sharing think only computers support that
    with ios devices one can use airplay
    if it's an ipad 1g only the audio part of airplay
    as in using the appletv as remove speakers

  • I have my iphone 5 set up with Itunes on one computer, but I recently just bought my own computer. How do I set up my Iphone with the new Itunes account? Its telling me it can only be set up with one account. Do I have to delete the other account?

    i have my iphone set up with itunes on one computer, but i recently bought my own computer. How do I set up my iphone with the new itunes account? It says my phone can only be set up woth one itunes account. How do I remove the previous account?

    ThisGal_Drea wrote:
    i have my iphone set up with itunes on one computer, but i recently bought my own computer. How do I set up my iphone with the new itunes account?
    Do you mean iTunes library?
    iTunes account is what you use to make iTunes purcahses.
    iTunes library is what is on your computer.
    It says my phone can only be set up woth one itunes account. How do I remove the previous account?
    No, it tells you it can only be sync'd with one iTunes library.
    Simplest way is to copy the entire /Music/iTunes/ folder (thisis the iTunes library) from old computer to new computer.

  • I connected my Canon printer to time capsule, and can print OK. However, I can't get the printer scanner to work. How do you set up the scanner with Time Capsule?

    I connected my Canon printer to time capsule, and can print OK. However, I can't get the printer scanner to work. How do you set up the scanner with Time Capsule?

    You cannot use USB. It has to be a network capable printer.. is it?? You did not indicate how it is connected.. but by wireless or ethernet then scanning is possible otherwise not.

  • HT4759 how do i set up an account with icloud

    how do i set up an account with icloude?

    Setup iCloud on iPhone.
    http://www.apple.com/icloud/setup/ios.html
    Once that's done you can download iCloud for Windows and use it on your PC, if you have Win7 or Win8

  • How can I set up iCloud sync with Outlook 2007 using Hotmail account?

    Hi,
    I installed iCloud PC control panel. I tried to sync my contacts and calendars from Outlook (2007) to the cloud but I gets this message: "Add an e-mail account to Outlook Before setting up iCloud". I have an Hotmail account synced up into my Outlook via Outlook Connector. Can iCloud sync with Hotmail accounts?
    What should I do to get my calendars and contacts synchronize to the cloud. Does Outlook 2007 can be synced by the cloud too?
    How can I set up iCloud sync with Outlook 2007 using Hotmail account?

    I found a way to fix this, it did the trick for me:
    https://discussions.apple.com/thread/3109623
    All you have to do is include a new e-mail account [email protected] (set it as a default) on Outlook with the options that are showed in the thread I linked and you should have the calendars and tasks syncronised. It works perfectly with ipod touch, ipad and Outlook 2010 on windows 7.

  • How do I set up a mixer with a reverb bus and send to it?

    I'm just starting with STP so forgive me if this is a stupid question, okay?
    I'm using Soundtrack Pro exclusively for multitrack audio. I will typically have 8 audio tracks I import into STP, each of which has its own channel strip in the mixer. I have set up a separate buss for Reverb so that each track can access the same reverb setting. Usually there is a rotary dial on each channel strip so you can send, for example, a little bit of drums to reverb, a tiny bit of bass, and a lot of background vocal to the reverb. All I seem to be able to do in STP, though, is to assign a given audio channel strip to the Reverb channel strip, with no control over how much of the audio I send to the buss.
    Since this is a standard feature of any mixer, I'm assuming that STP's mixer can do it, but I just don't know how to implement it. Anybody know?
    Also, what goes to the reverb buss is PRE-FADER. So, if I pull down the fader from a track, the full signal from that track continues to go to the reverb buss. How would I set this to POST-FADER?
    Thanks --and I apologize if these are dumb questions. I'm fully prepared to say, "DOH!" when somebody tells me the answers!
    --monadyne

    Hi Monadyne,
    Sounds like you want to use sends and busses. Per your example, here's what you'd do:
    1. You can create a bus (Multitrack->Add Bus)
    2. Add the reverb as an effect on the bus (e.g. click on the effects "*" on Bus 1 that you just created and add a reverb)
    3. On any individual track, you can add a send (click on the effects "*" in the track header, then click on the [Add Send] button at the bottom of the Effects tab).
    If you click on the the reveal traingle for the send (in the effects tab), then you can set the send level and select pre/post fader.
    I hope that helps.

  • HT204053 How do I set my ipod up with itunes under same account

    How do I set up my ipod up with itunes under the same account?

    Settings->iTunes and Apps Store->Sign In.
    You probably also want to sign into the Cloud with
    Settins->iCloud->Sign in.

  • How do I set up a home with 4 Platform components, 3 v. 10 and 1 v. 9.2?

    This is probably simple, but I can't find the answer in the various documents. I want to install a home with all the latest Platform components. Since Integration 10 has been delayed, I want to set up a home with Server 10, Workshop 10, Portal 10, and Integration 9.2. How exactly do I do this? After I install the first 3 components, when I try to install Integration 9.2 the installer wants also to install Server 9.2 and Workshop 9.2.
    Or is what I'm trying to do even advisable? Does needing Integration mean I have to use Platform 9.2 MP2? How exactly should I set up my home?
    Thanks in advance for your help.

    I am considering putting three or more OS's on my
    computer. Would someone show me how to set up a
    master boot record to give me a choice between
    Windows XP Professional Edition, Solaris 10 6/06, Red
    Hat Linux 7 (Fedora Core 5), and possibly Knoppix
    5.0.1, Snappix, and Morphix?Have you seen this article?
    http://www.sun.com/bigadmin/features/articles/multiboot_laptop.html
    I want the boot record
    to be posted in both Windows' BOOT.INI file and in
    GRUB.What do you mean by that? You can only have one thing in the MBR, but of course that thing could chain to something else.
    Darren

  • My old computer crashed, how do i set-up my ipod with my new mac?

    My computer crashed so we got a mac, i get alot of songs cds so not all of my songs are coming off my ipod on to my new computer.
    So i have all my songs on my ipod and i can have it pop-up in itunes but i have to drag all the music i get off cds that go into itunes onto my ipod. How do i set up my ipod so it will be with my new mac?

    Or this if you have a Mac...
    https://discussions.apple.com/docs/DOC-3991http://
    As far as I know you need third party software unless you bought the music from iTunes, then it's easy.
    Good luck.

  • How do I set the desktop wallpaper with an image in aperture 3?

    Sorry for the silly question, but I can't find how to set my desktop wallpaper with an image in aperture 3. It was simple when using Iphoto, but I can't find the method in aperture.
    Thanks,
    Dale.

    Command(⌘)-9 is no longer listed in the list of default keyword shortcuts, and it has no effect.
    I wrote a little Automator service to bring the Command(⌘)-9 back.
    A copy of this service is here for download:
    http://dreschler-fischer.de/scripts/SetDesktopPicture.workflow.zip
    This service uses three actions:
    Aperture: Get selected images
    Export Masters
    Finder: Set the Desktop Picture
    To install it, open the workflow in Automator and save it as service.
    To use it, select any image in Aperture, then activate the service from the Aperture menu -> Services, and it will set the master of the selected image as Desktop picture.
    If you like, you can assign the Command(⌘)-9 key to the service (in the System Preferences -> Keyboard -> Keyboard Shortcuts Panel) and then  turn any image you selected into Desktop wallpaper by simply pressing (⌘)-9.
    @Frank Caggiano, if you are still following this thread: for some reason this workflow succeeds with exporting the master, but I could not get it to work with the versions instead. Any ideas?
    Caution: this service will clutter the Desktop with the exported images. If you want to avoid that, change the export action to export the image to a different folder.
    Regards
    Léonie

  • How do I set up two accounts with two separate mail applications?

    My wife and I have two separate email accounts. At home she gets her mail on her computer and mine on my computer. While traveling I would like to be able to allow her to get her email on my laptop. I set up the 2nd account and activated it but her email comes in mixed with mine. How can I set up a separate mail program for her account?
    Thanks in Advance,
    Jim Conrad

    Hello Jim.
    As already provided, open Inbox to reveal the Inbox for each account. Selecting an account's Inbox mailbox reveals messages received by that account only in the message list. Selecting Inbox reveals a "blended" Inbox mailbox for all accounts.
    The same applies to Drafts, Sent, Trash and Junk in the mailboxes drawer.
    If you want these accounts to be truly separate, create a login account on your iBook for your wife - with or without admin privileges. Your wife can create her email account only in Mail under her login account and you can delete her account from Mail under your login account.
    This way, each others' email accounts are kept completely separate along with all other data in each other's Home folder/directory. OS X was designed for multiple users in this way.
    You can enable Fast User Switching which makes the process of switching between multiple login accounts a fast and easy process.
    There are some families with 4 or more family members that use a single Mac in this way. Each login account can have their own Desktop background and settings, etc., etc. so when logging in to their account the Mac seems like it is theirs only.
    This link focuses on setting up separate user login accounts for kids but the effect is the same.
    http://www.apple.com/macosx/features/family/

Maybe you are looking for

  • Magsafe Charger not charging - when it lights up may not work

    I started experiencing this a few weeks ago. Since then I have gone through 2 adapters. The magnet works and everything, but it doesnt light up, and where that battery is up there it doesn't show any signs of recognition. I have to wiggle it a little

  • How do you declare objects in the master database

    I am trying to register our CLR assembly as an unsafe assembly without having to make the database trustworthy.  Since making the database is_trustworthy_on = 1 is not a best practice, and would cause some of our customers (and our development proces

  • Multi-Mappings in BPM (XI 3.0)

    Hello, I´am trying to create a multi-mapping to merge a list of messages into one single message. Does anyone know if there is a multi-mapping testing environment ? If I test the multi-mapping in the normal message mapping test environment every thin

  • Why does my iBooks keep closing?

    I'm about half way into a new book and now it keeps freezing and then closing on me. Doesn't seem to do it with my other books. What can I do to resolve the issue?

  • Trigger for every 1000 record insert

    Hi I am working in oracle 9i / Aix 5.3 I need a trigger which should fire whenever my temp_table growing 1000,2000...etc., The records should reach me in the body of email. Like Hi The temp_table count has been reached to 1000. Thanks second time exe