• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

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

darkpixie

Lurker
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: ?

Java:
<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.
 
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.
 
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.

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.
 
Back
Top Bottom