AutoTools Enable/disable one service | AutoInput action

Discussion in 'AutoApps' started by Damianek420, Jul 27, 2020.

  1. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    10
    Likes Received:
    0
    Hello.

    I'd like to turn on/off just one service without specifying the others.
    I tried Custom setting/autotools set services/settings put secure enabled_accessibility_services
    But I have to give them all the ones that are on, otherwise it will turn them all off.

    Second question about AutoInput. Here is short VID showing the problem


    (edit)
    I solved the first problem. I've written 2 tasks to check this
    Code (Text):
    <TaskerData sr="" dvi="1" tv="5.9.3.beta.4">
        <Task sr="task114">
            <cdate>1595873548730</cdate>
            <edate>1595876519954</edate>
            <id>114</id>
            <nme>_service.add</nme>
            <pri>100</pri>
            <Action sr="act0" ve="7">
                <code>548</code>
                <Str sr="arg0" ve="3">Please specify the service first!</Str>
                <Int sr="arg1" val="0"/>
                <ConditionList sr="if">
                    <Condition sr="c0" ve="3">
                        <lhs>%par1</lhs>
                        <op>13</op>
                        <rhs></rhs>
                    </Condition>
                </ConditionList>
            </Action>
            <Action sr="act1" ve="7">
                <code>137</code>
                <Int sr="arg0" val="0"/>
                <Str sr="arg1" ve="3"/>
                <ConditionList sr="if">
                    <Condition sr="c0" ve="3">
                        <lhs>%par1</lhs>
                        <op>13</op>
                        <rhs></rhs>
                    </Condition>
                </ConditionList>
            </Action>
            <Action sr="act2" ve="7">
                <code>547</code>
                <Str sr="arg0" ve="3">%serviceAdd</Str>
                <Str sr="arg1" ve="3">%par1</Str>
                <Int sr="arg2" val="0"/>
                <Int sr="arg3" val="0"/>
                <Int sr="arg4" val="0"/>
                <Int sr="arg5" val="3"/>
            </Action>
            <Action sr="act3" ve="7">
                <code>235</code>
                <label>Get enabled services</label>
                <Int sr="arg0" val="1"/>
                <Str sr="arg1" ve="3">enabled_accessibility_services</Str>
                <Str sr="arg2" ve="3"/>
                <Int sr="arg3" val="0"/>
                <Str sr="arg4" ve="3">%enabled_services</Str>
            </Action>
            <Action sr="act4" ve="7">
                <code>547</code>
                <Str sr="arg0" ve="3">%enabled_services</Str>
                <Str sr="arg1" ve="3">:%serviceAdd</Str>
                <Int sr="arg2" val="0"/>
                <Int sr="arg3" val="0"/>
                <Int sr="arg4" val="1"/>
                <Int sr="arg5" val="3"/>
            </Action>
            <Action sr="act5" ve="7">
                <code>123</code>
                <Str sr="arg0" ve="3">settings put secure enabled_accessibility_services %enabled_services</Str>
                <Int sr="arg1" val="0"/>
                <Int sr="arg2" val="1"/>
                <Str sr="arg3" ve="3"/>
                <Str sr="arg4" ve="3"/>
                <Str sr="arg5" ve="3"/>
            </Action>
        </Task>
    </TaskerData>
     
    Code (Text):
    <TaskerData sr="" dvi="1" tv="5.9.3.beta.4">
        <Task sr="task115">
            <cdate>1595873548730</cdate>
            <edate>1595878015038</edate>
            <id>115</id>
            <nme>_service.rem</nme>
            <Action sr="act0" ve="7">
                <code>548</code>
                <Str sr="arg0" ve="3">Please specify the service first!</Str>
                <Int sr="arg1" val="0"/>
                <ConditionList sr="if">
                    <Condition sr="c0" ve="3">
                        <lhs>%par1</lhs>
                        <op>13</op>
                        <rhs></rhs>
                    </Condition>
                </ConditionList>
            </Action>
            <Action sr="act1" ve="7">
                <code>137</code>
                <Int sr="arg0" val="0"/>
                <Str sr="arg1" ve="3"/>
                <ConditionList sr="if">
                    <Condition sr="c0" ve="3">
                        <lhs>%par1</lhs>
                        <op>13</op>
                        <rhs></rhs>
                    </Condition>
                </ConditionList>
            </Action>
            <Action sr="act2" ve="7">
                <code>547</code>
                <Str sr="arg0" ve="3">%serviceRem</Str>
                <Str sr="arg1" ve="3">%par1</Str>
                <Int sr="arg2" val="0"/>
                <Int sr="arg3" val="0"/>
                <Int sr="arg4" val="0"/>
                <Int sr="arg5" val="3"/>
            </Action>
            <Action sr="act3" ve="7">
                <code>235</code>
                <label>Get enabled services</label>
                <Int sr="arg0" val="1"/>
                <Str sr="arg1" ve="3">enabled_accessibility_services</Str>
                <Str sr="arg2" ve="3"/>
                <Int sr="arg3" val="0"/>
                <Str sr="arg4" ve="3">%enabled_services</Str>
            </Action>
            <Action sr="act4" ve="7">
                <code>598</code>
                <Str sr="arg0" ve="3">%enabled_services</Str>
                <Str sr="arg1" ve="3">:%serviceRem</Str>
                <Int sr="arg2" val="0"/>
                <Int sr="arg3" val="0"/>
                <Int sr="arg4" val="1"/>
                <Str sr="arg5" ve="3"/>
                <Int sr="arg6" val="1"/>
                <Str sr="arg7" ve="3"/>
            </Action>
            <Action sr="act5" ve="7">
                <code>123</code>
                <Str sr="arg0" ve="3">settings put secure enabled_accessibility_services %enabled_services</Str>
                <Int sr="arg1" val="0"/>
                <Int sr="arg2" val="1"/>
                <Str sr="arg3" ve="3"/>
                <Str sr="arg4" ve="3"/>
                <Str sr="arg5" ve="3"/>
            </Action>
        </Task>
    </TaskerData>
     
    Just Run them and set par1 as package/service format
     
    Last edited: Jul 28, 2020
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Glad you figured the first one out!
    About the second one, do you mean that the AutoInput action should click that accessibility button on the navigation bar? Unfortunately I don't think accessibility services can click on buttons there, sorry :(
     
    Damianek420 likes this.
  3. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    10
    Likes Received:
    0
    I've tried to get around this problem somehow but I have no idea how to deal with it. Well, maybe somebody's gonna come up with a solution. But thanks for your help and for the best app in years!
     

Share This Page