You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Taurus

Trainee

  • "Taurus" started this thread

Posts: 133

Location: Belarus

Occupation: photographer & virtual tour developer

  • Send private message

1

Friday, March 29th 2013, 12:10pm

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:

Source code

1
 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:

Source code

1
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
--
in order to comply the word with the affairs, you need to keep quiet and do nothing!

Virtual tour Gomel
Virtual tour
Virtual tour
Elbrus
...

Windows 10x64 & krpano 1.19pr16

2

Friday, March 29th 2013, 1:28pm

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. ;-)

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:

Source code

1
2
3
4
5
6
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:
http://krpano.com/docu/actions/#delayedcall


Quoted

or at least to be able to read the system time of the operating system
Okay, added as feature request.

Best regards,
Klaus

Taurus

Trainee

  • "Taurus" started this thread

Posts: 133

Location: Belarus

Occupation: photographer & virtual tour developer

  • Send private message

3

Friday, March 29th 2013, 7:50pm

Klaus, thanks for the clarification on the length of the string

and you're right, delayedcall completely implements the timer

thank you for the quick response
Thank you for your work

Serge
--
in order to comply the word with the affairs, you need to keep quiet and do nothing!

Virtual tour Gomel
Virtual tour
Virtual tour
Elbrus
...

Windows 10x64 & krpano 1.19pr16