Daten in Datei Schreiben

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
frage
Posts: 43
Joined: 20 May 2017 12:15

Daten in Datei Schreiben

Post by frage » 24 May 2018 21:33

Hallo Forum,

ich versuche meinen Standort regelmäßig abzurufen und dann diese Daten in eine Datei zu schreiben.
Ich verwende den Trigger "Periodischer Standort Update" mit hoher Genauigkeit um meine Standort Daten zu erhalten.
Dann verwende ich "Initalisiere Variable Standort" um mir mit "Benachrichtigung auf Bildschirm" die Werte anzeigen zu lassen.

Bis dahin geht alles.

Jetzt habe ich schon einiges probiert aber ich bekomme diese Daten nicht eine Datei geschrieben.
Ich versuche diese Datei mit "Initalisiere Variable Datei Liste" zu erstellen.
Aber das funktionert bisher nicht.

Danke für Informationen.


Noch eine Frage:
Ich suche nach einer guten Anleitung um die Nutzung von Variablen zu erlernen.
Wo finde ich eine ausführliche Anleitung. Ich habe in den Suchmaschinen bisher
nicht für mich die richtigen Beiträge gefunden.

Gruß
frage

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Daten in Datei Schreiben

Post by Desmanto » 25 May 2018 03:09

Do you use action "Write to File"? Have you grant the storage access permission to Automagic? Where do you write the file to? Try the Automagic's own folder, usually it is /storage/emulated/0/Automagic/ So maybe write it to /storage/emulated/0/Automagic/location.txt

There is no yet full tutorial, step by step using the script or variable in Automagic. But Automagic already has some starting tutorial and a complete documentation on how to use each element. You can find the link in the main site, or you can just visit my index, at General section. For variable and scripting, you can learn from many usage case of others, find it at Scripting section (and some other such as Time & Date, Control UI, HTTP request). But the best way to learn it is to use it by yourself. Set a goal/thing you want to do and find your way to make it happen. If you hit the wall (stuck with the scripting), you can ask here and explain what you want to do.

If you want to learn step by step, I suggest you to find other programming language you've been interested to. Learning other language usually will boost your Automagic skill at the same time, because the logic is usually very similar. You just have to find the correct syntax, or you can ask here if you got lost. Javascript is a good start, since Automagic is heavily influenced by java/javascript. The other I would recommend (as I am learning it now) is Python (especially python 2.7, not 3.x). You can use python to integrate Automagic to Eventghost and do much more. Something like syncing file, sharing clipboard between phone and PC, remote controlling in both way.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

frage
Posts: 43
Joined: 20 May 2017 12:15

Re: Daten in Datei Schreiben

Post by frage » 26 May 2018 21:24

Hallo Desmanto,

vielen Dank für die Information wie man die Daten in eine Datei schreibt.
Das war die Lösung meines Problemes.
Ich hatte versucht die Daten in einem anderen Ordner als dem Standartordner zu speichern.
Das ging aber nicht. Außerdem hatte ich nicht "txt" angehängt, weil ich angenommen hatte
das würde automatisch gemacht werden.

Dankr für die Tipps bezüglich der Programmierung mit Variablen.

Gruß
frage

Post Reply