TextLoc works once, then stops working

I have this simple code:

var doc is app. ActiveDoc;

var T1 = new TextLoc();

var firstPgf is doc. MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;

T1.obj = firstPgf;

doc. AddText (t1, "Hello");

When I ran the first time since the code ES Kit window, he printed "Hello" on the first line in the active document Fm. But when I ran the code again a moment later on the same doc, nothing happens. There is no visible error and it prints "result: [object TextLoc]" in the JavaScript console.

I can't run again. This happened a few days ago and I gave up. Then, later, I decided to try again and he did the same thing: "Hello" printed once in the doc of Fm, then he would not again. I tried to restart Fm and the Toolbox.

Any ideas what is the cause?

Thank you

Mark

Hi Mark, apparently there is a problem with the order of the commands. If you try this way, it seems to work:

var doc = app.ActiveDoc;

var firstPgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
var t1 = new TextLoc(firstPgf,0);

doc.AddText (t1, "Hello");

Rick

Tags: Adobe FrameMaker

Similar Questions

  • Edge animate only loop once then stops

    I have a file Animate Edge I want to loop continuously forever - and currently it will run once, loop once and then stop.

    I used the

    sym.getSymbol("FINAL_ANIMATION").play(0);

    code that normally would loop the animation (as I understand it - new edge animate)

    At the beginning I could not it to loop all independently of the code. But then I realized he wanted that one symbol of the loop and the animation was composed of several layers. I selected all and converted into one main 'FINAL_ANIMATION' symbol and he played very well and in fact but only a time loop

    Any thoughts? Never used edge animate before so far.

    Hello

    You must use: sym.playAll (0);

    Adobe Edge CC animated JavaScript API

    Note: You have no group symbols.

    Watch this demo file: playStopAll.zip - Box

  • jpg files visible, then stopped but works on Internet Explorer.

    The source code of the page has the jpg files but does not show, but it works on Internet Explore. On Firefox, I can still use the zip file to get the jpg files, but it is more convenient to see to see which ones I want. It worked, but then stopped. Here is the link for the page - http://www.wpanorama.com/panoramas.php
    Thank you.

    The preview is made via a Java applet.

    Your list of details more system does not display the Java plugin, you need to install it.

  • DVD stopped working got external dvd but no not disks work runs for a few seconds then stops

    has had to put the new hard drive in the computer. When I got back that DVD has worked for a while then stopped. Downloaded the software and drivers to try to fix the problem, but no luck. I tried an external but computer dvd for some reason any will not recognize the unit. I also have a legacy of clickfree backup, but now that my dvd works not the clickfree will not work. I have also reinstalled the dvd but that did not work. any ideas?

    Hello

    ·         What operating system do you use?

    Follow these methods and check if that helps.

    Method 1:

    Run this Microsoft fixit t tool and check if it helps.

     

    Your CD or DVD drive cannot read or write media

    http://support.Microsoft.com/mats/cd_dvd_drive_problems

    Method 2:

    I suggest you follow the troubleshooting steps form the article and check if it helps.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs

    http://support.Microsoft.com/kb/314060

  • After that switch on my PC works for a minute then stops, this happens 3 times then starts with the last good Configuration

    It started only four days ago, I spend on the PC runs for a minute then stops. This can happen in 3 or 4 times. can Ichoose last good known Configuration and running a CHKDSK and usually begins.

    Hello

    1. Since when are you facing this problem?
    2. Did you make any recent changes?

    I suggest you to follow these steps and check if that helps:

    Method 1:
    Start the computer in safe mode and check if the same problem occurs:
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/boot_failsafe.mspx?mfr=true

    Method 2:
    If the computer works fine in safe mode, then I suggest you perform the check and clean boot if this can help:
    http://support.Microsoft.com/kb/310353

    NOTE: When you are finished troubleshooting, make sure that you reset the computer in start mode normal such as suggested in step 7 of the above article.

    For more information, see this link:
    http://support.Microsoft.com/kb/320299

    It will be useful.

  • M535 Logitech Bluetooth Mouse works for a few minutes then stops working on

    I have a new mouse BT M535 and it works for a few moments then stops working.

    I use Windows 7 Professional Service Pack 1 with my Dell Precision M4800 Intel Core i7-4900MQ CPU @ 2.80 GHz, 16.0 GB of Ram, 64-bit Op

    Does anyone know how to fix this? Simply, it stops working and you must uninstall and then reinstall but does the same thing. We tend to Office I know sometimes things blocks as well. Any comments would be useful.

    Thank you in advance.

    Thanks for the reply. I was able to solve the problem by returning the BT of Logitec mouse and buy a mouse Microsoft 3600 BT. Works fine now.

  • Windows 7 Search does not work - only index several elements then stops

    Hi, my first post here.

    I am running windows 7 64 bit on my new PC with all the latest updates installed. I have problems with the windows search tool. The tool detects files but not others and indexing is incomplete. I've been to the dialogue "indexing options" and have rebuilt the index several times and I even changed the location but it indexes only several hundred articles (normally 250-350) then stops and it is. I have thousands of photos and music files and the search tool is not find an any of them, but interesting, that it seems to not find what seems like all my program files and folders, what any of the other locations, even though I checked all the places I want to be pegged as photos, music, videos, etc in the "indexing options" dialog box.

    My computer is a Dell and I had a problem with it a copuple weeks back and the operating system must be reinstalled and I wonder if this could have something to do with it. Other than this problem, everything is fine and I am very happy. I have the latest version of McAfee antivurus and did a complete analysis of the system and have no problem there either...

    I really like to get the search engine works again, at this point when I do a ctrl + F for find, he can't find anything or even appear to be working away or by train. If anyone can help me it would be much appreciated.

    Please let me know if you have any ideas that I really want to get this function to work.

    Kind regards

    Kelvin

    I found the answer. It's a problem of incompatibility with McAfee Security Suite 2010, factory installed by Dell.

    I've tried EVERYTHING! Nothing has worked, search forums etc and after all that I uninstalled McAfee now indexing and seraching is fantastic work.

    Thanks for your help, much appreciated.

  • Microsoft Bluetooth Notebook Mouse 5000 works for awhile then stops

    I used the troubleshooting, deleted and reinstalled the product several times. I'm getting frustrated b/c it will work for a few minutes then stop. And then it's back to uninstalling and reinstalling it.  What is going on?  Why it does not work?

    Hello

    1. do you receive any error messages?

    2. are you aware of changes to the computer before the show?

    You can connect the mouse to another computer and see if the problem still occurs.

    I also suggest you to consult the steps mentioned in the article and the Coachman.

    Troubleshoot the incidents of the response to the mouse or wireless keyboard

    http://support.Microsoft.com/kb/838398/en-us

    See also:

    Connect a Bluetooth device that are neither require a TRANSCEIVER

    http://support.Microsoft.com/kb/952818

    Hope this information helps.

  • My gradient does not work.  He worked on an image and then stopped on the next!  I have cs6.  It is just the display of the background gray and white checkerboard on the upper left corner.  I click on the arrow down to see if I can it go back to black and

    He worked on an image and then stopped on the next!  I have cs6.  It is just the display of the background gray and white checkerboard on the upper left corner.  I click on the arrow down to see if I can get it back to black and white and it will not change... it will not change if I click on any of them.  I think it might be a bug?  Any ideas will be appreciated.  I tried to reset them as well.  Thank you!!

    Check your Options bar.  You have the opacity set to 10%.  Easy to do.  Just hit the 1 key while the gradient tool is selected, and it's done. By pressing the 0 key will take you back to 100%

  • How do nested Movie Clip play once and then stop?

    Hi all

    I was looking for a simple solution to this issue for more than a year. I saw a few solutions

    that work, and lots of questions that remain unanswered questions.  So I thought that I get it from the pros.

    I have a nested clip (image sequence) I use the snippet of Flash CS5 GoToAndPlay.  The Clip

    loops continuously.  How to play once and stop.  I tried the snippet for the stop, I tried

    Stop(); in my layer "Actions".  I tried a stop(); in the last picture of my sequence nested.  I tried a stop to the

    end of the function, but nothing stops this 'thing'. He keeps going and going and going.  This is my typical of the code which

    loops...

    Stop();

    btn3.addEventListener (MouseEvent.CLICK, cd_ClickToGoToAndPlayFromFrame);

    function cd_ClickToGoToAndPlayFromFrame(event:MouseEvent):void

    {

    gotoAndPlay (1);

    }

    btn4.addEventListener (MouseEvent.CLICK, ef_ClickToGoToAndPlayFromFrame);

    function ef_ClickToGoToAndPlayFromFrame(event:MouseEvent):void

    {

    gotoAndPlay (10);

    }

    There are basically two (2) buttons on the page, and the back and the button forward and the sequence of images is nested in a

    video clip, in this case, to frame (1) and another nested video clip to frame (10).  How can I play once and stop

    on the last frame of the clip nested?

    Thank you

    Duane

    You are welcome.

    If my answer has worked for

    you, please indicate your question as answered.

  • Canvio Basic HDD - light flashes then stops

    Hey all.

    A few weeks ago I bought a disc hard extern canvio basics, it worked like a charm.
    Since yesterday it does really more, the LED flashes once or twice, then stops, whereas when I touch the case, in my view, that the drive is running. However, it does not appear.

    is there a way to fix this?

    Ed

    If the drive is not recognized HARD and does not work in different USB ports and computers, and then in most cases the HARD drive has developed a fault.
    In most cases you can't remedy...

    That's why I recommend that you connect the HARD drive to different USB ports and if possible to check the HARD drive as part of another computer...
    If it fails, well the HDD is not OK.

  • A few weeks go, my pc suddenly buzzed and then stop. Since then, after that it's over a short period, it will switch off itself. It could be the cause, or what should I do?

    A few weeks, my computer started buzzing and then stop. Later, I started again in safe mode. I started again with safe mode several times. Now I start it in normal mode, but it still turns off after a while, even if it sounds no more. What could be worng? What should I do? I have Norton antivirus and it does not say that he has a virus. Also, I've scanned with Microsoft and they say that it is virus-free. I am at a loss.

    He continue to work OK in safe mode, or it shuts down in safe mode as well?

    If it continues to operate in safe mode or if she stays working long enough in 'normal' mode, then try a clean boot and see it works OK under that.

    Once again, if it is still running in safe mode try things like check disc errorand check SFC/scannow , they can help.

    It is possible that the system hardware fails somehow, so it is advisable to back up your data IF you can maintain your PC long enough in Mode safe.

  • Error 711 The Secure Socket Tunneling Protocol Service service on Local computer started and then stopped. ." Unable to connect to the Internet

    Original title: I get error 711 when I try to connect to the internet via a UIM modem on my windows overpriced home 7 SP 1

    Did some research and tried manually from the phone, RACM, RACM auto and plug and play services but got error 1068.Tried to start the service SSTP to solve this problem but got the error "the Service of Protocol Secure Socket Tunneling courier on Local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs. »

    I am so desperate and would appreciate helpful suggestions.

    Hello

    1. When was the last time it worked?

    2 did you a recent software or changes to the material on the computer?

    Method 1:

    I suggest you to go through the steps mentioned in the link and the Coachman.

    Windows wireless and wired network connection problems

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    If the steps is not enough, go to method 2.

    Method 2:

    Ensure that all dependencies of Service Remote Access Connection Manager components are started and set to automatic

    (a) (a) cliquer click on start-run, type services.msc, the, click OK.

    (b) ensure that the following services are started on and set to automatic.

    (c) make sure that the "Startup Type" says "automatic"and has begun.» If it isn't, use the drop down menu to change (under the general tab).

    (d) if she once said: "Automatic", then click on the "Recovery" tab in the upper part and replace the line "First failure" "Restart the Service", then click on ""apply ', then OK. "

    See also:

    Why can't I connect to the Internet?

    http://Windows.Microsoft.com/en-us/Windows7/why-can-t-I-connect-to-the-Internet

    Hope this helps and keep us posted.

  • How to print a pdf file that prints partially then stops?

    I tried to print a pdf file, but my printer starts to print then stops after he printed an inch or two high, then said the paper is blocked, but it didn't.

    All the drivers are up to date. Any ideas please?

    Hi peterd47331988,

    Please share exact workflow that you do to print PDFS.

    Sharing also the screenshot of the error message you get.

    Is - this problem occurs with all the PDF files?

    Try once the troubleshooting steps I provided this KB doc: print troubleshooting PDF in Acrobat and Reader

    Let us know if it works

    Kind regards

    Meenakshi

  • The Apple Mobile Device Service service on Local computer started and then stopped.

    My iDevice doesn't connect to iTunes, I think its a result of the apple mobile device service. The restart option doesn't come up, it just says  "start the service" and when I click that an error comes up which says "The Apple Mobile Device Service service on Local Computer started and then stopped. Some services stop automatically if not in use by other services or programs". (I've already got a post with this information on I just wanted to make it more clear)

    If your iOS device does not appear in iTunes, try the following:

    1. Open Control Panel > Device Manager
    2. Plug in your device
    3. Locate Bus USB Controllers > Apple Mobile Device USB Driver.
      It is also possible that the device may appear under imaging devices, portable devices or other devices or as a device USB of MTB.
    4. Right-click and select software update of the driver...
    5. Click Browse my computer for driver software
    6. Go to C:\Program Files\Common Apple Mobile Device Support\Drivers or
      C:\Program Files (x 86) \Common Files\Apple\Mobile Device Support\Drivers
    7. Click on let me pick from a list of drivers for devices on my computer
    8. Click on Apple Mobile Device USB Driver
    9. Click Next, then close and exit the Device Manager

    To step 3 above, open the Device Manager. Expand one of the articles that are listed.

    • USB Bus controllers
    • Imaging devices
    • Portable devices
    • Other devices

    Plug in the appliance. You should hear the telltale Windows sound device connection and a Division must acquire a new entry. This should be your device. It cannot be labelled properly at this point. If you do not hear a suspicious noise cable damaged.

    Or try If iTunes does not your iPad, iPhone or iPod - Apple Support

    If not try a complete tear down and rebuild iTunes in accordance with the resolution of the problems with iTunes for Windows updates.

    Or try to go back to the last version of iTunes that has worked for you. See the programs installation of iTunes to download links. If you roll back to 12.3.3.17 to 12.3.2.35, for example, then you will also need restore the database in the manner described in the empty/corrupted after upgrade/crash iTunes library. The tip makes suggestions to reintroduce recent purchases, so at worst, you lose a few meters or a newly created playlist.

    TT2

Maybe you are looking for