1. Download our Official Android App: Forums for Android!

How to interact/pass variables into Content inside objects in Tasker

Discussion in 'Android Apps & Games' started by darkpixie, Oct 10, 2017.

  1. darkpixie

    darkpixie Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    7
    Joined:
    Oct 8, 2017

    Oct 8, 2017
    7
    0
    15
    Hi geniuses,

    Inside the Image object I see the - probably Java - code, but it's different from what I know about objects, functions and variables. I would like to replace position etc with variable, but % and %% doesn't work.

    How to access this content below: ?

    Code (Java):
    1. <ImageElement sr=""ve="2"><RectElement sr="background"><Str sr="arg0"ve="3"/><Int sr="arg1"val="0"/><Str sr="arg2"ve="3">#FFFFDB00</Str><Str sr="arg3"ve="3"/><Int sr="arg4"val="0"/><Str sr="arg5"ve="3">#FF000000</Str><Int sr="arg6"val="0"/><Int sr="arg7"val="0"/><geom>-1,-1,-1,-1,-1,-1,-1,-1</geom><flags>4</flags></RectElement><Str sr="arg0"ve="3">tetris02</Str><Img sr="arg1"ve="2"/><Int sr="arg2"val="255"/><Str sr="arg3"ve="3"/><geom>-1,-1,-1,-1,300,100,150,60</geom><flags>4</flags></ImageElement>
    Any kind help would be appreciated, because I dont even know where to start from, besides I did buyed alot of online books about Java lately, just to know belowed Tasker better.
     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,869
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,869
    11,500
    1,988
    Male
    Software developer
    South West of England
    That's not Java. It's XML.
    If your're trying to use this as a configuration file, you need to know the XSD (schema definition), to know what are valid values and elements to use.
     
    darkpixie likes this.
  3. darkpixie

    darkpixie Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    7
    Joined:
    Oct 8, 2017

    Oct 8, 2017
    7
    0
    15
    This code, this content is visible after a button is created in Tasker by using Element -> Create, when I click inside the icon for design. I tried to cut it out and replace all with variable defined before the creation, but %Variable or %%Variable doew not work. The creators did not left that opened just for view it, there is also the icon for variable change nearby on the right, so I think I might be able to switch, but I am lost, I dont know how to start and how to replace for example the position, let's say 100 to %Variable. I dont know the notation, in other places of Tasker, %Variable etc worked, but since its XML like you said, I am lost. Others I think too.
     

Share This Page

Loading...