determine the length of a string variable, and other features

  • Hi, Klaus,
    for operations on string variables would be very useful operator to determine the length of text, such as:

    Code
    len(length_value, get(txtvar));


    whether you are planning to create this opportunity in Krpano?

    would also like to be able to measure the specific time interval and calls the custom action, such as:

    Code
    timer(20, action(time_off));


    or at least to be able to read the system time of the operating system

    Thank you for your work
    best regards
    Serge

  • Hi,

    for operations on string variables would be very useful operator to determine the length of text

    Okay - this is not an intended or documented feature - but this is already possible. *wink*

    The krpano internal objects are directly based on Actionscript3 / Javascript objects - e.g. the String object - and lower-case properties of these objects can be also directly accessed from xml (only lower-case because krpano internally converts all variable and attributes names to lower-case to have an case-insenstive access).

    And the String object has a 'length' properties and because its lowercase it can be accessed also from krpano xml.

    e.g. here some example codes:

    Code
    set(test,'hello string');
    trace('test=',test);
    trace('test.length=',test.length);
    
    
    copy(len,test.length);
    trace('len=',len);


    would also like to be able to measure the specific time interval and calls the custom action

    See the delayedcall action:
    https://krpano.com/docu/actions/#delayedcall


    Quote

    or at least to be able to read the system time of the operating system

    Okay, added as feature request.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!