r/tasker • • 9d ago

Scenes V2 change element image?

The UI of scenes v2 is a little beyond me still. I'm trying to simply have an image change its image source upon clicking; clicking an image changes the image. Any idea? Thank you kindly.

I've tried setting the local address to a variable and have it change with a click. The address does indeed change but it is not reflected visually. I tried to add a task to run to update the scene for that but it's not working either. What am I missing?

3 Upvotes

9 comments sorted by

1

u/Sate_Hen 9d ago

Set this as your task

Task: Pic Scene

A1: Variable Set [
     Name: %image
     To: content://media/picker/0/com.android.providers.media.photopicker/media/1000011536
     Structure Output (JSON, etc): On ]

A2: Show Scene v2 [
     Name/JSON: Pic Change
     Blocking Overlay: On
     Drag Off Screen: On ]

Replacing "content://media/picker/0/com.android.providers.media.photopicker/media/1000011536" wtih your first image

Then in your scene add an image with %image under "image address" Then undre the lighting bolt tab for the image add the action "set variable" on click and change "%image" to the new path

1

u/Yakumo8 9d ago edited 9d ago

I've already mostly tried that. The path is indeed changing as I'm checking it using a toast. The image does not change visually though. A couple of suggested parameters don't seem to be in my Show Scene action, namely the blocking overlay and the drag.

The image would have already changed once I open the scene for editing but not dynamically as the scene is running. So I'm sure my file paths are correct

2

u/Sate_Hen 9d ago

I left everything default on my show scene action so that part should be fine. Below is my scene set up

1

u/Yakumo8 9d ago

Thanks for sharing. It's the same on mine. Perhaps the formatting of the address matters even though it is recognising it with the editor?

My path looks like this

/storage/emulated/0/Download/image.png

Instead of content://...

I don't know

1

u/Sate_Hen 9d ago

Below is my XML

<TaskerData sr="" dvi="1" tv="6.7.9"> <dmetric>1080.0,2400.0</dmetric> <Scene sr="scenePic Change"> <cdate>1795007931935</cdate> <edate>1795015096075</edate> <heightLand>-1</heightLand> <heightPort>-1</heightPort> <lj>H4sIAAAAAAAA/11RYUvDMBD9K3Lgt7F2c47Rb1oVBw4GFRFERkxv7bk0Gbe0uI39dy/Flk3yIffeS+69XI7AznlIjuD3W4QEUmfqysIAKO/RSGDpmA7OemXuDBW2QuuDLhuyyA2yJy0is7IF/pcrl9OakHeQfPRWT2RMRgeE06Dn7pXeFOxqm8st7YxjIXc1r5WWc5/ClWRyRnveaF6pArvILQiJazYCr+lPxEbCPCubmzbGEcq+lk6tepFOG9Kb1lJpT85eiBn6N8Wkvkxo3XRlAp1bo0wdcLTzjoWKsKqN8phHcfSQzhdRqipkFS3fX1bjeDyJZ/HNajS6ncXT6WQyXCyH39tC3GWdTecVf3z3zlCHZ/rAJfBYbf3+KtNo8Wxyzmb97E4DsGIq7JL0VVqGf4LTL+wsVHkBAgAA</lj> <nme>Pic Change</nme> <widthLand>-1</widthLand> <widthPort>-1</widthPort> </Scene> </TaskerData>

1

u/Yakumo8 9d ago

It's my first time importing XML. I'm being told me tasker requires an update or switch to beta. I'm at the latest version. Or.. I'm not proficient enough to understand what's going on

2

u/Sate_Hen 9d ago

You need to save it as a file "something.scn.xml" then long click on the scene tab and import it that way

1

u/Yakumo8 9d ago

Managed to import it, thank you. It was set up exactly like you described and how i had it. The image is not changing though. Might be a bug. Scenes V2 is new after all. Maybe I'll email the dev.

2

u/Sate_Hen 9d ago

Don't think it's that. Just changed mine to /storage/emulated/0/DCIM/Camera/PXL_20240803_115806644.MP.jpg and it still worked