Action

Pagico Task

Posted by MarkRussell, Last update over 3 years ago

Add task to Pagico

Steps

  • runAppleScript

    -- AppleScript content
    -- Editing and testing in Script Editor recommended
    on execute(draft)
        do shell script "/Applications/Pagico.app/Contents/Resources/Pagico/external/inbox.mac.sh plaintext Type='Task' Title='[[selection]]' DueDate='today'"
    end execute
  • script

    let [loc, len] = editor.getSelectedLineRange(),
      str = editor.getTextInRange(loc, len),
      icon = '?',
    //  reminderList = 'Inbox', // pick the Reminders list you want
    //  list = ReminderList.findOrCreate(reminderList),
    //  reminder = list.createReminder();
    //  reminder.title = str.trim(); // trim gets rid of end of line (\n), if any
    //  reminder.notes = new Date().toISOString(); // date or whatever you want
    //  reminder.update();
    newStr = icon + ' ' + str;
    editor.setTextInRange(loc, len, newStr);
    // move the cursor to the end of the edited line
    editor.setSelectedRange(loc + newStr.trim().length, 0);
    editor.setSelectedText('');
    // activate is not required if the action is launched via a keyboard button
    editor.activate();

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.