Help! Getting the index of a Character from the Characters collection

so, in a script i need to remove the text from the begining of the paragraph until the first tab (or dot or colon or "something") charater as simple and as fast as posible.
i was hoping for something like
myText=myParagraph.characters.itemByRange(0,"\t");
myText.remove();
Ofcourse i can use grep, but it has it's problems, and i was hoping i don't have to (especialy since the script will have to do this for 400+ times.
Any help?

Vamitul
I don't know if that's the way do go about it but this is what you are looking for.
myParagraph=app.selection[0].paragraphs[0];
myText=myParagraph.characters.itemByRange(0,myParagraph.contents.toString().indexOf("\t"));
myText.remove();
To delete until the tab not including it use myText=myParagraph.characters.itemByRange(0,myParagraph.contents.toString().indexOf("\t") -1);
Trevor
Message was edited by: ~ Trevor ~

Similar Messages

  • HT201269 My computer crashed and had to be restored to factory settings. My ipad has my ituned library. how do i get the music collection from the ipad to the computer?

    my computer crashed and had to be restored to factory settings losing ituness collection of music. My ipad has my itunes library. how do i get the music collection from the ipad to the computer?

    You should be able to copy iTunes purchases over to your computer's iTunes via File > Devices > Transfer Purchases. For music from other sources (e.g. copied from CDs) you will need a third-party program to copy them back from your iPad - there are some listed half-way down this page which should work : https://discussions.apple.com/docs/DOC-3991

  • I need help getting the license number for Adobe Photoshop Elements. However, It doesn't recognize me as an authorized user. Can someone help?

    I need help getting the license number for Adobe Photoshop Elements. However, It doesn't recognize me as an authorized user. Can someone help?@

    I am having the same problem...did you ever fix it?

  • Help get rid of Bing search engine from macbook pro os 10.7.5

    Help me get rid of Bing search engine from macbook pro os 10.7.5
    fmartn67

    You installed the "Genieo/InstallMac" rootkit. The product is a fraud, and the developer knowingly distributes an uninstaller that doesn't work. I suggest the tedious procedure below to disable Genieo. This procedure may leave a few small files behind, but it will permanently deactivate the rootkit (as long as you never reinstall it.)
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data. You must know how to restore from a backup even if the system becomes unbootable. If you don't know how to do that, or if you don't have any backups, stop here and ask for guidance.
    Step 1
    In the Applications folder, there may (or may not) be an application named "Genieo". Genieo may be partially installed even if this item is absent. If it's present, select it and open the Finder Info window. If it shows that the Version is less than 2.0, download and install the current version from the genieo.com website. This may seem paradoxical, since the goal is to remove it, but you'll be saving yourself some trouble as well as the risk of putting the system in an unusable state.
    There should be another application in the same folder named "Uninstall Genieo". After updating Genieo, if necessary, launch "Uninstall Genieo" and follow the prompts to remove the "newspaper-style home page." Restart the computer.
    This step does not completely inactivate Genieo.
    Step 2
    Don't take this step unless you completed Step 1, including the restart, without any error messages. If you didn't find the Genieo application, or if you couldn't complete Step 1 for any reason, stop here and ask for instructions.
    Triple-click anywhere in the line below on this page to select it:
    /Library/Frameworks/GenieoExtra.framework
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.
    If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder should open with an item named "GenieoExtra.framework" selected. Move that item to the Trash. You'll be prompted for your administrator password. Move each of these items to the Trash in the same way:
    /Library/LaunchAgents/com.genieo.completer.update.plist
    /Library/LaunchAgents/com.genieo.engine.plist
    /Library/LaunchAgents/com.genieoinnovation.macextension.plist
    /Library/LaunchDaemons/com.genieoinnovation.macextension.client.plist
    /Library/PrivilegedHelperTools/com.genieoinnovation.macextension.client
    /usr/lib/libgenkit.dylib
    /usr/lib/libgenkitsa.dylib
    /usr/lib/libimckit.dylib
    /usr/lib/libimckitsa.dylib
    ~/Library/Application Support/com.genieoinnovation.Installer
    ~/Library/LaunchAgents/com.genieo.completer.download.plist
    ~/Library/LaunchAgents/com.genieo.completer.update.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those listed above, move them as well. There's no need to restart after each one. Some of these items will be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    Restart and empty the Trash. Don't try to empty the Trash until you have restarted.
    Step 3
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including ones called "Genieo" or "Omnibar," and any that have the word "Spigot" or "InstallMac" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Your web browser(s) should now be working, and you should be able to reset the home page and search engine. If not, stop here and post your results.
    Make sure you don't repeat the mistake that led you to install this software. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad has a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Genieo developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    Finally, be forewarned that when Genieo is mentioned on this site, the perpetrator of the scam sometimes shows up under the name "Genieo support." He will tell you to run the provided uninstaller, while lying about what it does. As he knows and intends, the uninstaller does not completely remove the malware.

  • Overheating Problem dv6, help getting the dust out.

    For a while now my Dv6 laptop has had a problem with over heating. It's around over 6 months old. Its continually getting hotter.
    Now I figure it's the dust, as it is in a high dust environment, my desk I have it on constantly has a layer of dust on it no matter how many times I clean it. I do not currently have a cooling pad. (dv6 notebook)
    What I want to do is clean out the dust from inside. Now I'm not an expert and I've never done it before, It looks kind of complicated to get the screws out etc. I found a guide on the net which seems good at taking it off but I'm not sure (http://forum.notebookreview.com/showthread.php?t=226910). 
    What I would like to know is:
    1) Is there an official step by step guide or an equivelent guide I can follow.
    2) Is there anything I need to know, not to do, to do, before/during taking the case off and cleaning ( what not to touch what not to unscrew etc)
    3) How many cans of compressed air would I need to fully clean it.
    4) Anything else I would need to know before attemping to clean it
    Also I had a problem with a sort of rattling/loud humming, sound comming from the left side, can't determine wether its the harddrive or fan. It is an intermittent sound, it normally starts up when I turn on the laptop, but ends up stopping sometime later.
    Any and all help is very welcome.

    hello.i was same problem.i solve it like this.i was put adesive band at all holes except cpu cooling hole.i put in a vacuum machine and i let it work almost two minutes.i got no promblem until then.a cheap solution without need to dezansamble hole notebook and loose the warranty
    rl]

  • Need help getting current/default audio playback device from VISTA

    Hello,
    I need to get the current audio playback device in VISTA.
    It's easy enough in XP as I just get this information from the
    registry. My understanding is that things are different under
    VISTA. I was told you can't change the device but you can get the
    device using the following...
    --CoCreateInstance(IMMDeviceEnumerator)
    --IMMDeviceEnumerator->GetDefaultAudioEndpoint(eConsole)
    Problem is I don't know what to do with that. I assume it
    needs to be compiled with some library (compiler, library, etc... I
    don't have)
    So... question, is there already an xtra that can get this
    information OR... can I pay someone to make an xtra using the above
    info?
    If you are able/willing to help, please let me know asap as
    project is due next week. I can pay you through paypal.
    Thank you!!!!!
    [email protected]

    http://www.schmittmachine.com/asPitchDetect.html
    Antoine Schmitt at that url builds Xtras and his
    asPitchDetect Xtra can get info on recording devices... try
    contacting him and he might be able to help you with a custom Xtra
    to get info on playback devices in Vista.

  • Need help getting the wireless driver for my x120e.

    This has been the most difficult thing ever. I have literally tried all of the wireless LAN and WAN drivers under all 4 of the x120e driver options. Which is odd because there are 4 options for the x120e when you search for it. As shown here: (http://i.imgur.com/4K9sB.png). I would love some help in getting the correct driver. Any and all help is appreciated, let me know if there is any other information needed.
    Solved!
    Go to Solution.

    no worries.
    you mentioned that you have tried a number of driver packs, to no avail.
    can you confirm if you've tried this: http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS012809
    ThinkPad 2x2 11a/b/g/n Wireless LAN PCI Express Half Mini Card Adapter for Windows 7 (32-bit, 64-bit), Vista (32-bit, 64-bit) and XP
    found in the X120e driver matrix, here: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&DocID=HT072377
    cheers.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество
    Community Resources: Participation Rules • Images in posts • Search (Advanced) • Private Messaging
    PM requests for individual support are not answered. If a post solves your issue, please mark it so.
    X1C3 Helix X220 X301 X200T T61p T60p Y3P • T520 T420 T510 T400 R400 T61 Y2P Y13
    I am not a Lenovo employee.

  • I need help getting the software updates

    i was constantly disconnecting from the internet when playing online games on the mac side of my hard drive until i got a software update, but i dont think the update carried over to my windows xp partition, so i still frequently disconnect when playing games on windows, anybody know what the problem is or how i can get the software updates on the windows side?

    i dont think the update carried over to my windows xp partition
    Of course it didn't. Mac updates don't affect windows, and vice versa.

  • Need help get the sound timed to the picture

    Photoshop elements 12. On a PC. How do you get the sound  to time with the picture when you are trying to edit it?

    That makes more sense.    I wish could help specifically, but I use another NLE video application.
    Was the audio recorded separately or at the same time as the video? If the latter, I'm pretty sure Premiere should lock the audio event with the video as you move it. (At least most NLEs do.)

  • Need help getting the powerbook to see the hard drives

    I have been working on the Powerbook G4 17 inch. I am trying to reinstall the Mac OS 10.4 but when I get to the screen where I have to select a disk none show up. I have tied going in to disk utility and formating the drive but I get error codes. I them tried to reset the PRAM and it did not work. Now the mouse pad is not working and I can't get the start up disk to work.

    well I did not write it down but the hard drive has dismounted and now when I hold down the option key during start up it does not show the drives. It will however show the install disk. Now when I try to boot the disk it will not boot. The only thing I can think of is the original install disk needs to be out in the computer. The owner does not have one and I own MacBook's.

  • Need help getting the digits without the decimal

    I have a number such as 6711.00425532 , how can I get the 6711 without rounding this number up or down. In another words, I don't care with any number after the period, all I need is whatever the number before the period, as is.
    If the number is 23.02345,  I need to get just the 23
    If the number is 344.985430,  I need just the 344
    Is this possible?

    BYJ_wntrsnt wrote:
    I have a number such as 6711.00425532 , how can I get the 6711 without rounding this number up or down. In another words, I don't care with any number after the period, all I need is whatever the number before the period, as is.
    If the number is 23.02345,  I need to get just the 23
    If the number is 344.985430,  I need just the 344
    Is this possible?
    Fix it.
    <cfoutput>
    fix(6711.00425532): #fix(6711.00425532)#<br>
    fix(23.02345): #fix(23.02345)#<br>
    fix(344.985430): #fix(344.985430)#<br>
    fix(-6711.00425532): #fix(-6711.00425532)#<br>
    fix(-23.02345): #fix(-23.02345)#<br>
    fix(-344.985430): #fix(-344.985430)#<br>
    </cfoutput>

  • Need help getting the syntax.

    Hi All,
    Greetings !!!!!!!!!!
    While using the following syntax not getting the output required...
    1) <?xdoxslt:set_variable($_XDOCTX, 'v_l',xdofx:(nvl(V_COUNT,0)+nvl(V_COUNT1,0)+nvl(V_COUNT2,0)+nvl(V_COUNT3,0)+2)?>
    2) <?xdofx: xdoxslt:set_variable($_XDOCTX, 'v_l',(nvl(V_COUNT,0)+nvl(V_COUNT1,0)+nvl(V_COUNT2,0)+nvl(V_COUNT3,0)+2)?>
    tried both the syntax but not getting the output.....
    Please let me know your valuable advices how it can be used.
    Thanks
    Rajesh

    Hi kwin,
    Thanks for your reply...
    V_COUNT, V_COUNT1, V_COUNT2, V_COUNT3 are present in data xml. but in different groups..for some parameters V_COUNT or V_COUNT1 will not be present in data file..
    so we will get null value for those...so when i add (V_COUNT+ V_COUNT1+ V_COUNT2+ V_COUNT3) i am getting value as NaN...so i used nvl function it worked fine..but this sum value need to be stored in in a variable..
    Hope you understand...
    Thanks
    Rajesh

  • Anyone know how to get the Nik Collection of plugins to work with PSCC?

    As above..

    Info from Nik:
    From Nik:
    On a Windows:
    1. Make sure all versions of Photoshop are closed.
    2. Run the Nik Collection installer from the file you received via email and downloaded. If you no longer have this file, you may email customer support ([email protected]) to have the file sent to you again.
    3. During the installation process when you get to the Host Application window, you will notice a plus sign to add an install location. Click that button and navigate to C:\Program Files\Adobe\Photoshop CC\Plug-Ins\.
    4. Complete the installation, then open Photoshop CC to ensure that the plug-ins have successfully been installed.
    On a Macintosh:
    1. Make sure all versions of Photoshop are closed.
    2. Run the Nik Collection installer from the file you received via email and downloaded. If you no longer have this file, you may email customer support ([email protected]) to have the file sent to you again.
    3. During the installation process when you get to the Host Application window, you will notice a plus sign to add an install location. Click that button and navigate to Mac HD|Applications|Adobe Photoshop CC|Plug-Ins and paste the Google folder into this location.
    4. Complete the installation, then open Photoshop CC to ensure that the plug-ins have successfully been installed.

  • Need help getting the data from my old address book

    Can someone tell me what file I need to copy and where to restore all my addresses from my old address book. I elected not to migrate everything to avoid problems, but that is one important and long list.
    Any help will be greatly appreciated
    Mireille

    Look in the folder ~/Library/Application Support/AddressBook/ for the files containing your data, where ~ is the item in the Finder's sidebar with the house icon.
    (25514)

  • Help getting the first value from a arraylist

    Hi
    I have a arraylist, and when i print it out it prints out.
    [ben, ben, ben]
    [alex, alex]
    [matt, matt]
    [mum, mum]
    [dad]
    How can get it to print out so that it will say this?
    ben
    alex
    matt
    mum
    dad
    thanks
    nicky

    nnickys,
    I showed you how to do exactly this only a few days ago.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=349885
    If you didn't understand how it worked then I would have been more than happy to explain it to you.
    Within the code we retreive a String array that contains one of the lines of your ArrayList. (The code loops through returning each one...);
    // retrieve each element in turn
    String[] thisLine = (String[]) li.next();
    You could then loop through this and output each element of that array, like this...
    for (int i=0; i<thisLine.length; i++) {
       System.out.println(thisLine);
    I hope this helps, salvadorEscobar.

Maybe you are looking for

  • How do I remove a file to trash from my desktop? when I drag to trash it says I cannot delete

    I'm a seasoned iMac user but forgot from the "old days" how to delete a file to trash from the desktop when it says "The item ......can't be moved to the Trash because it can't be deleted". This is a file I downloaded a few days ago. Can you help, pl

  • IE8 error while downloading a report

    Hi, When I download a report to excel or any other format while working on internet explorer 8, following error referring to common.js comes though the report gets downloaded. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windo

  • Silverlight plug-in update - can't get it to work

    Silverlight plug-in disabled on Mac laptop: I tried updating several times - I get a message telling me that the update is installed - but the the plug-in remains disabled. How do I get the update to work? Thank you.

  • Anyconnect App in IOS 8

    Hello Im facing with an issue after upgrading IOS 7 to 8, Cisco Anyconnect app is unstable connection and skip after few minutes and needs to be reconnect. is any body here have experience on this issue? Thank You Ali

  • Issue in Report printing

    Xperts, I hv an ALV report program which displays some output. While i am printing it , it prints some fields as blank.. Actual report output mmmmm1 hhhhh1 kkkkk1 mmmmm2 hhhhh2 kkkkk2 mmmmm3 hhhhh3 kkkkk3 Prrinted output mmmmm1 hhhhh1 kkkkk1 mmmmm2 h