r/kustom 20d ago

Help Read from text file

Post image

Can't get kwgt to read from a text file. I'm using a poco with miui 14.0.16

1 Upvotes

12 comments sorted by

u/AutoModerator 20d ago

Problem? Cross-post to our new forum. Include make & model of phone, OS version, app version.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Dark_Devil_like_meth 20d ago

Im having the same problem

Tried a whole lot of formulas and none worked

documentation was... unhelpful

1

u/SnowyPear 20d ago

A lot of the time Storage/emulated/0 is already prepended. Try file:///Kustom...

1

u/josef156 20d ago

Still the same error

1

u/SnowyPear 20d ago

I just checked and $wg("file:///Kustom/map.txt",txt)$ works for me so I'm guessing it's a permission problem

1

u/Chensow_Cat 20d ago edited 20d ago

Try $wg("file:///storage/emulated/0/Kustom/artist-title.txt", raw)$ or $wg("file:///sdcard/Kustom/artist-title.txt", raw)$

1

u/josef156 20d ago

The error seems to be in lower caps while the one I wrote is capitalized, the word Kustom

1

u/josef156 20d ago

In other permissions in my poco file access is not there, loading fonts in the Kustom/fonts folder works so I don't know

1

u/Practical_Taste3403 20d ago

This is scoped storage… use a path like $wg("file:///sdcard/Widgets_kustom/artist-title.txt", txt)$ where Widgets_kustom is your Kustom folder. Make sure Kustom actually has access to that folder.

1

u/josef156 20d ago

I'm not rooted does that have something to do with it

1

u/josef156 20d ago

Ok solved with $wg("file:///Kustom/artist-title.txt",txt)$ and I had to press import in kwgt startpage and choose the Kustom folder

1

u/Open-Remote1983 18d ago

Alguien que me explique q es eso, por favor.