system
1
(imported topic written by cm6591)
Hi,
I have an action script as follows:
parameter “new” = “{names of files of folder “C:\temp”}”
and the result is:
parameter “new” = “events_123events_1234events_12345”
the names of the files are:
events_123
events_1234
events_12345
Basically, I want each name to be assigned to a different variable. How can I do that? For example,
new1 = events_123
new2 = events_1234
new3 = events_12345
Thanks
system
2
(imported comment written by cm6591)
I tried the following for this:
Q:item 0 of (names of files of folder “C:\temp”)
E: The tuple index 0 is out of range.
Not sure where am I going wrong with this?
Thanks
BenKus
3
(imported comment written by BenKus)
Hi cm,
Unfortunately, you can’t set parameters to multiple values with a list like this…
What are you trying to do with these variables? maybe there is another way…
Ben
system
4
(imported comment written by cm6591)
Thanks Ben. I think I have made some progress. But I need further help…
//this is giving me comma delimited results
q:concatenation “,” of (names of files of folder “C:\temp”)
A: events_123,events_1234,events_12345
T: 1.015 ms
//now i want to get the first item of the above results and I am getting an error. I don’t understand
Q:item 0 of (concatenation “,” of (names of files of folder “C:\temp”))
E: The tuple index 0 is out of range.
Thanks
BenKus
5
(imported comment written by BenKus)
Hi cm,
“item” is used for “tuples”… as an example:
Q: item 1 of (0,1,2)
A: 1
But I am not sure how this relates to what you are trying to do (I am not clear what problem you are trying to accomplish).
Ben
system
6
(imported comment written by cm6591)
Thanks Ben. I’m now able to get this to work
system
7
(imported comment written by jeremytoo)
cm, can you post your working code? It’ll help answer the question for someone searching the archives of the forum 