Is TextArea - possible to get the number of lines?

I was wondering if there is a way to know how many lines of text one textarea. And also, if it would be possible to watch a number of lines changes. I'm developing a component that displays a single line in a first time and then starts to develop according to the needs, as the number of written lines increases.
Let me know if it is not sufficiently clear.

Thanks in advance.

Hello
Maybe what I am going to offer you is not the answer to your question. : P, but I have the same requirement, and I got the following. :)

I wrapped in TextArea with a StackPane, and before you add the text box in the StackPane, I added a label whose wrapText is true and related property prefWidth and text with TextArea, as below.

this.label =new Label();
this.label.setWrapText(true);
this.label.prefWidthProperty().bind(this.textArea.widthProperty());
this.label.textProperty().bind(this.textArea.textProperty());

That's all! It worked for me ;)

Here's the complete code for this new custom ;) control

ScrollFreeTextArea textArea= new ScrollFreeTextArea();

And the complete class:

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.GroupBuilder;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.StackPaneBuilder;

public class ScrollFreeTextArea extends StackPane{

     private Label label;
     private StackPane lblContainer ;
     private TextArea textArea;

     private Character NEW_LINE_CHAR = new Character((char)10);
     private final double NEW_LINE_HEIGHT = 18D;
     private final double TOP_PADDING = 3D;
     private final double BOTTOM_PADDING = 6D;

     public ScrollFreeTextArea(){
          super();
          configure();
     }

     public ScrollFreeTextArea(String text){
          super();
          configure();
          textArea.setText(text);
     }

     private void configure(){
          setAlignment(Pos.TOP_LEFT);

          this.textArea =new TextArea();
          this.textArea.setWrapText(true);
          this.textArea.getStyleClass().add("scroll-free-text-area");

          this.label =new Label();
          this.label.setWrapText(true);
          this.label.prefWidthProperty().bind(this.textArea.widthProperty());
          this.label.textProperty().bind(this.textArea.textProperty());

          this.lblContainer = StackPaneBuilder.create()
                                                    .alignment(Pos.TOP_LEFT)
                                                    .padding(new Insets(4,7,7,7))
                                                    .children(label)
                                                    .build();
          // Binding the container width to the TextArea width.
          lblContainer.maxWidthProperty().bind(textArea.widthProperty());

          textArea.textProperty().addListener(new ChangeListener() {
               @Override
               public void changed(ObservableValue paramObservableValue,     String paramT1, String value) {
                    layoutForNewLine(textArea.getText());
               }
          });

          label.heightProperty().addListener(new ChangeListener() {
               @Override
               public void changed(ObservableValue paramObservableValue,     Number paramT1, Number paramT2) {
                    layoutForNewLine(textArea.getText());
               }
          });

          getChildren().addAll(GroupBuilder.create().children(lblContainer).build(),textArea);
     }

     private void layoutForNewLine(String text){
          if(text!=null && text.length()>0 &&
                         ((Character)text.charAt(text.length()-1)).equals(NEW_LINE_CHAR)){
               textArea.setPrefHeight(label.getHeight() + NEW_LINE_HEIGHT + TOP_PADDING + BOTTOM_PADDING);
               textArea.setMinHeight(label.getHeight() + NEW_LINE_HEIGHT + TOP_PADDING + BOTTOM_PADDING);
          }else{
               textArea.setPrefHeight(label.getHeight() + TOP_PADDING + BOTTOM_PADDING);
               textArea.setMinHeight(label.getHeight() + TOP_PADDING + BOTTOM_PADDING);
          }
     }

}

I hope that you have the basic thing I'm doing here. I hope this can help you.

Happy coding :)

Kind regards
SAI Pradeep Dandem.

Tags: Java

