If statements

J

Johnny91

Gast
Moin,

im XDA-Dev. Forum habe ich einen super Beitrag gefunden, zu etwas was mich einfach interessiert - ob ich es nutzen will ist die andere Sache.

arks down what time you got out of the car, starts counting how long youve been out of your car, and takes the GPS coordinates of your location when you get out of the car.
The purpose of this is so youll always know when you got out of the car, how long you have been parked (in case of parking meters, parking hours etc..) and allows you to navigate to your car so youll never lose it after parking in some obscure location.
This is done with minimalistic text to display that info, and upon pressing it, will activate the task to navigate back to your car. Ill attach a screen shot.

das hat die Person mit
nter Task:

Load App -> Car Home (http://blog.brianmoses.net/2012/10/m...-home-app.html)
Secure Settings -> GPS Enabled
Wifi -> Off
System Volume -> 7
Media Volume -> 15
Auto Brightness -> on
Notification Volume -> 7
Secure Settings -> Keep Display On
Secure Settings -> Keyguard Disabled
Variable Set -> %SEARCHWIFI ~ 0 (Youll see why later)




Exit Task:

Variable Set %HOURSINCE ~ 0
Variable Set %MINSINCE ~ 0
IF - %TIME > 12.00 {
MINIMALISTIC TEXT -> (variable) ampm = PM
Variable Set -> %PARKEDTIME to (%TIME-12.00)
}
else if - %TIME < 12.00 {
MINIMALISTIC TEXT -> ampm = AM
%PARKEDTIME to %TIME
}
end if
MINIMALISTIC TEXT parkedtime = %PARKEDTIME
Secure Settings -> Keyguard Enabled
Secure Settings -> Lock Device
Secure Settings -> Keep display on - never
Kill App -> Car Home
Get Location -> GPS, timeout -> 100seconds
Variable Set -> %PARKEDAT ~ %LOC
Secure Settings -> GPS Disabled
Variable Set %SEARCHWIFI ~ 1

realisiert.

Okay, ich verstehe zwar was er gemacht hat, allerdings nicht wie.

Auf der wikidot.tasker Seite habe ich leider bis jetzt keine Tutorials zu if statements gefunden - so am PC schreiben, dass kann ich (halbwegs), also das hatte ich mal 1 Semester in der Uni.

Aber im Tasker kann ich ja nicht schreiben, sondern nur "if XY set zu XY". Wie kriege ich das hin ? Kann ich das eventuell in eine XML File kopieren (wie auch immer das geht) und die dann einfach laden ?


Ich HOFFE auf eure Hilfe ;)


MfG

Johnny
 
die Bausteine findest du unter "Task". Dort gibt es dann "IF" das mit einem "END IF" geschlossen wird. Zwischendurch kannst du noch per "ELSE" ein oder mehrere "ELSE IF"s reinbasteln oder halt nur "ELSE".
"IF" an den Anfang und "END IF" ans Ende


Code:
A6: If [ %empfangen ~ *Kino* ]
A7: Vorlesen [ Text:Navigation zum Kino wird gestartet. Maschine: Stimme:default:default Stream:3 Tonhöhe:5 Geschwindigkeit:5 Respect Audio Focus:An sofort mit Task fortfahren:Aus ] 
A8: Warte [ MS:0 Sekunden:1 Minuten:0 Std.:0 Tage:0 ] 
A9: AutoVoice Ctrl BT [ Konfiguration:Disabling Headset Sound Paket:com.joaomgcd.autovoice Name:AutoVoice Ctrl BT Timeout (Sekunden):0 Task Weiter Ausführen Nach Fehler:An ] 
A10: Öffne Karte [ Modus:Navigiere zu Adresse:helbingtwiete 7, hamburg lat./long.: Zoom:1 Bezeichnung: ]
...
A16: Else If [ %empfangen ~ *Hause* ]

A21: Else 
.... 
A26: End If
 
  • Danke
Reaktionen: Johnny91
Hey,

vielen dank, unter "Task" hab ich nicht geschaut.


Werde dann nochmal selber probieren da zu basteln, ich kriege davon leider gerade nicht alles hin - am Wochenende mal sehen ;)

MfG

Johnny
 

Ähnliche Themen

G
Antworten
2
Aufrufe
543
MeinNickname
MeinNickname
G
Antworten
9
Aufrufe
595
tapamicha
tapamicha
R
Antworten
2
Aufrufe
556
riker1
R
Zurück
Oben Unten