AutoNotification From your desktop browser: set clipboard or ring your phone

Discussion in 'Guides / Examples / Ideas Forum' started by c727, Jan 30, 2017.

  1. c727

    c727 New Member

    Joined:
    Jan 30, 2017
    Messages:
    2
    Likes Received:
    0
    about:
    • set clipboard text on your phone from your pc/ browser
    • ring your phone in case you are missing it
    requirements:
    • Chrome/ Firefox on your desktop
    • IFTTT Account
    • Tasker
    • AutoNotification
    • IFTTT app
    configure IFTTT:
    • create a new applet
    • for "if" choose maker, for event name set "to_tasker_on_phone"
    • for "that" choose notification and set it to "@tasker|=-=|{{Value1}}|=-=|{{Value2}}|=-=|{{Value3}}"
    • go to maker settings to get your key for the bookmarks: https://ifttt.com/services/maker/settings -> your key is maker.ifttt.com/use/<<your IFTTT maker key>>

    configure Chrome/ Firefox:
    • add a bookmark named "phone: ring" with following url:
    Code (Javascript):
    javascript:
    var iftttKey = '<<your IFTTT maker key>>';
    var iftttAction = 'to_tasker_on_phone';

    var makerUrl = 'https://maker.ifttt.com/trigger/' + iftttAction + '/with/key/' + iftttKey;
    var data = 'value1=' + encodeURI('ring');
    fetch(makerUrl,
    {
        method: 'POST',
        mode: 'no-cors',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        body: data
    });
     
    • add a bookmark named "phone: set clipboard" with following url:
    Code (Javascript):
    javascript:
    var iftttKey = '<<your IFTTT maker key>>';
    var iftttAction = 'to_tasker_on_phone';

    var txt = prompt('Text for clipboard:', '');
    if (txt != null) {
        var makerUrl = 'https://maker.ifttt.com/trigger/' + iftttAction + '/with/key/' + iftttKey;
        var data = 'value1=' + encodeURI('set_clipboard') + '&value2=' + encodeURI(txt);
        fetch(makerUrl,
        {
            method: 'POST',
            mode: 'no-cors',
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            body: data
        });
    }
    configure Tasker:
    • enable notification interception for AutoNotification
    • create a profile with event -> plugin -> AutoNotifcation -> Intercept: Apps = IFTTT
    • create a task
    Code (Text):
    1) Variable Set: Name %tmp to %antextbig
    2) Variable Split: Name %tmp to |=-=|
    3) If: %tmp(1) eq @tasker
    4)   If: %tmp(2) eq set_clipboard
    5)     Set Clipboard: Text %tmp(3)
    6)     Flash: Clipboard set
    7)   Else If: %tmp(2) eq ring
    8)     Play Ringtone: Type Alarm
    9)  End If
    10)AutoNotification Cancel: Id: %anid
    11)End If
     
    Last edited: Jan 31, 2017

Share This Page