AutoInput A less newbie question - Screen Unlock Variables problems

Discussion in 'AutoApps' started by scatat, Jul 17, 2016.

  1. scatat

    scatat New Member

    Joined:
    Jul 17, 2016
    Messages:
    5
    Likes Received:
    0
    Ok - so I now have Autoinput working and now I'm trying to do some more complicated stuff.

    The use case is the same:

    - When the wifi is connected to various SSIDs, I want the Location Mode to be set to Power Saving
    - When wifi is not connected, or only connected to temp SSIDs, I want Location Mode to be set to High Accurac

    This was previously achieved using Secure Settings, but this no longer works in Marshmallow - or at least my rooted Marshmallow.

    I am using Autoinput to do this change ( it's somewhat of an ugly hack IMHO but I have no other way available ).

    One of the common cases is that the change will be made WHILE THE SCREEN IS LOCKED.

    This is fine if I simply unlock the screen each time ( using Autoinput's Unlock action ), then lock it, but I want to cover all situations, so the provided variables should work, right? and they are will documented.

    However, they do not seem to be working or I am not using them or mis-understanding them.

    So for example, I am running:

    Code (Text):
    Test task

    1. System Lock  ( tasker action )
    2. Wait 2 Seconds
    3. Autoinput Unlock Screen
      if %aiscreenunlocked ~ locked
    When I run this WITHOUT the IF statement, the screen unlocks but without, it just doesn't execute. It's as if the variable isn't set or isn't set to locked as per the doc.

    I have tried with the varialbe %aiscreen as well to no effect.

    I try to print the vars in a notification but I just get the string "%aiscreenunlocked" rather than the value of the variable.

    I need to know when the variable is set and what it's set to so that I can lock the screen again when the task if finished!

    What's going on?
     
  2. Robert Ryan

    Robert Ryan Member

    Joined:
    Mar 9, 2015
    Messages:
    52
    Likes Received:
    4
    The variable is not going to be set until after the Autoinput action executes.

    Although the Unlock Screen action works well on kitkat phones, I haven't had much luck with it under Marshmallow. The few times I've used it required a reboot to get the phone working again.

    With an unsecure lockscreen you can wake up the phone and bypass the swipe screen by using a Tasker popup action with a 1 second time out.


    Sent from my XT1585 using Tapatalk
     
  3. scatat

    scatat New Member

    Joined:
    Jul 17, 2016
    Messages:
    5
    Likes Received:
    0
    Aha! that is amazingly helpful - thanks. Will try tonight.

    Ah.... that's not documented anywhere - many thanks for the explanation. ( As a workaround, I was using the SCREEN tasker variable until I got some more info from here - works ok ).
     
  4. scatat

    scatat New Member

    Joined:
    Jul 17, 2016
    Messages:
    5
    Likes Received:
    0
    Aha! that is amazingly helpful - thanks. Will try tonight.

    Ah.... that's not documented anywhere - many thanks for the explanation. ( As a workaround, I was using the SCREEN tasker variable until I got some more info from here - works ok ).
     

Share This Page