How can I fill an array from a file?

112 views
Skip to first unread message

3Shirts

unread,
Jan 4, 2016, 7:31:43 AM1/4/16
to Tasker

Let me first explain what I'm doing:

I have a phone which receives sms messages from various telemetry units. I want to take the data from those and write it to a file which I then upload to Dropbox. I'm ok with the latter part but I have one specific challenge:

I need to pull the list of phone numbers from a file, rather than 'hard code' them into the task. The list of numbers will change occasionally and I ultimately want to 'app factory' this task and distribute it to a few members of staff without installing tasker on their devices.
I understand how you can create arrays so plan to use one as the variable on the sms received trigger, I'm just not sure how I go about filling the array from a file.

I also welcome any other ideas in you think I'm overcomplicating this or missing something simpler.

Thanks


Scott

unread,
Jan 4, 2016, 9:32:13 AM1/4/16
to Tasker
You just use the File>Read File action to read the file into a variable and then use the Variables>Variable Split action on that variable to turn it into an array.
Reply all
Reply to author
Forward
0 new messages