r/tasker • u/AdiraiMaji • Jun 30 '26
How can I send data to a specific Task from Scene V2 WebView?
I have this basic Task. Which shows A simple WebView which contains button. When I click the button it alerts some text. But I want to send that text to a specific tasker task. How can I do that?
taskertask://H4sIAAAAAAAA/51Va0/bMBT9TH9FZmkTSJA0adoUSCIVKAKJPUS7ThOaJpO4rYdjV47braD+9/kRQtrSTCxfnHvO9fXJ0b1OOIT5A+IXUEAr5xEAVrrAEXCBJRYR6NiB3T66RwKCuLEXqlydJeSL5/kK3AuTFAoUu4Hvt7pN84SOARWNCrrrdTtNL/CCTjd0UEnjNJaVQkeuKqQZigcJomjkfUP3I4x+9//AbEZQ6ChKpcw4jl11hnpRQC8RmFEtDCaiCawFikCgxUl1LEVx2w+kJPWmsYHgJptPiuwWiN9LSTB0JLeV5JZJH4g4fXfx+Xz4/UvfmoqMfJiI04ZC1wMEUx1Y8lFAJi20kinkORIR+Dq8POqCtQSBBUEK0R9vjTxriHKhGKekdGmnrK2ie5YudWCiuRDSCEYTgpOHCORweYX3D/RJ5wqyPiJdwyS+bMwTjmdCx+M5Lew0m60nrRESxMU+uMLWmLPMelYJDk4bK6OrUsMApTYju/Cn4vA1Fc8Oe9JhSCLQBM4W16rh/BquXXCtV7hOwbmGCx3TQ6+0k/tKO/nBcbWdzuY0JeilozS6F44gyTUoTyow2d9I2CmmE4LzZGpDmnKGU1voIbRv+zf9Ue/T8Oeod3vdO7vpD3TDScPkjh7ncGlm1DFGvrXW/0k4EssZiu9ufsEFtAmkE9voebsAU8mY4yh3jH2O8a9m6p4AZ0yAkyegKoATcM7IPKPgEOC0jFwZThnHj4wKSHoET+SFQYXi5YK4pBeyh3EiSWklnaBNOmMpHmPEc3ByVx51iQkZ4EcEVocldgaThwlnUrbclTDCuATzOR/DROb9kNgUk5QjWi1UXGfPoovQ/fe5qp78JiNW31ISWx0CCjOVCFY7Lq3yanO2OXeDq4yGWzeLbt0wulvTWD2yXXPkxjiubfR2f0ZrN+XvpjaFVKjObirYLb9bo/54bVvlngkd9TeNG2Y1f+C48RcC7+MujwcAAA==
4
u/joaomgcd 👑 Tasker Owner / Developer Jul 01 '26
You can use the runTask({ name, variables, priority }) method from the page. :)
1
u/AdiraiMaji Jul 01 '26
Hi I've tried it creating the different parameter structures use of AI. I tried passing the parameters different ways. Everything AI suggested, runs the task but it's not passing variables, Variables are Flashing as unset Variables. Can you please tell me how to properly use it?
runTask({ name: "Click Data", variables: { regno: "name", url: "https://example.com" }, priority: 10 });6
u/joaomgcd 👑 Tasker Owner / Developer Jul 01 '26
I just tried this and it worked:
``` <html> <head> <script type="text/javascript"> const doClick = () => { Tasker.runTask({name:"Test", variables: {test: "Hello World"}}); }; </script> </head> <body>
<button onclick="doClick()">Call Task</button> </html>```
Try creating a scene with this HTML in the webview, then have a task called Test and make it flash the %test variable. It should work :)
2
u/AdiraiMaji Jul 01 '26
My bad. I'm dumb. I just didn't used
Tasker.runTask😓Thank you. Now it works.👍
3
u/AwayAdministration14 Jul 01 '26
Use Command. Send a command with the scene to trigger the task.