Replacing the comma with a point

Moderator: Moderator Group

Replacing the comma with a point

Postby alverman » Thu Aug 18, 2011 5:05 pm

I need to convert a value by replacing the comma with a point to send commands via tcp.
For example: 0,1234 to 0.1234
Is it possible?

Many thanks, Alberto
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: Replacing the comma with a point

Postby Markus Zeppenfeld » Fri Aug 19, 2011 9:55 am

Hi alverman!

Unfortunately it is not as easy as dragging in a node as the comma is the separator for several commands...
What exactly are you trying to do? Where is your comma-value coming from? The best option would be to prevent having these values. Would this be possible?

Markus
Markus Zeppenfeld
Senior Product Manager, Pandoras Box

"Have you tried turning it off and on again?" (from "The IT Crowd" / channel 4)
Markus Zeppenfeld
 
Posts: 824
Joined: Wed Mar 02, 2011 10:12 am
Location: Cologne - Germany

Re: Replacing the comma with a point

Postby alverman » Fri Aug 19, 2011 10:55 am

A node fader input take a fader value (min 0 max 255)
The fader input node connected to a node range (in min 0 to max out 255 min 0 max out 1)
The output value from the node range, rightly, is 0, xxxxxxxxxxxxxxxx
I would convert 0.xxxxxxxxxxxxxxxx
to send an ASCII string from the node stream tcp
I tried to put the output value of the node range in a textbox but then I do not have the command to read the value from a certain point in the text then put it in a variable and then create the string to ascii.
I just take everything that is after the comma.

Thanks, Alberto
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: Replacing the comma with a point

Postby Markus Zeppenfeld » Fri Aug 19, 2011 11:15 am

Hi!

There will be a new command to crop the start of a label content within the next release (following Rev178).

As for now you could multiply your value and get rid of the comma by using the the floor node. Is it possible for you to send this multiplied value? Whenever you divide this value again, you will get the comma value again.
I will have a check if we can add an option to switch between comma and dots...

Markus
Markus Zeppenfeld
Senior Product Manager, Pandoras Box

"Have you tried turning it off and on again?" (from "The IT Crowd" / channel 4)
Markus Zeppenfeld
 
Posts: 824
Joined: Wed Mar 02, 2011 10:12 am
Location: Cologne - Germany

Re: Replacing the comma with a point

Postby alverman » Fri Aug 19, 2011 11:24 am

Thanks Markus.
I have tryed and work with little problem.
I need a value in this mode: 001, 002, 003 ecc
Now value exit in this mode: 1,2,3,4,5,6,7,8,9,10 ecc

Is possible ?

Thanks, for your attention

Alberto
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: Replacing the comma with a point

Postby Markus Zeppenfeld » Mon Aug 22, 2011 8:19 am

Hi!

Use the filter textnode "leading zero" to add a desired count of leading zeros to your value.
You can adjust the total amount of your digits. Choosing 5 your value 2 will be displayed as 00002. 115 will be 00115.

Markus
Markus Zeppenfeld
Senior Product Manager, Pandoras Box

"Have you tried turning it off and on again?" (from "The IT Crowd" / channel 4)
Markus Zeppenfeld
 
Posts: 824
Joined: Wed Mar 02, 2011 10:12 am
Location: Cologne - Germany

Re: Replacing the comma with a point

Postby Markus Zeppenfeld » Tue Sep 06, 2011 10:57 am

Hi everybody,

there is an easy but useful tip for avoiding this issue:

Edit you regional settings in windows to english or edit the seperator icon from comma to point in your own language. This will lead to point output in Widget Designer as well..

Markus
Markus Zeppenfeld
Senior Product Manager, Pandoras Box

"Have you tried turning it off and on again?" (from "The IT Crowd" / channel 4)
Markus Zeppenfeld
 
Posts: 824
Joined: Wed Mar 02, 2011 10:12 am
Location: Cologne - Germany

Re: Replacing the comma with a point

Postby alverman » Tue Sep 06, 2011 11:31 am

Thanks!
I had not really thought
:)
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 114 guests