AryanGupta
(Aryan Gupta)
October 2, 2020, 5:03pm
#1
i am trying to get the file name.
In which , the text is inserted ??
means, you have 5 files named 1example.png,2example.png,3example.png,4example.png,5example.png.
now, i want to get only file where 1 is inserted. //1example.png
can i get the file name like this
please help me
1- Initialize a list with your five files.Initlize a variable to store the filename which contains you text,
2- when you want to check:
3- make like this:
for each item in list ( your files list) {
if ( item contains (your text for example (1) )
set result( your variable the result will be assigned to ) = item
break
I hope you understand me
2 Likes
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:09pm
#3
the problem is that i don’t know the file name . so, i am trying to get the file from asset.
only file where 1 is inserted.
Try to use file tools extension get File list from assets block:
1.Introduction
FileTools
Probably you have read in title , the name of extension is FileTools and features are similar to its name.
It provides tools to work with Files and Folders.
Latest Version: 9
Last Updated: 2020-07-06T11:26:00Z (UTC)
2.Blocks
An image of blocks…
[image]
[image]
[image]
[image]
[image]
[image]
It has total 29 method blocks and 5 event blocks
3.Documentation
A brief documentation for FileTools:-
[component_method]
Returns path to application specific directo…
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:18pm
#5
i am using this extension already but i don’t know how can i get the file which is start from 1.
As i said> get the file list>Then:
Try to use file tools extension get File list from assets block:
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:21pm
#7
i don’t know how to use this in my condition
Set a variable to this block, And then run this for each item in list loop:
AryanGupta:
please share your blocks
Why don’t you try your self, it isn’t hard?
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:23pm
#10
i am not doing this for extension,
it just for blockyeditor.
so, please show your blocks
I understand you, i just want your to try your self, here in the community we like to learn fishing instead of giving fish.If you have any thing you don’t understand for what i’ve told you, feel free to ask here
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:30pm
#12
so, please show your blocks.
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:36pm
#13
i don’t know how to use this block, so, please show your block.
even i don’t know what to use in kodular in the place of
Mohamed_Tamer:
item contains
It’s this block:
BTW, it looks like you understood what i’ve sent as a java list, even it isn’t, it’s just a representation, of how it would be in the blocks
2 Likes
AryanGupta
(Aryan Gupta)
October 2, 2020, 5:39pm
#15
can you please show all the blocks
Here is how to add this block in an conditional statement.
Now you just need to add it in this block:
And add this blocks inside it:
As i said i want you to try your self instead of giving you complete blocks, that will help you understand what it does as you made it you self
1 Like
rizu
(Rizu Barury)
October 3, 2020, 4:40am
#17
A really workable solution
Use variable section then list section as what moderator told
1 Like
can u simply show Ur blocks where focus is to be made…
for showing blocks go to windows write snipping tool and capture…or get those blocks if they are few by downloading
AryanGupta
(Aryan Gupta)
October 3, 2020, 8:52am
#22
hey, i already solve the problem
i am not new in kodular community. Don’t talk like this.