Similar Questions

  • Is it possible to get the number of execution of workflow on a cluster of servers Orchestrator / via REST?

    Is it possible to get the number of running workflows on a cluster of servers Orchestrator / through REST? Ideally without checking the status of all executions for each workflow.

    We lack 5.5.2 but would be interested to know if this is a feature available in more recent versions also.

    Hello

    Endpoint following REST will return all executions whose state is "ongoing". In the returned body, the top-level element has an attribute 'total' with the number of items returned.

    https://vcohost:8281 / vco/api/catalog/system/WorkflowExecution? conditions = State = running

  • Is it possible to change the number of lines to display in the query of the adf?

    Hello

    is it possible to change the number of lines that appear in a query of the adf that is similar to a form of the adf?

    I need about 5 lines per column rather than display all the fields in a single column to display? Thank you.

    Hello

    What do you mean that it didn't work? Attributes of how you have in the Panel of the query? Maybe you have fewer number than the combination or lines and the properties of the argument maxColumns attributes.

    Try again with

    and see if you are able to get everything under a single column. If you get, play with these two properties to get the desired result.

    Arun-

  • Get the number of lines to different tables on the same line

    How can I get the number of lines for the different tables in a single line:

    SELECT count (A), count (B), count (C) table tb_a A, tb_b B, tb_c C;

    Thank you!

    Maybe if you want a little sophisticated look ;)

    select *
      from (select 'a' tbl_name,count(*) cnt
              from table_a
            union all
            select 'b' tbl_name,count(*) cnt
              from table_b
            union all
            select 'c' tbl_name,count(*) cnt
              from table_c
           )
     pivot (max(cnt) kount for tbl_name in ('a' as tbl_a,'b' as tbl_b,'c' as tbl_c))
    

    Concerning

    Etbin

  • How to get the number of lines in a region of report

    Hi all

    Is there a way to get the number of rows returned in a report region, without issuing an another 'select count (*) from une_table?
    I mean something like the substitution string #ROW_NUM # but for the total of the lines.

    Thank you

    Pedro.

    http://download.Oracle.com/docs/CD/E17556_01/doc/user.40/e15517/UI.htm#CHDDGGEG

    For parts of classic report, the footer region supports the following substitution strings:

    #ROWS_FETCHED # indicates the number of lines read by the reporting engine Oracle Application Express (the size of the page). You can use these substitution strings to display messages to the user. For example:

    Read #ROWS_FETCHED # #TIMING # seconds lines.

    * #TOTAL_ROWS # displays the total number of rows that satisfy an SQL query used for a report.

    #FIRST_ROW_FETCHED # and #LAST_ROW_FETCHED # show the range of displayed lines. For example:

    Until #FIRST_ROW_FETCHED # by #LAST_ROW_FETCHED # of #ROWS_FETCHED # displayed >

    Van
    Trent

  • Get the number of lines per column State, dependant on the choice, even if 0 table?

    Hi guys, am hoping someone can help with this query.

    I have 2 tables

    Search
    ----------
    code VC2 (10)
    Description VC2 (50)
    domain VC2 (50)

    MyTab
    ----------
    hour date
    VC2 status (10)

    The data should be like this:

    Search
    ----------
    B, buy, Transaction
    S, sale, Transaction
    R, back, Transaction
    O, old, to Condition
    N, new, Condition

    MyTab
    ---------
    JANUARY 1, 2008, B
    JANUARY 1, 2008, B
    JANUARY 1, 2008, B
    JANUARY 1, 2008, S
    JANUARY 1, 2008, S
    JANUARY 1, 2008, R
    JANUARY 2, 2008, B
    JANUARY 2, 2008, B
    JANUARY 2, 2008, R
    JANUARY 3, 2008, B
    JANUARY 3, 2008, S

    What I want to do, is go back a number of lines for each date in mytab, for each possible transaction situation, even if it's 0.

    If the query returns

    hour, status, County
    ----------------------------------
    JANUARY 1, 2008, B, 3
    JANUARY 1, 2008, S, 2
    JANUARY 1, 2008, R, 1

    JANUARY 2, 2008, B, 2
    JANUARY 2, 2008, S, 0
    JANUARY 2, 2008, R, 1

    JANUARY 3, 2008, B, 1
    JANUARY 3, 2008, S, 1
    JANUARY 3, 2008, R, 0

    So because there are 3 rows of transaction status in the lookup table, you always get 3 rows returned BY DATE in the table mytab.

    Is it possible without using loads of trade unions?

    Thank you!

    Scott

    Published by: Scott Hillier on November 5, 2008 15:24

    Nicolas-

    I don't think that you need a self-join.

    (my apologies for the bad formatting, cannot understand the syntax of the citation!)

    with
    list of choices like
    (select code 'B', 'Buy' descr, area of "Transaction" of union double all the)
    Select' code, descr 'Sell', 'Transaction' of all field double union
    Select code 'R', 'Return' descr, area of 'Deal' of all the double union
    Select ' o ' code, descr 'Old', 'Condition' field of dual union all
    Select "n" code, descr 'New', 'Condition' field of the double),
    MyTab as
    (select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union)
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, the from ' Union status double all the
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, the from ' Union status double all the
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") hour, status of 'R' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") hour, status of 'R' of all the double union
    Select to_date (January 3, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 3, 2008 "," MON-DD-YYYY "") transdate, the from ' double status)
    Select trunc (a.transdate), c.code, count (decode(a.status,c.code,1))
    mytab a.,
    Search c
    where c.domain (+) = "Transaction".
    Trunc Group (a.transdate), c.code
    order of trunc (a.transdate);

    TRUNC (A.TRANSDATE) CODE COUNT (DECODE(A.STATUS,C.CODE,1))
    ------------------------- ---- --------------------------------
    1 JANUARY 08 B 3
    1 JANUARY 08 R 1
    1 JANUARY 08 S 2
    JANUARY 2 08 B 2
    JANUARY 2 08 S 0
    JANUARY 2 08 R 1
    JANUARY 3 08 B 1
    JANUARY 3 08 R 0
    JANUARY 3 08 S 1

    9 selected lines

  • How to get the number of line of a multi-line string

    It seems that this Panel of string does not provide the tool to get the chain line number,

    Does anyone have the same experience?

    so...

    How to get the line number of a variable string?

    Number of lines

  • How to get the number of lines of an af:table

    Hello

    I use JDeveloper 11.1.2.4.

    I have a table (t1) that is contained in a panelCollection. On the toolbar of this collection of Panel section, I placed an output text to display the number of rows in the table. I use below EL from there to achieve.

    < af:outputText value = "#{bindings." RtnVwOddShoesVO1Iterator.estimatedRowCount}"id ="ot11.

    partialTriggers = "t1" / >

    his shows the number of rows in the table when initially rendering. However, when none of the lines changes based on a condition, it is not be updated.

    Please can you advise if Miss me something?

    Thank you

    Bind the outputText property of bean of support, I say the pair of methods getOt11 () / setOt11 ().

    Then you can say:

    AdfFacesContext.getCurrentInstance () .addPartialTarget (getOt11 ());

    If it works, can you say thanks @Timo ;-)

  • Function to find the number of lines to display by the foreach loop?

    Hi all

    Is it possible to find the number of lines to display per the foreach loop in the rtf model?
    We need to get the number of rows without using the count() in the xml file.
    We do some calculations based on the count in the rtf model.

    Thanks in advance

    Paste your file xml here, patients show us how count.

    You can count the number of lines.

    use

  • Is it still possible to get the 64-bit Windows Vista support?

    Hello!

    Well, I have a copy to authentic detail, under license of Windows Vista Edition Home Premium. He put 32 bit media. But at the time when Vista comes out, I could order the 64-bit Vista Home Premium support which I use today with the same license key that came on the parcel.
    About a year ago I bought the Windows Vista Express upgrade, which is valid for a Home Premium to Ultimate upgrade. But the disk is 32-bit only! So, I was wondering if it is still possible to get the 64-bit separately, support only this time, for the edition of Vista Ultimate? I ask this question because I would like to upgrade to Vista Ultimate, but still run on 64-bit, since I can't spend 64-bit Home Premium to Ultimate 32 - bit.
    I know that it may be too late now, given the fact that Windows 7 is already out and Windows 8 is in its phase of consumer preview now. But I am not really interested in upgrading to one of them at this stage. All I really want is just to upgrade to Vista Ultimate, but I need the 64-bit support, since I already have the license key.
    Maybe that Microsoft may allow me to download an ISO image of the Vista Ultimate 64-bit? That would be good enough for me, I don't care for the physical disc, it is not really necessary. I could get some pirate site or something like that, since I already own not one but two licenses, but I don't want that.
    Thanks in advance!

    The disks are probably non-destinee resale and this may explain the color.

    The Express Upgrade product key is specific to an upgrade from Home Premium to Ultimate.  The product key with the expedition is probably a full license key.

    > By 'Matrix Vista upgrade', you mean upgrading one bit-version to the other, like 64-bit to 32-bit or 32-64, right?

    N ° upgrade matrix tells you if an upgrade installation is allowed or a custom installation is required when moving from one edition of Windows to another.

    > Also, if I use a key Vista Home Premium that I have today to install Home Premium and then upgrade to Vista Ultimate, what happenes to my old key? The old key become invalid/replaced by the new key that I got the update? I mean where I want to go back to the old edition, I've had to go back to Vista Home Premium, I reuse this old key?

    You can use the old key to return to the old edition.  However, you can not use the key to install the old edition on a different computer.  The old key is bound to the key to upgrade.

    > "" If a user is running a 32-bit version of Windows, a user can only be upgraded to another 32-bit version: upgrade from 32 bit to 64 bit requires a clean installation. ""

    Now you are confusing a "install update" with an 'upgrade license '.  A retail upgrade license is valid to move from a 32-bit edition to a 64-bit edition, but an upgrade installation is not allowed and a custom installation is required (due to the change in the number of bits of the installation).

     
    > And now Microsoft will probably speed up the versions of Windows, with new versions coming out every two years or more, or has done.
     
    Not true.  Microsoft has been on a cycle of three years for a long time.  There is no speed upward.  Vista has been delayed for two years, when Microsoft declared a moratorium until security problems in Windows have been fixed (XP SP2 was the result).
     
    > I don't know about Windows 7. I don't know if I'll get it or wait for Windows 8. I hear a lot of misfortunes for Windows 7
     
    I don't know where you got this info.  Windows 7 is much better than Vista or XP.  Vista is the one that is panned by critics as a real dog.  Try Windows 7 and you will never look back.
     
  • Get the number of the caller before ringing

    Hello

    I want to get the number of the caller when a new call coming but before the device starts ringing. Is it possible to get? Can someone help me?

    Thank you!

    callIncoming fires before the unit begins to ring. You can use Phone.getActiveCall... to get the number

  • Is it possible to get the activation code of the older PC so that I can use it in my class?

    Original title: Activation of Windows 8.

    If there is some time I had windows 8 pro to use in my construction of future games. Not knowing I could install it on 1 computer (thought it would be at least 2) I installed it as a test on my desktop PC previos where it has not yet run properly cause it was an older model (and if you haven't used since then, cause I have a laptop with Windows7). But now my PC gaming is finished and I suddenly find I could activate only on 1 PC.

    So my question is. Is it possible to get the activation code of the older PCs (that I use even more, maybe even remove it) so that I can use it in my class? Or that the activation code and the money just went in the toilet?
    I could install Windows 7 to 2 different PC-s(didn't try more cause there was no need) with no problems and it wasen can't pack family, why is Windows 8 different? Sometimes errors occur.
    Ask cause I went all on buy the parts, I have no money to buy a new copy of windows 8.
    Awayting for your answers.
    Thank you
    Edit! Maybe I'm a solution. Going to try it out after I return to work.
    It's the solution

    "I have Windows 8/8 Pro is installed on my PC." If I replace with another PC, can I install my copy of Windows 8 on my new PC until I remove it from the other? »

    Yes. The highest point is the one you mentioned: you must remove Windows 8 from your old computer before you activate on the new. In other words, you can have your copy of Windows 8 or Windows 8 Pro running on a single computer at a time.

    Another thing to keep in mind is that if you have installed an upgrade copy under license of Windows 8 on a computer and then you want to use it on another computer, the same 'upgrade' rules apply: you must have a previous version of Windows on the computer before you install Windows 8. You can ignore this rule, if you started with Windows 8.1

    Important: You can't "move" Windows 8 or Windows 8 Pro on another computer if your computer is pre-installed with Windows 8. Your copy of Windows 8 is what OEM licensed which means that you are allowed to use Windows 8 on the computer on which he came already installed on.

    "How many times can I reinstall Windows 8 on another computer? Assuming I follow the rule 'uninstall old installation', peux I keep installing Windows 8 on different computers? »

    There is no limit to the number of computers that you reinstall Windows 8 on as long as you follow the rules, that I discussed in the last question.
     

    Hi NeemeK,

    We appreciate the research you have done to find more information on this issue. The information you found were correct.

    OEM product key can only be used with the computer on which it is installed on.

    When the operating system is not active (uninstalled) in the old computer, you can install it on the new computer. This applies to any number of computers you use.

    If you get any errors, you can perform the activation of the phone.

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

    Hope that the information provided is useful. Do not respond if you need more help.

  • Is it possible to get the layer, layerset and layer with status layerset...!

    Hello world!

    Is it possible to get the layer, layerset and layer with the status layerset. Because I met a big problem out of it.

    I have a single PS document which is contain the collection of layer, layer with layer games collection. I need apply the function for each layer and layers and each layer games with of layerset.

    I also tried a code, but its error getting. Please help me out of this code...

    -yajiv

    #target photoshop

    app.bringToFront ();

    level of $= 2;

    var app.activeDocument = docRef;

    Journal of the var ="";

    var x = 0;

    var n = number (docRef.layers.length) - 1;

    for (i = 0; i < n; i ++) {}

    var tm = String (docRef.layers [i]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (DocRef.Layers [i], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (DocRef.layerSets, "LayerSets");

    x = x + 1;

    }

    }

    function Check_LayerStructure (objLayer, objflag, x) {------}

    {if(objflag=="Layer")}

    LayetStructure (objLayer, objLayer.name, BlendMode.NORMAL, 100, 100, 0, true, 'Layer');

    }

    else {if(objflag=="LayerSets")

    LayetStructure (objLayer [x] objLayer [x] .name, BlendMode.PASSTHROUGH, 100, 100, 1, true, 'together');

    m = Number (objLayer [x] .layers. Length)

    for (j = 0; j < m; j ++) {}

    var tm = String (objLayer [x] .layers [j]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (objLayer [x]. Layers [j], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (objLayer [x] .layerSets, "LayerSets", x);

    }

    } / / Loop Layerset

    } / / I loop For

    } //Function loop

    function LayetStructure(layerRef,L,bMode,Opt,fillOpt,S,layVisible,Lref) {}

    {if(layerRef.BlendMode!=bMode)}

    If (confirm (L + Lref + "belend mode was bad...!)) \n"+"do you want to change...? »)) {

    layerRef.blendMode = bMode;

    Journal = Journal + "-" + L + Lref + "belend mode has been changed...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.Opacity!=opt)}

    If (confirm (L + Lref + ' opacity has been "+ Math.round (layerRef.opacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.opacity = Opt;

    Journal = Journal + "-" + L + Lref + ' opacity was changed to 100...! \n\n ";

    e = 1;

    }

    }

    If (layerRef.fillOpacity! = fillOpt & & S == 0) {}

    If (confirm (L + Lref + ' Fill has been "+ Math.round (layerRef.fillOpacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.fillOpacity = fillOpt;

    Journal = Journal + "-" + L + Lref + ' fill has been changed to 100...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.visible!=layVisible)}

    If (L + Lref + ' left eye...! ") \n"+"do you want to change...? ») {

    layerRef.visible = layVisible;

    Journal = Journal + "-" + L + Lref + ' eye was turn on...! \n\n ";

    e = 1;

    }

    }

    }

    Code of responsible for the action would naturally faster, but if you should be more comfortable with the DOM code, it could be useful to you.

    #target photoshop

    var theLayers = collectLayers (app.activeDocument, []);

    Alert (theLayers.join ("\n"));

    function to collect all the layers.

    function collectLayers (theParent, allLayers) {}

    If (! allLayers) {var allLayers = new Array}

    else {};

    the number of var theParent.layers.length = - 1;

    for (var m = number; m > = 0; m-) {}

    var theLayer = theParent.layers [m];

    apply the function of games of layers;

    If (theLayer.typename == "ArtLayer") {}

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity])

    }

    else {}

    allLayers = (collectLayers (theLayer, allLayers))

    This line includes layer groups;

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity]);

    }

    };

    return allLayers

    };

  • is it possible to get the EPS encoding (IE.. BINARY, ASCII, ASCII85)

    Hello world

    is it possible to get the ASCII85 encoding BINARY, ASCII, EPS, JPEG (low)...

    Thanks in advance.

    1.jpg

    -yajiv

    The format of Photoshop EPS files is partially documented here:

    http://www.Adobe.com/devnet-apps/Photoshop/fileformatashtml/#50577413_pgfId-1035096

    Photoshop includes a comment in the EPS so that it is able to read, it writes files insert it again. Third-party programs that write files EPS pixel-based can include this comment in EPS files, so that Photoshop can read their files.

    The comment must follow immediately after the % block of comments at the beginning of the file. The comment is:

    %ImageData: ""

    : Width of the image in pixels.

    : Height of the image in pixels.

    : Number of bits per channel. Must be 1 or 8.

    : Picture mode. Image bitmap/levels of gray = 1; Lab = 2; RGB = 3; CMYK = 4.

    : Number of another string in the file store. Ignored when reading. Photoshop uses this to include a grayscale image that is printed on PostScript printers without colors.

    : Number of bytes per line per channel. Will be 1 or formula (see below):

    1 = data are interleaved.

    (columns * depth + 7) / 8 = data are stored in line-interlaced format, or there is only a single channel.

    :

    1 = data in binary format.

    2 = data in hexadecimal ascii format.

    : PostScript the line immediately preceding the image data. This entire line should not occur elsewhere in the PostScript header code, but it can happen to part of a line.

    In addition, some information about other values of can be found here:

    http://Python.6.X6.Nabble.com/correctly-determine-image-size-of-a-Photoshop-EPS-td2096786. HTML

    1 - binary

    2 - ascii

    3 - jpeg low quality

    4 - jpeg medium quality

    5 - jpeg quality

    6 - jpeg maximum quality

    7 - ascii85

    This is a test script using this information:

    function main ()
    {
        function isPhotoshopEPSFile (f)
        {
            return (f.type === 'EPSF') || f.name.match (/\.eps$/i);
        }
        var epsFilter =
            (File.fs === "Macintosh") ?
                function (f) { return (f instanceof Folder) || isPhotoshopEPSFile (f) } :
                "Photoshop EPS Files:*.eps,All Files:*.*";
        var epsFile = File.openDialog ("Open Photoshop EPS file:", epsFilter);
        if (epsFile)
        {
            if (epsFile.open ("r"))
            {
                while (!epsFile.eof)
                {
                    var line = epsFile.readln ();
                    var found = line.match (/^%ImageData:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/);
                    if (found)
                    {
                        var dataFormatIndex = found[7];
                        var dataFormats =
                        [
                            "Binary",
                            "ASCII",
                            "JPEG (low quality)",
                            "JPEG (medium quality)",
                            "JPEG (high quality)",
                            "JPEG (maximum quality)",
                            "ASCII85"
                        ];
                        alert (dataFormats[dataFormatIndex - 1]);
                        break;
                    }
                }
                epsFile.close ();
            }
        }
    }
    main ();
    

    HTH,

    Domestic-

  • How can I get the number of disks for a virtual machine and PAHO are / s of a disc?

    Hi all

    I would like to know if there is a command that returns the number of disks having a virtual machine.

    and also if there is no command to obtain and change the number of the IOPS / disk s.

    Thanks in advance

    Carlos

    It will give you hard drives attached

    Get - VM | Hard drive


    It will give you count

    Get - vm | Select name, @{N = "TotalHDD"; E={($_ | (Get-harddisk).count}}


    It is possible to retrieve the number of the IOPS / disk s, but what do you mean by editing.

Maybe you are looking for