[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Thu Sep 08, 2016 12:00 am

@kossglobal

Set separator in prpoerty "Delimiter", or set by "Action:Set delimiter".
B
104
S
25
G
213
Posts: 4,280
Reputation: 122,072

Post » Thu Sep 08, 2016 1:16 am

rexrainbow wrote:@kossglobal

Set separator in prpoerty "Delimiter", or set by "Action:Set delimiter".


Thanks!
B
49
S
19
G
3
Posts: 588
Reputation: 6,209

Post » Sat Sep 10, 2016 7:31 pm

Hey Rex i am using your plug in but i have a bit of problem i think the value i am using for stats and such are being treated like texts is that intentional cause that just mess up my whole plan to use it.

This would explain why i cannot use the values with a math operation.
B
51
S
24
G
6
Posts: 391
Reputation: 7,820

Post » Sat Sep 10, 2016 9:33 pm

@Gearworkdragon

Yes, the default type is string. You can
- transfer string to number by system expression: float or int , or
- set "Eval mode" to "Yes" could parse value by "eval" function of javascrpt. See the document for more detail.
B
104
S
25
G
213
Posts: 4,280
Reputation: 122,072

Post » Sun Oct 02, 2016 11:12 am

The "TableToCSV" expression in the CSV plugin functions incorrectly.

If I use "TableToCSV" expression to store table A in a variable, change some values on table A as B, then use the "TableToCSV" expression again to store table B, the expression will return 2 stacks of table A instead of table B.
B
6
Posts: 2
Reputation: 268

Post » Mon Oct 03, 2016 2:33 am

@JuicyImmortal

Fixed, thanks for this bug report.
B
104
S
25
G
213
Posts: 4,280
Reputation: 122,072

Post » Wed Nov 09, 2016 2:20 pm

Hi, Rex! Thanks a lot for all your plugins, they really help to boost my projects.

I've got 2 questions about this CSV plugin:
1. Is it possible to get a bit randomised strings from a cell?
I use it for dialogs so it would be really cool to be able to get strings like "It is a rainy day at my place" from a cell "It is a rainy|sunny|trumpy day at my place" in CSV.

2. Is it possible to execute some C2 methods or call functions from the same CSV string mentioned above?
Like to call function "refreshUI" from a row "reply001, "Hello, Rex!", function.Call("refreshUI")"

Thanks a lot for your help.
B
7
S
2
Posts: 51
Reputation: 986

Post » Wed Nov 09, 2016 4:23 pm

@Yozzik

Answer of these 2 questions is the same -
sample capx

1. put javascript code in cell value
"It is a " + c2_callFunction("chooseOne", ["rainy", "sunny", "trumpy"]) + " day at my place"
which will invoke c2 function, see this page, section "Javascript integration" to get more detail information.

2. eval this javascript code by expression:ExecJS of official browser object, to get return string value
B
104
S
25
G
213
Posts: 4,280
Reputation: 122,072

Post » Thu Nov 10, 2016 9:38 am

Awesome. Just awesome. Thanks a lot again.
B
7
S
2
Posts: 51
Reputation: 986

Post » Thu Nov 10, 2016 1:22 pm

Excuse me, Rex, can you refer any rules of using single\double\triple quotes in non-eval mode? I`m really confused with it.
Your code works well, but any non-dynamic (without choosing one of the random pieces) string value works only when in """text""".
B
7
S
2
Posts: 51
Reputation: 986

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: digitalsoapbox and 2 guests