AutoInput SwiftKey haptic feedback toggle

Discussion in 'AutoApps' started by ondas, Feb 20, 2015.

  1. ondas

    ondas New Member

    Joined:
    Feb 19, 2015
    Messages:
    4
    Likes Received:
    0
    Hi,

    I am using AutoInput to toggle haptic feedback in SwiftKey when I get to work. It works perfectly in portrait mode, but doesn't work in landscape - AutoInput clicks different button in 'Language and input' settings depending on phone orientation. I.e. in portrait it clicks "SwiftKey keyboard" (bringing up Swiftkey settings), but in landscape it clicks "Current keyboard" (bringing up dialog to choose what keyboard is being used).

    I tried different setting for AutoInput Action (button text, id etc.) but nothing works. Maybe I need to scroll down in landscape first? But I don't know how to do that...

    Here is my task (sorry for Czech in AutoInput Action labels, but I don't have my phone in English :)):

    Switch SwiftKey haptic (31)
    Run Both Together
    A1: Perform Task [ Name:Unlock display Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
    A2: All Settings
    A3: AutoInput Action [ Configuration:Stored Action: Nastavení - 'Jazyk a zadávání' - Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
    i.e. 'Language and input'
    A4: AutoInput Action [ Configuration:Stored Action: Nastavení - 'Klávesnice SwiftKey' - Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] i.e. 'SwiftKey settings'
    A5: AutoInput Action [ Configuration:Stored Action: Klávesnice SwiftKey - 'Zvuk a vibrace' - Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] i.e. 'Sound and Vibrations in SwiftKey settings'
    A6: AutoInput Action [ Configuration:Stored Action: Klávesnice SwiftKey - 'Vibrace při stisku klávesy' - Click Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] i.e. 'Vibrate on keypress'
    A7: AutoInput Global Action [ Configuration:Action: Back Package:com.joaomgcd.autoinput Name:AutoInput Global Action Timeout (Seconds):20 ]
    A8: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A9: AutoInput Global Action [ Configuration:Action: Back Package:com.joaomgcd.autoinput Name:AutoInput Global Action Timeout (Seconds):20 ]
    A10: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
    A11: AutoInput Global Action [ Configuration:Action: Back Package:com.joaomgcd.autoinput Name:AutoInput Global Action Timeout (Seconds):20 ]
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,472
    Likes Received:
    796
    Can you show me how your "Language and input" screen looks like in portrait and landscape? Thanks
     
  3. ondas

    ondas New Member

    Joined:
    Feb 19, 2015
    Messages:
    4
    Likes Received:
    0
    See attached...

    Red boxes show what AutoInput clicks in portrait (and what it should click in landscape as well), orange boxes show what it clicks in landscape instead. As you can see, in landscape it's actually one swipe down on the 'second' screen.

    Screenshot_2015-02-20-12-26-48.png Screenshot_2015-02-20-12-27-03.png Screenshot_2015-02-20-12-27-11.png
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,472
    Likes Received:
    796
    Yeah, it clicks that because it also has the text and the correct button is not visible. :)
    When you're setting it up, do you get an option to click by list position? Also, try to set it up inside the task itself and not using a stored action, please.Thanks
     
  5. ondas

    ondas New Member

    Joined:
    Feb 19, 2015
    Messages:
    4
    Likes Received:
    0
    Hm, so I tried to set it up inside the task (via Easy setup) and it provided me with list position option (list position no. 8). However, this also only works in portrait, not landscape.
    Having thought about my scroll down theory, I guess it doesn't make sense :) Otherwise the task would crash one step earlier - when clicking Language and input settings (which is also way down in the menu)...
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,472
    Likes Received:
    796
    What I would do is make it scroll once on the text Klávesnice SwiftKey and only then click it with position 8. That'll probably work both in landscape and portrait :)
     
  7. ondas

    ondas New Member

    Joined:
    Feb 19, 2015
    Messages:
    4
    Likes Received:
    0
    Ok, so after some trial & error I was able to get it to work :) Actually what did it for me was not clicking list element by id, but by text name. I just added one more scroll forward before this click - so the task scrolls down a little bit, then another bit and only then performs clicking action. And I also had to do a scroll forward in Swiftkey settings, but that was obvious by then :)

    I assume that the task itself would be phone (menu) dependant, but the general idea is:
    language settings -> scroll to a text in the middle -> scroll to a text a little bit lower -> click SwiftKey settings (using 'Nearby text' parameter to make sure AutoInput clicks the right option).

    Maybe not the most elegant solution, but it's working in both portrait and landscape :)

    Thanks a lot for help!
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,472
    Likes Received:
    796
    Glad you got it! :)
     
: SwiftKey

Share This Page