How to have .txt file as a variable?

I'mnoob

Member
So suppose, If I've a txt file containing random words in a list.

I want macrodroid to take that file content as a variable.

Is there a way to do?
 

RSF

Well-known member
Yes, Use the Read from File action to get the file's contents into a string variable.

If you want, you can then convert the file variable into an array, to have each line of the file in a separate array entry, using the Text Manipulation / Split to Array action: specify the variable containing the file's contents as the "Source Text" parameter; and specify \n (backslash followed by "n") as the "String Delilmiter" parameter.
 
Top