Suche Namen der ausgeführten Task

M

mbefore305

Stammgast
213
Hallo,

evtl. habe ich ja nur Tomaten auf den augen, aber ich finde keine eingebaute Variable die den Namen der laufenden Task trägt.
In einer Task möchte ich wissen, wie die Task heißt, um es einer anderen Task als Parameter zu übergeben.
Es gibt die Variable %TRUN, die enthält aber die Namen aller laufenden Tasks, das hilft dann leider nicht.

Gruß
mbefore305
 
@mbefore305

? Aber die Task benennst du doch selber?
 
Ja, klar. Ich versuche alles möglichst generisch zu programmieren.
Z.B wenn ich die Task umbenenne muss ich das auch im Aufruf der anderen Task.
Gäbe es da eine definierte Variable könnte ich mir das sparen.
 
Ich hatte erst vor kurzem einen task umbenannt welchen ich in einer Szene mehrfach Aufrufe.
direkt nach dem Speichern des neuen Namens kam ein Hinweis von tasker, dass die Szene mit dem neuen task-namen aktualisiert wurde.

ich hab die beta Version, vielleicht ist diese Funktion mit der standardmäßig integriert?
 
Das ist nicht das, was ich suche sondern
Task1 ruft Task2 auf (mit Perform Task)
Task2 soll wissen, welche Task sie aufgerufen hat, also übergebe ich in Perform Task %par1=Task1
Wenn ich später Task1 umbenne muss ich das auch in Perform Task machen.
 
Die Variable %caller ist dass was du suchst.
Im Task2 musst du die Variable %caller1 mit = aufteilen und dann hast du in %caller12 deinen Tasknamen aus Task1.

Task Caller
%caller
A variable array tracing the origin of the current running task. %caller1 gives the origin of the current task, %caller2 the origin of %caller1 etc.

Example: if task A uses action Perform Task to start task B, then when task A is run by pressing the Play button in the task edit screen, %caller1 in task B will show task=A, %caller2 will show ui.

The format of each entry in the array is callertype(=callername(:subcallername))

Caller types ares detailed below:

  • profile
    a profile (when it's state changes). callername is either enter or exitdepending on whether the profile activated or deactivated. subcallername is the name of the profile, if it has one, otherwise anon
  • scene
    a scene event, with callername being the scene name. For element events, subcallername is the element name. For action bar button presses, subcallername is the label if one was given. For scene-global events (e.g. Key), subcallername is event type
  • ui
    the Play button in the task edit screen in the Tasker UI
  • launch
    clicking a child application icon in the launcher
  • nbutton
    a notification action button, either from Tasker's permanent notification or one created with one of the Notify actions.callername specifies the label of the button if present.
  • external
    an external application
  • qstile
    a Quick Settings tile. callername specifies the label of the tile.
  • appshort
    an app shortcut (accessed via long-click on the Tasker icon). callername specifies the label of the tile.
  • task
    another task, from a Perform Task action. subcallername is the task name, if it has one, otherwise anon

Edit: Alte Anwort gelöscht, da sie nicht die gesuchte Lösung war
 

Ähnliche Themen

j3sk0
  • j3sk0
Antworten
2
Aufrufe
236
j3sk0
j3sk0
P
Antworten
25
Aufrufe
1.134
Pentatulim
P
S
Antworten
1
Aufrufe
213
NitramAkloh
N
Zurück
Oben Unten