> Hi, I'm working on a shopping list
Nice project. I would be the last one to suggest a play store app over doing yourself with tasker, However I feel I would be very negligent if I did not recommend "Mighty Grocery " it is one aid the very few paid apps I have.
That being said...
> I have a scene that shows every line from the txt as a separate text element.
I absolutely use a menu element to display the list and use a comma separated variable to populate the menu. This would eliminate the need for a text file. For making changes to the variable (list) you would split it into a array and process the data with array push, array pop and array search.
I want to be able to tap each element and have Tasker delete the corresponding line
Very easy using the %tap_index variabe in the menu element
That is just the way I would go.... :)
> Oh, i figured i might have to learn the arrays.... haven't tinkered with arrays for several years so i'm a little annoyed with that, but perhaps the learning curve isn't too bad.
Should not be...
I definitely want to use a text file tho, i like text files and "portable settings" as it were.
Not sure what you mean by 'portable settings'?
>
> So i should start with having each item of the list on the same line in the text file, like "candy|fruit|chloroform|birthday present" ?
Correct, but use a comma separator. That is what the menu element will accept to load the menu items.
> > So i should start with having each item of the list on the same line in the text file, like "candy|fruit|chloroform|birthday present" ?
>
> Correct, but use a comma separator. That is what the menu element will accept to load the menu items.
On second thought if you are using a text file you will most likely want to populate the menu directly with the "Array" so you can use any delimiter you like. Just read the file into a "local" variable and do a variable split. This will give you a "local" array that will load the menu.