[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
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Thu Sep 08, 2016 1:16 am

rexrainbow wrote:@kossglobal

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


Thanks!
B
45
S
19
G
2
Posts: 575
Reputation: 5,556

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
47
S
22
G
5
Posts: 376
Reputation: 6,958

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
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

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
3
Posts: 2
Reputation: 179

Post » Mon Oct 03, 2016 2:33 am

@JuicyImmortal

Fixed, thanks for this bug report.
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

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: 49
Reputation: 982

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
97
S
22
G
179
Posts: 4,126
Reputation: 104,559

Post » Thu Nov 10, 2016 9:38 am

Awesome. Just awesome. Thanks a lot again.
B
7
S
2
Posts: 49
Reputation: 982

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: 49
Reputation: 982

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: armaldio, matriax and 1 guest