$.write() and $.writeln() both write line-end character to console?

This may seem like a small thing, but I'm finding it really annoying.
Using the ExtendScript Toolkit in CS4 InDesign on Mac OS X 10.4 (Tiger) to write messages to the JavaScript console, I find that both $.write() and $.writeln() will write a line-end after the string passed in. This seems to be broken re. the docs (page 213 of "JavaScript Tools Guide CS4", available from the Help menu, which describes both calls and only mentions linefeeds for the latter).
Are other people seeing this behavior? Is there a way to fix it, perhaps some property or preference on the JavaScript editor/debugger?
Thanks for any help you can offer.
Steve Caine

I can certainly reproduce it easily enough. This:
$.write("This");
$.write(" is");
$.write(" a");
$.write(" test.");
produced:
This
is
a
test.
The only workaround (it seems to me) is to build the string in the script and then post it all at once. I confess that I hadn't even realized there was a $.write() function although it ought not to take a rocket scientist to realize that there is.
msg= "";
array = ["This", " is", " a", " test."]
for (var j = 0; array.length > j; j++) {
msg += array[j];
$.writeln(msg);
Dave

Similar Messages

  • I would like to ask if is possible to predict a future version of iOS can have the possibility to choose the color with which to write and be able to choose the character also...

    I would like to ask if is possible to predict a future version of iOS can have the possibility to choose the color with which to write and be able to choose the character also...

    Nobody here would have a crystal ball and know what Apple plans on doing in the furture.
    If you feel this feature is so important, you can let Apple know:
    www.apple.com/feedback

  • Comp. new email, and I put in a end of sentance char. then start a new sentance on the same line the font changes/gets smaller than my normal Helvetica, Arial.

    When composing an email and I end a sentence with any sentence ending character like . ! ? etc. and then start a new sentence on the same line with a space or 2 after the . ! ? etc. ( no carriage return ) the font changes to a smaller font than the one I have set. My set font is Helvetica, Arial . This happens almost all the time, if I backspace to the end of the sentence, and then put in the . ! ? etc. and start the new sentence, sometimes it works ok and the font does not change.

    When composing an email and I end a sentence with any sentence ending character like . ! ? etc. and then start a new sentence on the same line with a space or 2 after the . ! ? etc. ( no carriage return ) the font changes to a smaller font than the one I have set. My set font is Helvetica, Arial . This happens almost all the time, if I backspace to the end of the sentence, and then put in the . ! ? etc. and start the new sentence, sometimes it works ok and the font does not change.

  • Both email and browser go off line

    both email and Safari internet browser go off line, Restarting iMac restores connection but after awhile they go off line again. I checked with Verizon Fios and a they checked there end and found no problem.

    Are you connecting via wifi? If so, there have been many threads with connectivity issues (wifi dropping out) since 10.7 Lion was launched. The 10.7.3 updated claimed to fix wifi issues but it seems people are still having problems. Unfortunately there still doesn't seem to be one single solution. There is a link here to a fix that has helped some but, unfortunately, not everyone:
    http://osxdaily.com/2011/11/06/lion-wi-fi-problems-solution-mac/?utm_source=feed burner&utm_medium=feed&utm_campaign=Feed%3A+osxdaily+%28OS+X+Daily%29&utm_conten t=FaceBook
    The article talks about 10.7.2 but I guess it's still valid for 10.7.3.

  • My iphone 4S only start whit cable plug in and then show battery very low (with red line end) then try to turn on but show searching in operator name command and not connecting and no work properly and when I plug out it turn off!!! what should I do?

    My iphone 4S only start whit cable plug in and then show battery very low (with red line end) then try to turn on but show searching in operator name command and not connecting and no work properly and when I plug out it turn off!!! what should I do?

    I'm afraid you'll have to get the phone serviced, dropping the phone must have damaged additional parts inside the phone.
    But Apple will not service the phone anymore, opening the phone and replacing the battery should only be done by authorized personal, not by users.
    You'll have to look for a 3rd party repair shop and see if they can fix this, sorry.

  • HELP, PLEASE.. I'm looking for a App that I can install on both my iPad and iPhone, then when I load a document, picture, or anything on that app on iPhone or iPad, it will Sync with the other Device so both devices will end up with the same file .

    HELP, PLEASE.. I'm looking for a App that I can install on both my iPad and iPhone, then when I load a document, picture, or anything on that app on iPhone or iPad, it will Sync with the other Device so both devices will end up with the same file ...

    iCloud Drive: https://www.apple.com/icloud/icloud-drive/
    Dropbox: https://itunes.apple.com/us/app/dropbox/id327630330?mt=8
    OneDrive: https://itunes.apple.com/us/app/onedrive-for-ios/id477537958?mt=8

  • Using both at line-selection and at user-command

    hellow friends ,
    to use both  at line-selection and at user-command in the same report.

    Hello,
    U can do it like this.
    AT LINE-SELECTION.
      PERFORM at_line_selection.
    AT USER-COMMAND.
      PERFORM at_user_command.
    FORM AT_LINE_SELECTION.
      DATA: LV_CURSOR_FIELD(30).
      DATA: LV_MATNR TYPE MATNR.
      CLEAR H_UCOMM.
      GET CURSOR FIELD LV_CURSOR_FIELD.
      CASE LV_CURSOR_FIELD.
        WHEN 'PSPNR'.
          PERFORM LAGER_AN_PSP USING WA_MATNR-M1-RSNUM
                                     WA_MATNR-M1-RSPOS.
        WHEN 'PSPNR2'.
          H_UCOMM = 'PSPNR2'.
          IF NOT PSPNR2 IS INITIAL AND IT_VKBEL-VBELN CN '0123456789'.
            PERFORM LAGER_AN_PSP_VKBEL USING IT_VKBEL
                                             0
                                             PSPNR2
                                             H_MAKTX
                                             ' '.     "keine Blindbuchung
          ENDIF.
    ENDCASE.
    CASE SY-UCOMM.
        WHEN 'BACK_NEW'.
          PERFORM NEU_START USING 'X'.
        WHEN 'EXIT'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CANC'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CHECK'.
          PERFORM NEU_START USING SPACE.
    ENDCASE.
    Vasanth

  • Hi my wife and i both have seperate itunes accounts but on the same laptop and we always lag into our own but somehow always end up with the others stuff as well . Could anyone help me . Its quite annoying and were not very technically minded lol thanks j

    Hi my wife and i both have seperate itunes accounnts and always make sure we log into our own but always. Seem to end up woth the others stuff as well which is quite annoying . Were not very technically minded so would appreciate a bit of help lol thanks jim

    Hi Jjjames,
    Thanks for posting. I'm really sorryo for the problems you've had. I can look into this for you if you wish. Drop me an email with your account details and a link to this post for reference and we'll take it from there. You'll find the address in my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • How to display polygons both with line contour and filled interior?

    How to display polygons both with line contour and filled interior?
    Java3D 1.3, Java 1.4.1-rc

    Hi,
    I just started with Java3D last week.
    I assume you mean drawing polygons with outlines (wireframe) in one color and polygon face filling with another color. If so, I've got the same question! (I usually think of "contour" to refers to plotting surface intensity of independent data like temperature or elevation, but I don't think you mean this.)
    The only solution I've found so far is to make two shapes with the same geometry.
    Here's an example - an outlined and filled cube. I made it using a generalize class DualShape which is two shapes with the same geometry, but one filled and one as a line.
    It works, although I can't say I understand the setPolygonOffset(), knowing what value to set. Without the command, the depthbuffer can't consistently decide which should be in front between the fills and lines so it looks bad.
    I certainly think it would be nicer to do both internally, like:
    pa.setPolygonMode(pa.POLYGON_LINE || pa.POLYGON_FILL);
    And then have setFillColor and setLineColor for each.
    I don't know why they don't allow this - maybe OpenGL can't do it like this so Java3D follows.
    If anyone has any better ideas I'd like to hear about it.
    Tom Ruen
    class DualCube extends DualShape // cube with outline and fill colors
    public DualCube(float ax, float ay, float az, //cube lower corner
    float bx, float by, float bz, //cube upper corner
    float br, float bg, float bb, //border color
    float fr, float fg, float fb) //fill color
    setGeometry(new CubeGeometry(ax,ay,az,bx,by,bz),br,bg,bb,fr,fg,fb);
    class DualShape extends BranchGroup //general shape with outline and fill colors
    Appearance ap1,ap2;
    PolygonAttributes pa1,pa2;
    ColoringAttributes ca1,ca2;
    Shape3D s1,s2;
    public void setGeometry(Geometry geo, float br, float bg, float bb, float fr, float fg, float fb)
    //filled shape:
    addChild(s1=new Shape3D(geo, ap1=new Appearance()));
    ap1.setPolygonAttributes(pa1=new PolygonAttributes()); pa1.setPolygonMode(pa1.POLYGON_FILL);
    ap1.setColoringAttributes(ca1=new ColoringAttributes()); ca1.setColor(fr,fg,fb);
    //lined (wire) shape:
    addChild(s2=new Shape3D(geo, ap2=new Appearance()));
    ap2.setPolygonAttributes(pa2=new PolygonAttributes()); pa2.setPolygonMode(pa2.POLYGON_LINE);
    ap2.setColoringAttributes(ca2=new ColoringAttributes()); ca2.setColor(br,bg,bb);
    pa2.setPolygonOffset(-1000); //Uncertain what "float" value to use!
    class CubeGeometry extends IndexedQuadArray //cube geometry data
    private static final int[] faces =
    0,3,2,1,
    0,1,5,4,
    1,2,6,5,
    2,3,7,6,
    3,0,4,7,
    4,5,6,7
    private static float[] verts = new float[24];
    public CubeGeometry(float ax, float ay, float az, //lower limit
    float bx, float by, float bz) //upper limit
    super(8, IndexedQuadArray.COORDINATES , 24);
    int n;
    n=0; verts[n]=ax; verts[n+1]=ay; verts[n+2]=az;
    n=3; verts[n]=bx; verts[n+1]=ay; verts[n+2]=az;
    n=6; verts[n]=bx; verts[n+1]=by; verts[n+2]=az;
    n=9; verts[n]=ax; verts[n+1]=by; verts[n+2]=az;
    n=12; verts[n]=ax; verts[n+1]=ay; verts[n+2]=bz;
    n=15; verts[n]=bx; verts[n+1]=ay; verts[n+2]=bz;
    n=18; verts[n]=bx; verts[n+1]=by; verts[n+2]=bz;
    n=21; verts[n]=ax; verts[n+1]=by; verts[n+2]=bz;
    setCoordinates(0, verts);
    setCoordinateIndices(0, faces);

  • [svn:fx-4.x] 14731: change the line ending to LF so this script will run properly on Mac and Unix .

    Revision: 14731
    Revision: 14731
    Author:   [email protected]
    Date:     2010-03-12 11:06:04 -0800 (Fri, 12 Mar 2010)
    Log Message:
    change the line ending to LF so this script will run properly on Mac and Unix.  Some testsuites were breaking because this script was not executing properly on mac
    QE notes: fix for testsuites
    Doc notes: no
    Bugs: no
    Reviewer: no
    Tests run: no
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/branches/4.x/bin/fontswf

    On reflection, it seems much easier/safer to do something like this instead...
    When running in Arch, but viewing a partition with another installation's data on it, do directory listings like this:
    ls -l | FILTER
    where FILTER is a script that pulls out the Arch-announced users and groups, converts them to numeric if necessary (according to Arch's understanding), and then stuffs back in what the other installation thinks are the symbols corresponding to those numbers. This was easy enough to do, and doesn't risk breaking anything.
    Marking as SOLVED, but I'd still welcome feedback about the different ways different distributions understand the groups I cited. It's very hard to track this info down.

  • Audio line in and mic both recording

    Hi, both the line in and the built in mic are recording at the same time , it doesnt look so in system prefs > sound > line in ( I have built in line in selected) as when I make a sound the level meter does not move , however when I start recording in iMovie 09 ambient sounds from the area are captured as well as the sound from the line in.
    please help.
    I need to get some projects done this weekend and I just can't with the macbook working like this.
    hoping it's something simple I've missed .
    kindest
    becca

    Hi Lyssa,
    I use a professional dj mixer which is fine for going directly in usually, if I used a specific sound card (I use MOTU cards for desktop/studio work) I'd have a better quality audio sound but I just don't need that quality for mobile demo work which is why I need the input on the book to work with the iSight/iMovie without recording from the internal mic at the same time...
    Something is broken somewhere IMHO
    The thing is I have to rely on the mixer going directly in at the moment for mobile work, it works fine on other notebooks, looks like a call to Applecare is in the offing....
    I guess I may as well, there are a few other problems with this Macbook...like it's started cracking already and I've only had it two months, the graphics unfortunately look to have an issue also as when I scroll text is flashing/scatty etc.
    looks like I've got me a lemon.
    ah well..I'll have a look at the new 13" MBP me thinks... it should be more solid?..but then again it's aluminium...sorry I digress
    kindest,
    becca

  • HT5622 my wife and I have separate apple ID acts so that we could register our iPhones and iPads under our own names.  Can I have my iMac synch iCloud with both apple ID's so that both our calendars end up on our iMac?

    my wife and I have separate apple ID acts so that we could register our iPhones and iPads under our own names.  Can I have my iMac synch iCloud with both apple ID's so that both our calendars end up on our iMac?

    If have separate iCloud accounts and want to keep your all your iCloud data separate, you can create separate user accounts for each of you, then sign into your individual iCloud account within your user account.
    If you want to just add both iCloud calendars on your Mac, you can sign into one iCloud account in System Preferences>iCloud, then add the second account in System Preferences>Internet Accounts>iCloud and only check Calendars with this second account.

  • Utl_file.putline  - platform specific line termination character

    PUT_LINE terminates the line with the platform-specific line terminator character or characters.
    But the porblem is this.
    The file generator application can run in different platform,and hence it means I can have different line termination character.Is there anyway I can force it to generate Unix only line termination character (line termination char in Unix I guess is \n) .
    In short programatically I want to control it.
    I looked at UTL_FILE.PUTLINE but it doesnt have any option to control the line termination char.
    Help.

    here is the example, i am on HP UNIX
    SQL> DECLARE
      2     l_text   VARCHAR2 (32767);
      3     v_file   UTL_FILE.FILE_TYPE;
      4  BEGIN
      5   -- OPEN FILE to write
      6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
      7                        filename          => 'Test.txt',
      8                        open_mode         => 'w',
      9                        max_linesize      => 32767
    10                       );
    11     UTL_FILE.PUT(v_file,'Hello' || CHR(10));
    12 
    13     UTL_FILE.PUT(v_file,'how are you' || CHR(10));
    14 
    15     UTL_FILE.PUT(v_file,'I am fine' || CHR(10));
    16     UTL_FILE.FCLOSE (v_file);
    17    ---- open file to read
    18    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
    19                        filename          => 'Test.txt',
    20                        open_mode         => 'r'
    21                       
    22                       );
    23     BEGIN
    24        LOOP
    25           UTL_FILE.GET_LINE (v_file, l_text, 32767);
    26           DBMS_OUTPUT.PUT_LINE (l_text);
    27        END LOOP;
    28     EXCEPTION
    29        WHEN NO_DATA_FOUND
    30        THEN
    31           NULL;
    32     END;
    33      -- READ LAST LINE
    34    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
    35     UTL_FILE.FCLOSE (v_file);
    36  EXCEPTION
    37     WHEN OTHERS
    38     THEN
    39        UTL_FILE.FCLOSE (v_file);
    40  END;
    41  /
    Hello
    how are you
    I am fine
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2     l_text   VARCHAR2 (32767);
      3     v_file   UTL_FILE.FILE_TYPE;
      4  BEGIN
      5   -- OPEN FILE to write
      6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
      7                        filename          => 'Test.txt',
      8                        open_mode         => 'w',
      9                        max_linesize      => 32767
    10                       );
    11     UTL_FILE.PUT(v_file,'Hello');
    12     UTL_FILE.PUT(v_file,'how are you' );
    13     UTL_FILE.PUT(v_file,'I am fine' );
    14     UTL_FILE.FCLOSE (v_file);
    15    ---- open file to read
    16    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
    17                        filename          => 'Test.txt',
    18                        open_mode         => 'r'
    19                       );
    20     BEGIN
    21        LOOP
    22           UTL_FILE.GET_LINE (v_file, l_text, 32767);
    23           DBMS_OUTPUT.PUT_LINE (l_text);
    24        END LOOP;
    25     EXCEPTION
    26        WHEN NO_DATA_FOUND
    27        THEN
    28           NULL;
    29     END;
    30      -- READ LAST LINE
    31    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
    32     UTL_FILE.FCLOSE (v_file);
    33  EXCEPTION
    34     WHEN OTHERS
    35     THEN
    36        UTL_FILE.FCLOSE (v_file);
    37* END;
    38  /
    Hellohow are youI am fine
    PL/SQL procedure successfully completed.

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • About DAQ task and writing to a line

    Hi all,
      I swtich from Labview to Labwindows and switch from traditional DAQ to DAQmx. I have two questions about using the DAQmx. Based on the example from NI, I write a function for a single sample output to a single digitial line
    void WriteLine(int zero_or_one, char line_name[])
    int error=0;
    TaskHandle taskID=0;
    char errBuff[256];
    DAQmxErrChk(DAQmxCreateTask("", &taskID));
    DAQmxErrChk(DAQmxCreateDOChan(taskID, line_name, "", DAQmx_Val_ChanPerLine ));
    DAQmxErrChk(DAQmxStartTask(taskID));
    DAQmxErrChk(DAQmxWriteDigitalLines(taskID, 1, 1, 10.0, DAQmx_Val_GroupByChannel, &zero_or_one, NULL, NULL));
    Error:
    if (DAQmxFailed(error)) DAQmxGetExtendedErrorInfo(errBuff, 2048);
    if (taskID!=0)
    DAQmxStopTask(taskID);
    DAQmxClearTask(taskID);
     I am calling this function to a single digital channel. For example, WriteLine(0, "Dev1/port0/line0");. I wonder if above code really writing to a single line or a port (8 lines). I have 4 cables connecting 4 digital lines of one port to 4 external device (so to control the on/off of the device). I use the above code to control one line but don't know why seems sometimes there are something output to other three lines.
    The second question is: now every time I write to a line, I call above code, so it will create the task each time even I just write one bit to one line. In my code, write to the lines pretty often, so how much it cost to create task every time before I write to a channel? Should I create one task for each channel upon the initialization of the program and clear them when the code closed? I just wonder how labview do that? In labview, will it create the task on each writing?

    RobertoBozzolo wrote:
    Creating and destroying a task is a relatively time consuming activity, so if you need to write to the digital lines very frequently it is advisable that you create the task at program start and destroy it at the end, leaving only the start/stop inside the write function.
    As of my knowledge, LabVIEW can be structured in a similar way if you use low level functions, while it creates and destroys the task if you use a DAQ assistant (there is a note on this in the help).
    With reference to your last question, you could have a single task for analog generation and simply set the appropriate rate with calling DAQmxCfgSampClkTiming before starting the task.
    Thanks RobertoBozzolo. I am still in confusion regarding the analog output in DAQmx. I have an array of samples (totally 512 samples), I need to send to a specifc analog channel (A0) such that each sample will be sent at the interval 1millisecond. From your link, I use DAQmxCfgSampClkTiming
    int error=0;
    TaskHandle taskid;
    double samples[512];
    // initialize samples here
    DAQmxCreateTask("mytask", &taskid);
    DAQmxCreateAOVoltageChan(taskid, "Dev2/ao0","",-10,10,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(taskid, NULL, 1000, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 512); // sample rate is 1000, so 1sample/ms, 512 samples in total
    DAQmxWriteAnalogF64(taskid, 512,0, 10, DAQmx_Val_GroupByChannel, samples, NULL, NULL);
    // I don't start the task automatically
    // some other time-consuming code here
    // after other code running, I start it manually
    DAQmxStartTask(taskid);
    DAQmxWaitUntilTaskDone(taskid, 10.0);
    DAQmxStopTask(taskid);
     I wonder if this code looks right? There are 512 samples to send, so I set the numSampsPerChan in DAQmxWriteAnalogF64 to 512, is that correct? 
    The same channel will be used for other output also. So after the above task done, if I want to send one sample instead of 512 to the same channel, does the following code work?
    double one_sample_value = 0.2;
    DAQmxStartTask(taskid);
    DAQmxWriteAnalogScalarF64(taskid, 1, 10.0, one_sample_value,NULL);
    DAQmxStopTask(taskid);
     What I am asking is do I have to reset the timing since it was set for outputing multiple sample at some rate before but now I only have to send one sample immediately, so does the time or update rate matter?
    I am porting a big system which written in Labview 8 to CVI but there are so many code needed to be changed, I don't even know how to tell if the DAQ do the same thing or not. So I separate it as above code for testing.

Maybe you are looking for

  • How to set a default value of " " for a VARCHAR2 in ER diagram?

    Hi, I am trying to set the default value of a VARCHAR2 attribute to " " (space) in an ER diagram. But it just thinks I don't want anything for the default value. If I specify CHR(32) will it work? or is there another way? Will I have to wait until I

  • How can I Read lines of data from a file starting at the end of the file??

    Can anyone help me with how to read lines of data starting from the end of a file instead of the beginning?? I do not want to load the entire file into memory as the files are very rather large. Instead I want to start at the end of the file and read

  • Migration Asssitant w/Disk Image - Fails with a network error?

    I'm currently trying to restore an iMac G4 with a disk image that was made before its hard drive was replaced. I've mounted the drive and it successfully copies over the user folders, but when it comes to copying the Library and Applications folders

  • DPM 2012 Replace secondary server

    DPM 2012R2 UR 3 I had a secondary server die, and am trying to re-setup thee secondary server and am running into problems I am attempting to backup my 2 primary DPM servers (DPM1 and DPM2) with a 3rd DPM server (DPM3). I run in to 2 issues. Through

  • IPhone Case With Wrist Strap?

    Now that the iPhone 4 is a serious HD camcorder, and a much better stills camera, the need for a wrist strap is even greater. Products like the Flip Mino come with an integrated wrist strap hook, a little hole in the side of the device that allows yo