Sie sind nicht angemeldet.

1

Freitag, 14. Juli 2017, 05:03

how to extract parameters from Bgshadow = "40 32 18 36 0x00FFFA 0.5" Bgborder = "22.74.22.67 0xC57200 0.78"

Hello
Tell me how to extract parameters from
Bgshadow = "40 32 18 36 0x00FFFA 0.5"
Bgroundedge = "99 99 00 00"
Bgborder = "22.74.22.67 0xC57200 0.78"

(A = 40, b = 32 ... e = 0x00FFFA ...)?

Subtxt do not work, the length of the text can be different.

3

Freitag, 14. Juli 2017, 19:19

thanks for the answer! But how?

copy(Border_1,layer[layer_San].bgborder);

Border_1 = 2,10,120,5 0xFFFFFF 0.8 There are no separators
?
a=2, b=10, c=120, d=5, e=0xFFFFFF, f=0.8 ?



bgborder="34,07,06,14 0x8C879D 1

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

4

Freitag, 14. Juli 2017, 23:46

blank space is a separator itself so you can use it like this :

Quellcode

1
2
3
set(myVar, 40 32 18 36 0x00FFFA 0.5);
txtsplit(get(myVar), ' ', a, b, c, d, e, f);
debug('a=',a,' b=',b,' c=',c, ' d=',d,' e=',e,' f=',f,);


or following your code exactly you would do that :

Quellcode

1
2
txtsplit(get(layer[layer_San].bgborder), ' ', top_width, right_width, bottom_width, left_width, color, alpha);
debug('top_width=',top_width,' right_width=',right_width,' bottom_width=',bottom_width, ' left_width=',left_width,' color=',color,' alpha=',alpha,);;
everpano.com step beyond 360

5

Samstag, 15. Juli 2017, 08:04

*thumbsup* Thank you!

top_width - Lower underscores do not work.
topwidth - it worked!

30 76 81 27 0xC8FF00 0.5 - Yes, it shares *thumbsup* !
15,20,11,05 0xD200E0 0.5 - *confused* no, the comma is not a delimiter and outputs so
a=15,20,11,05 b=0xD200E0 c=0.5



Found!
15,20,11,05 0xD200E0 0.5 -->

txtreplace(dstvar,layer[color].bgborder,',',' '); - Substitution by a comma for a space -->

15 20 11 05 0xD200E0 0.5

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »San7« (15. Juli 2017, 10:37)


jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

6

Samstag, 15. Juli 2017, 11:21

Top_width must work in the same exact way as any other name not beginig with a number...
So there you must have another syntax error.
everpano.com step beyond 360

7

Samstag, 15. Juli 2017, 16:54

Top_width должен работать точно так же, как любое другое имя, не начинающее с номера ...
Таким образом, вы должны иметь другую синтаксическую ошибку.
*thumbsup* Yes, syntax error, everything works! Thank you!


Ähnliche Themen