switch the case: should use the string value?

in the example below, I have two points to a switch box. The first works and is not the second. In the second I tried to use a variable to concatinate the string for the case. For some reason whenever I do, it is not locate the second case. It seems like it should work...

for (c = 1; c < = numItems; c ++) {}

model var = app.project.items [c];

var scale = 100;

If (comp instanceof CompItem) {}

for (i = 1; i < = comp.numLayers; i ++) {}

{Switch (COMP. Layer (i). Name)}

case 'textLines_NFLAM': we're working //This

targetWidth = 1400;

COMP. Layer (i).scale.setValue [(scale, scale);]

setTextLayer_caseSensitive (comp.layer (i), lineValue);

If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}

modifiedLayers.push (comp.layer (i));

}

break;

showName var = 'TA ';

case 'textLines_' + showName: / / it does not work unless I change to: case "textLines_TA":

targetWidth = 1430;

COMP. Layer (i).scale.setValue [(scale, scale);]

setTextLayer_caseSensitive (comp.layer (i), lineValue);

If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}

modifiedLayers.push (comp.layer (i));

}

break;

}

}

}

}

It works for me (at least it works):

myname = "textLines_TA"; var

showName var = 'TA ';

{Switch (myname)}

case 'textLines_' + showName:

Alert ("caught");

break;

by default:

Alert ("no to not catch");

break;

}

I suspect, there is something else.

Dan

Tags: After Effects

