AutoTools send command/flash onload

Discussion in 'AutoApps' started by nmcj, Sep 22, 2017.

  1. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    90
    Likes Received:
    2
    Hiya,

    I am sure this is something simple, but I'll be darned if I can figure it out. I just want to send a command or flash sometcinh once a web screen is done loading.

    Here's my code:

    Code (Text):
    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <script>
    <script src="autotools.js">

    </script><meta http-equiv="cache-control" content="no-cache" /><meta name="autotoolswebscreen" type="variablejs"  id="load" label="Load" defaultvalue="non,fin" />
    </head>
    <body><doctype html=""> <script>
      function func1() {
     
       AutoToolsAndroid.showToast("fin");
       }
     
        window.onload=func1
    </script>
    <center><img alt="hud" height=" 1400" src="flipped1.jpg" /></center>
    </doctype></body>
    </html>
    A simple flash would be great. A command to start another task through autoapps com sys is great too.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Try this:
    Code (Javascript):
    <!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="cache-control" content="no-cache" /><meta name="autotoolswebscreen" type="variablejs"  id="load" label="Load" defaultvalue="non,fin" />
    <script>
    document.addEventListener("DOMContentLoaded", function(event) {
       AutoTools.showToast("fin");
      });
    </script>
    </head>
    <body>
    <center><img alt="hud" height=" 1400" src="flipped1.jpg" /></center>
    </body>
    </html>
    I think that should work :)
     
  3. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    90
    Likes Received:
    2
    Thanks for the quick reply!
    Unfortunately, that's not working. Could it have something to do with that autotoolsfunctions.js file? I have that file in the same directory as the above file, but I don't see it referenced. I am not sure how to if I need to. I apologize for asking such basic questions. This is just not an area I am familiar with.

    Thanks,

    NJ
     
  4. nmcj

    nmcj Member

    Joined:
    Mar 24, 2016
    Messages:
    90
    Likes Received:
    2
    Just giving this a bump. Thanks in advance for any input.

    NJ
     

Share This Page