How can I get the InsertionPoint with FindText method.

Hi All:
In indesing script, I can find "abc text" with FindText method, and I want to insert a image here, but how can I get the insertionPoint(the FindText method return an object)? any help?
Thanks in advance.

What seems to be the problem?
>app.findTextPreferences.findWhat = "text";
>text = app.activeDocument.findText();
>alert ("insertionpt "+text[0].insertionPoints[0].horizontalOffset);
gives (as expected) the horizontal position of the first occurrance of "the".
Note that findText returns an
i array
of found items; its length may be 0 (not found), 1 (only found once), or any other number.
InsertionPoints is
i also
an array. Perhaps you expected it to be 'the' position of the found text -- it doesn't. It's an array of all insertion points in the found text.
'The' position of the text (in its parent text) is something like text[0].index ("The index of the Text in the collection or parent object.")

Similar Messages

  • I purchased an ablum thru itunes on my phone and it says i purchased the songs on itunes but when i go on my music it says i have to repurchase all the songs how can i get the songs with out havin to pay again

    I purchased an ablum thru itunes on my phone and it says i purchased the songs on itunes but when i go on my music it says i have to repurchase all the songs how can i get the songs with out havin to pay again

    Whether you can redownload music depends upon what country that you in. If you are using your computer's iTunes then does music show in the Purchased link under Quicklinks on the right-hand side of the iTunes store home page (on your phone you might be able to redownload media via the Purchased tab in the iTunes store app) ? If music shows there, but not that album, then check to see if it's hidden : http://support.apple.com/kb/HT4919
    If you aren't in a country when you can redownload music and it's still on your phone then you should be able to copy it over from the phone via File > Devices > Transfer Purchases.

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How can i get the address with drag and drop from address book into pages?

    I want to creat a letter withe the new pages. Normaly it was possible to put the adress from the adressbook with drag and drop into the letter. So it was possible to create one letter with many different adresses. But now I didn't find this function any more. How to do ist now?
    Withe best regards and I'm sorry for may bad english
    Klaus

    Sounds like you "upgraded" to Pages 5.
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • How can i get the name of a method

    i have a method which is calling another method.
    how can this submethod get the name from the main method?
    Thanks
    Thorsten

    There was a post about this a while ago, but I can't find it.
    Check out the getStackTrace method of Throwable (not the printStackTrace method). getStackTrace returns a StackTraceElement array. Each StackTraceElement has a getMethodName() method. In the returned array, the StackTraceElement at index 0 is the stack frame that the Throwable was created in, and the element at index 1 is the stack frame that your method was called from.
        public String getCurrentMethodName () {
            StackTraceElement[] st = (new Throwable()).getStackTrace();
            // Index 0 is the stack frame of "getCurrentMethodName"
            // Index 1 is the stack frame of the method that called this.
            // Index 2 is the stack frame of the method that called THAT.
            // Note that st[1] should always exist because this method
            // will always be called from another method (main, at very
            // least).  
            return st[1].getMethodName();
        public void myMethod () {
            System.out.println("The name of this method is " + getCurrentMethodName());
        };Hope that helps. I didn't test it, but it should work.
    Jason

  • How can I get the iBook app on my Mac to backup ePubs I created with Pages on my iPad? Only seems to want to work with purchased from the ibook store.

    How can I get the iBook app on my Mac to backup ePubs I created with Pages on my iPad? Only seems to want to work with purchased books from the ibook store. The problem is, once I create a document in Pages and turn it into an ePub to be opened in iBooks, I delete the document in Pages, because I don't need two copies taking up space on my iPad. Before Maverick, iTunes would backup everything in my iBook app on my iPad. If something ever happened to my iPad, all of my created ePubs would be lost and I would be screwed. I suppose I could keep everything on Pages and go to iCloud and download my documents to my Mac, but that is a lot of steps. I may have to do that if there is no other way, but I am hoping someone will have the answer for me. Pretty disappointed in iBooks app for Mac at this point.

    iBooks only syncs purchased books. Others must be synced in iTunes.

  • How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account an

    How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently
    it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account and in the past syncing was no problem.  What setting has changed?

    The phone number format as well as the date language and format and the time format are controlled by the Region Format setting. Go to Settings > General >International > Region Format.  When you change a region format, you can go back one page (to International) and see an example of the date/time/phone number format that your selected region format will produce.

  • Just replaced my iphone 4 with new 4.  restore from icloud is hung on an app I no longer use (password probably expired) how can i get the restore to move on to the next app

    just replaced my iphone 4 with new 4.  restore from icloud is hung on an app I no longer use (password probably expired) how can i get the restore to move on to the next app

    Read another post in the forum about this and it appears this app also installs a profile with a proxy service that you will have to try and delete as well. Check that out.

  • Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone (if you're using iOS 7), then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • HT4437 I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?

    I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?
    This one is used in Windows laptop, and I want it support AirPlay service, but Apple doesn't publish the AirPlay protocol.
    Many thanks.

    Create a developer account, then access he developers forums and see if you can find the information that way 
    The other option would be to simply contact Apple directly.

  • I'm not able to download the App Store with a software update. How can I get the App Store on my Mac?

    I have some problems to get the App Store on my mac. Every time when I do a Software Update, there is no App Store to download.
    How can I get the App Store on my Mac?
    It's because I want to set OSX Lion on my MacbookPro.
    Thanks!
    SmettSky

    As you have 10.5.8 you need to upgrade to at least 10.6.6 to get the App Store as this was the 1st version it came with.
    A workaround is to get a friend who has 10.6.6 or better to download Lion for you without installing it. You can create an App Store account on the friend's computer I think to do this. Copy the Lion installer from that computer to a USB stick or burn it to DVD and you should be able to install it on your own computer, I think. You might have to create an empty partition on your own computer first for Lion installation as I'm not sure that it will install over Leopard.

  • I downloaded some albums using my iphone, i then synced it with my PC. Now all the album artwork has gone from the songs i downloaded on my iphone, but not on the itunes on the pc. How can i get the artwork back on my iphone?

    I downloaded some albums using my iphone (3GS), I then synced it with my PC. Now all the album artwork has disappeared off my iphone but not off itunes on the PC. How can I get the album artwork back onto my iphone?

    I had the similar problem last night and found a solution (although it takes more than a few clicks).  Highlight all the album tracks in itunes on the pc and right click "get info". Check the artwork box in this window.  I found that the now playing art was showing up in the itunes window, but on songs that were missing artwork showed nothing in the get info box.  When I replaced the artwork by using the artwork command, or manually adding it into the "get info" window.  It was annoying but my iphone updated every album.

  • How can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    We need the Request Restart ability when scheduling a single reoccurring job in Redwood. Most of our jobs are scheduled in CHAINs which offers the Final Status Handler on Step level, and the schedule is "paused" when a job in the CHAIN has failed ( the next instance does not populate until the OP MSG has been Replied to) , and once the OPERATOR message is replied to, the CHAIN can resume running again ( desired ) . But we need this same ability when scheduling a single job not in a CHAIN. In our testing, we set up a job with Request Restart chosen on the Error , Killed and Unknown selections on the Restart Behavior Tab. But we found when a job is scheduled say once a day at 8AM, and when it fails, an OPERATOR msg appears allowing a Restart choice ( desired), but the next day's schedule also populates ( undesired) and we do NOT want the schedule to continue on yet because we need a chance to fix the error before the next insance runs for business reasons. So how can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    Hello Fran,
    You can wrap the job chain in a master job chain in the first step and set the final status handler there.
    You can also set the Restart Behavior to 'Stop Submit Frame', in that case you will have to resubmit the job once you are finished troubleshooting.
    Regards Gerben

  • When I turn on messages, I can't see my messages.  All I can see is a screen with horizontal lines and a text list of addresses.  How can I get the regular message screen back?

    When I turn on Messages, I can't see my messages.  All I can see is a screen with horizontal lines.  How can I get the regular Messages screen back?

    The same is happening for me. Today I decided to reboot my PC because it was acting up a bit, go figure, and then for some reason at the same time the PC was restarting my macbook froze. I had to do a reboot with the restart button but then all that came up was a gray background and in the middle of the screen was a darker gray folder with a white question mark in the middle of it, blinking. I can't imagine why the restart would've affected my macbook. After finding information on how to fix this, I tried all of the steps that were given about using the mac OS X disk to use the first aid utility to fix it. When using the Disk Utility option whenever I select my hardrive and am in the First Aid tab, the only button I can use is the Verify Disk Permissions. The other three buttons, and namely the most important Repair Disk button, is/are not selectable (grayed out). I then tried resetting the PRAM the way they also said with the command + option + P + R and waited for the second startup sound. After that I gave the Disk Utility a second try, but still nothing. And now if I try to just reinstall the OS completely I can't even select a destination volume on the third step (Select Destination). Apparently this means i'm SOL.

Maybe you are looking for

  • The music tating on my Ipod Touch don't show up on my Itunes

    I recently upgraed my Ipod Touch and much of my music was deleted. I managed to get most of it back but the ratings I had for my songs had been deleted. As I went through all of my songs on my Ipod, I realized that the rating I gave them, would not s

  • Onboard Sound Detection in Flash

    Hi all, i've taken a look at the computespectrum feature in flash, is there a method in flash that can enable detection from the input sound card itself? Anyone care to share their experience here on that - or sound visualizations made in flash. thx

  • Why does font change suddenly and become bold when replying to email

    I really could use some help here. When I reply to an email, no matter what font I am using, within a few lines it switches to a different font and goes bold. Why does this continue to happen? I tried going to Insert, selecting HTML and placing <styl

  • How do I transfer music and audiobooks from my iPad to my Mac?

    I want to free up space on my iPad. How do I transfer music to my Mac or pc?

  • VoIP phones in public rooms

    We have been tasked with deploying VoIP phones in our patient rooms at our hospital. So far we have only deployed them internally. We do use voice vlans for each floor that gets ip phones. We have a Session Border Controller in our DMZ for users that