Similar Questions

  • Replace the string value of table

    with cte as)

    Select val '123', 'abwec' double val1

    Union of all the

    Select "456" val, "mowerw" double val1

    Union of all the

    Select val '709', 'wkwere' double val1

    Union of all the

    Select val '078', 'awerwewerwreq' double val1

    )

    Select * from cte;

    -incoming string

    "asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..."

    need to replace like 'abwec' 123 and 456 as "mowerw" and 709 as wkwere and 078 as 'awerwewerwreq '.

    How to replace the string value of the string

    I'm going to the table which will have mapping information I need to see the incoming string and replace the appropriate value of the val to val1

    something like

    Of

    "asdasd123456werwer@asdwer709@ewrwerewrwqqwezxder078ewrwer@87w8eopiu @..."

    TO

    "asdasdabwecewrwer@87w8eopiumowerwwerwer@asdwerwkwere@ewrwerewrwqqwezxderawerwewerwreq@..."

    By using the TYPE clause.

    with cte as

    (

    Select val '123', 'abwec' double val1

    Union of all the

    Select "456" val, "mowerw" double val1

    Union of all the

    Select val '709', 'wkwere' double val1

    Union of all the

    Select val '078', 'awerwewerwreq' double val1

    ),

    input_tbl

    as

    (

    Select "asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..." input_str

    of the double

    )

    Select max (input_str) Dungeon (first order by desc NWR dense_rank) input_str

    de)

    Select rno, input_str

    de)

    Select rownum NWR

    val

    val1

    input_str

    count (*) over() cnt

    from cte

    Cross

    Join input_tbl

    )

    model

    dimension (NWR)

    measures (val, val1, cnt, CAST (input_str AS VARCHAR2 (4000)) input_str)

    (

    input_str [any] = replace (nvl (input_str [cv () - 1], input_str [cv ()]), val [cv ()], val1 [cv ()])

    )

    )

  • Check the string value when using xdoxslt

    Hello

    I'm new to the BEEP and will have questions in writing this simple code for a model RTF. In plain language, that's what I want to do:

    If (instr(FirstName,'concern',0) > 0 and instr(LastName,'concern',0) > 0 and instr(MiddleName,'concern',0) > 0) then the VNAME variable value "

    on the other

    If (instr(LastName,'1-',0) > 0), then set VNAME variable FirstName

    on the other

    the value of VNAME variable FirstName + "" + name

    Finally... show the VNAME variable

    ===========

    I wrote it, but it doesn't work:

    declared variable... Initialize it to x.

    <? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'x')? >

    String value of control-> - error.

    <? If: (xdoxslt:Instr (lower(coFirstName|| coMiddleName || coLastName), "abuses", 0) > 0)? >

    <? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'')? >

    <? end if? >

    write the variable

    <? xdoxslt:get_variable($_XDOCTX,_'v_RTPMName')? >

    Thanks for the help!

    For a quick overview,.

    InStr is belong to the xdofx family, must be used in this way instead of xdoxslt:Instr()

    For example: If condition 1 0 otherwise true back

    0 then 1 or 0 end if? >

  • to refer to an object using a string value that is the name of the object

    is this possible? I want to do something like:

    String str = "classname";
    
    UiApplication.getUiApplication().pushScreen(str);
    

    Thank you

    If you want to use strings as keys use class java.util.Hashtable.

    Place your items for the hash table and retrieve it through the string of unique keys.

    Like this

    Hashtable myObjects = new Hashtable();
    myObjects.put("MyStringKey", myObjectReference);
    
    .......
    
    Object myObjectFromTable = myObjects.get("MyStringKey");
    
    if (myObjectFromTable instanceof Screen) {
      UiApplication.getUiApplication().pushScreen((Screen)myObjectFromTable);
    }
    
  • Instansiate components according to the string value

    Hi guys,.
    I'm looking forward to find a solution that would allow me to summon and to create components on the stage based on the value of a string withouth having to finish for example switch like this first one.

    I am aware of the use of the design patterns such as factory and model method patterns may be one approach, however I do not know how to implement it in a way. Something that might resemble this code is the one I enclose below (Simple factory).

    Has anyone used one of these methods of design patterns to accomplish such a thing? Could someone can give me guidance how to proceed on Flex?

    Thank you very much.
    Jose

    "jose3" wrote in message
    News:g7v7g8$rq7$1@forums. Macromedia.com...
    > Hi guys,.
    > I am looking forward to find a solution that would let me call and create
    > components on the stage based on the value of a string withouth having to the end
    > to top
    > the switch example as:
    >
    > import com.myCanvas;
    > var compType:String = "myCanvas";
    > switch (compType) {}
    > case "myCanvas":
    > var myC: myCanvas = new myCanvas();
    > break;
    > }
    >
    > I'm aware of the use of design patterns such as model and factory
    > Method models can be an approach, but I do not know how to implement
    > It
    > in such a manner.
    >
    > Has anyone used one of these methods of design patterns to accomplish such
    > thing? Could someone can give me guidance how to proceed on Flex?

    How bout:

    private var factory: Object = {myCanvas: new ClassFactory (myCanvas),}
    myFoo:newClassFactory(myFoo)};

    then

    var component: UIComponent = new plants [compType];

    You can also watch getDefinitionByName.

  • How to wire a switch terminal case and depending on this value string value, run a case selected?

    Hello world

    In the schema-block sent VI, through serial comm, #2 byte is 00 or 01 (Hex). This byte must dictate which cases to run. If value = 00 Hex running case #1, Hex if value = 01 runs the #2 case. If none of the two, nothing should run.

    How can I do this? I'm relatively new to LabVIEW, any comment is appreciated.

    Thank you

    Mahir

    easiest of all wiring in the whole structure of the case rather than convert to string.

    Then just back up the case selector and type what you want.

  • Put the string value in a table

    Hello

    Probably an easy question, but I am reading data of a RFID reader that returns a string value of 12 bytes. Whenever a RFID reads, I want the tag to be inserted in a string table on the front panel. So, basically, a newspaper of the each tag [read-> Insert row 0] then [read-> Insert level 1] and so on. I work RFID reader, I don't know how to put the string in the table.

    I'm not sure of the steps necessary to achieve control of the table (or if the table control is the right thing to use).

    Any help would be greatly appreciated. Thank you.


  • How to limit the string value?

    How to limit a string must be a value of a group of parts. For example, a string must be one of the following values: abc defg h, ijklm

    Is there any method of the JAVA API on how to limit a string value?

    No - you will need to add the necessary code to the method "set" and make the instance of private variable so that the "setter" is used.

  • D2KWUTIL Read_Registry - only reads the string values? How to read the binary?

    Hello, everyone!
    I use forms and reports 6
    D2KWUTIL,
    WIN_API_ENVIRONMENT. Read_registry
    to read the Windows registry values.
    The service works very well with string values (that is, type REG_SZ registry).
    but fails with NO_DATA_FOUND binary values, such as type REG_DWORD.

    D2KWUTIL is really unable to work with other types of chains?
    If so, what can be used instead?

    Appreciate all the guidance,
    Roman

    Published by: user9232995 on November 18, 2010 23:19

    Published by: user9232995 on November 18, 2010 23:20

    It's d2kwut60.dll.

  • by programming the string value upper limit of table 3.1 teststand

    I'm relatively new to using Testand... so I would be grateful for all the help:

    I created an array of strings using an ActiveX/COM action: PropertyObject.NewSubProperty (lookupString, valueType, EnTableau, typeName, options)

    It creates an empty array of strings [0.empty]. How to programmatically set the upper bound of the array (for example the table of strings [0.8])

    Due to my requirements of the application, I have to use Teststand 3.1

    Thank you in advance,

    Ellas1

    Hello

    I think TS 3.1, you should always use the TS API PropertyObject.SetDimensions (later of TS that has been replaced by an array property), or you can use SetNumElements if it is a 1 d array. Of course, you can order these operate using TestStand.

  • How can I get the string value displayed on a digital control defined for the relative time.

    I have a digital potentiometer to display relative time in increments of 30 minutes.

    I want to record the value displayed on the control string.  Unfortunately, when I use the "convert to decimal string.vi" number, the resulting string is just the value in seconds.

    How can I get the value as a string? (for example 01:30 for an hour and thirty minutes)

    Thank you

    Sean

    Hi Sean.C!

    M_Peeker's suggestion is a good thing.  A stage that could clarify things is that you must set the % t <%H:%M> format string entry.

    < br / > Kristen:.

  • ring with the string value

    I would like to know if there is a way to make a single control (either a ring or other) where a string that is displayed to the user has a string in its output value.

    For example, I have a power laser with a serial port and the command to turn on the laser diodes is LASER1;

    I want to display the 'LIGHTS ON' string to the user, but that control to provide 'LASER1' value when selected.

    It's easy to do with two controls, for example, can I have an enumeration with the display of the user strings and an enum with the chains of command of the laser, but then I have to make sure any changes affect the two controls.

    If it's a single control, it is less likely to be a mistake when a change is made.

    Any help is greatly appreciated.

    I'm using LabView 2009

    Never heard of the drop-down list box?  Could be a winner, just uncheck values Match points.

  • How to extract the string values

    Hello

    Database: 11.2.0.3.0

    I have a JSON string like below. I want to extract only the propetyvalues. Can you help me with the query:

    {

    'documents':]

    {

    'document':]

    {

    'propertyname': 'Id',

    'propertyvalue': "{1C236CB2-AB97-4982-8117-DE0BE6D7DB46}".

    }

    ]

    },

    {

    'document':]

    {

    'propertyname': 'Id',

    'propertyvalue': "{1318AC90-C321-4D3D-9558-6547EFE49A7E}".

    }

    ]

    }

    ]

    }

    Hello

    Too bad, that you do not have version 12. Then, you can use the function JSON_VALUE mentioned previously.

    Here's something you can do in your version:

    SELECT LEVEL AS n

    , REGEXP_SUBSTR (: str)

    , ' "propertyvalue": "([^"]*) "

    1

    LEVEL

    NULL

    1

    ) AS propertyvalue

    OF the double

    CONNECT BY LEVEL<= regexp_count="" (:str,="">

    ;

    If you want to know that adapts to your specific problem, post CREATE TABLE and INSERT statements for some sample data and the exact results you want from these sample data.

  • need to adapt the string values when writing to a text file

    Hello

    I have problem by lining up all of the data in wise coloumn. the output is (see attachment). I'm trying to solve this problem, but seems to be difficult. help please...


  • Save the alphanumeric string value

    Hello!
    How to save a value to a variable so that I can use it in the future? I have a string of output of a case structure proposed by an OK botton. I want to save the string value when I press the ok botton...
    Thanks in advance
    GM

    Just write the string in a text file.  When you want to use it later, to read the text file.

Maybe you are looking for

  • Owner: Software benchmarking

    Hi, really of struggling to find an answer to this on the HP website.  I'm trying to know if HP to perform benchmarking third-party software services running on HP hardware? Background is that I work for a company IT Council and we have developed a s

  • where FF stores history on hard drive?

    ...................

  • want to 810-430qe CTO: 810-430qe CTO... of the usb ports 3.0 and 2.0 ports, which are which?

    computers HP do not seem to come with a simple explanation of usb port scheme and since there are a dozen of them, I would like to know precisely which are which?    Help, please...

  • How to hide the backup files?

    I think that in some way after changing some settings (which I don't remember and can't seem to find), my files appear all the backup copies of the files in the folder, each of them bears the name of: "backup of __.wbk _ (file name). How to hide thes

  • What is the right time to call the pushScreen()?

    Hello I made a screen that simply indicates "Loading"... "while my app works through its processes. the problem is that the screen never had pushed until after the function when pushScreen() is back. the call looks like this: function func() { //I'm