AutoTools Web Screens question

Discussion in 'AutoApps' started by zhenurik, Sep 1, 2017.

  1. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I understand how to send 1command from the HTML page. But I need to send 1 command and couple checkbox or sliders value from the page. Could you help me with that? Thanks!

    Sent from my Moto G Play using Tapatalk
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  3. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I was thinking about that but I'm not sure how to hook up checkbox' values to the variables

    Sent from my Moto G Play using Tapatalk
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Do you know how to look up each checked value for each checkbox? If so, just add one after the other. So something like:

    true=:=false=:=true

    etc

    Or if it gets too complicated output the command as JSON and read it from Tasker with the AutoTools JSON Read action. :)
     
  5. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    ok but how to hook it up on the html page? I mean how to set up
    <input type="checkbox" "myVariable=:=" checked> ?
    <input type="checkbox" "myVariable=:=" (unchecked)> ?
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You need to have some sort of event that triggers the command. You'll need to use javascript for that. If you want I can help with that,
     
  7. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I mounted Material Design Light with some pages and and keep checkbox value in HTML5 local storage because:
    1. I have checkboxes on each page
    2. I want to keep their values after app reboot or page refresh.
    So I need to take their values from local storage and somehow link it with variables. And yes I would appreciate if you can help me with that.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Oh, sorry, unfortunately local storage doesn't work on AutoTools Web screens :( That's one thing I couldn't get to work... Sorry!
     
  9. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    Localstorage works perfectly for me...

    Sent from my Moto G Play using Tapatalk
     
  10. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I mean with Web Screens

    Sent from my Moto G Play using Tapatalk
     
  11. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    It does? But only if the web screen doesn't have any variables that you can configure in Tasker, right?
     
  12. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    Did not try it with variables... I let u know how it works for me

    Sent from my Moto G Play using Tapatalk
     
  13. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I confirm Web Screens work with localstorage with no problem with more than one variable. And actually I found answer for original post.
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Really? Can you give me an example of a webscreen you used that with? :)
     
  15. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    I use simple web page that's probably why it woks but that's what I need.. I took this example, pluged in checkboxes and hooked up localstorage. If you need it I can give you the code.
     
    Last edited: Sep 12, 2017
  16. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    But are you using a local file on your device? Would be cool if you could share the file you use :) Thanks
     
  17. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    Yes I use local file as I want to use it as a control panel for other tasks. https://ufile.io/3mt94
    I'm not so programming genius... at least it works... )
     
  18. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  19. zhenurik

    zhenurik New Member

    Joined:
    Jun 21, 2017
    Messages:
    25
    Likes Received:
    0
    Well... I did not know about webscreen variables.. Gonna learn something new )
     
    Last edited: Sep 14, 2017
  20. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Yeah, it's an easy way to send data from Tasker to a web screen. You'll lose local storage though :)
     

Share This Page