How to Create an Inbox in Tinderbox

I am a new user of Tinderbox, and I use it mainly for task management at the moment (for note management I use a MediaWiki wiki). I think I have finally found a “task manager” which I can adapt to my needs and not be depended on any or task management app in which I have no degree of control. For example, OmniFocus still does not support tags, Todoist does not really support start dates, and I can do nothing about it. With Tinderbox I can just create a new user attribute and create in effect my own task manager.

Of course, Tinderbox is not perfect, and some useful functionality, especially for task management, is missing. For example, it does not have an Inbox or a scratchpad for quickly writing down an idea while working on something else on Tinderbox or on a different app as Plato65 pointed out on the Tinderbox forum. However, this can be done using an AppleScript!

First, you need to create a Tinderbox note/container in which all your new ideas will be collected. You can name the note “Inbox” or any other way you like. Then you need to copy the URL of the note and adjust the value of the property inboxURL at the start of my script.


After executing the script, a window is shown in which you can write the new Inbox item.

The default option is to just enter the title of the note. If you want to add extra info on the body of the note, after writing the title, you can click on the “Enter additionally the body of the note” button.

If you executed the script while working on another app, at the end this app would become again active.

Some additional comments:

  • The Tinderbox file in which the Inbox note has been created should always be open.
  • The URL (e.g. tinderbox://demo/?view=map+select=1492694214;) of a Tinderbox note is quite fragile because the note’s path is embedded on the URL. As a result, you should not change the position of the Inbox or if you do, then you will need to adjust the value of the inboxURL property.

The AppleScript code is the following:

(*
johnsidi.com

Title: Add a note to Tinderbox's inbox
Version: 1.1 
Changes: Added multi-line text fields
Date: 21 April 2017
 
// REQUIREMENTS
--replace the value of the property inboxURL with that of your own Inbox (Note > Copy Note URL)

*)


property inboxURL : "tinderbox://demo/?view=map+select=1492694214;"

set the clipboard to ""
tell application "System Events"
 set frontmostProcess to first process where it is frontmost
end tell

display dialog "Enter the title of the note:" default answer linefeed buttons {"Enter additionally the body of the note", "OK", "Cancel"} default button 2

copy the result as list to {titleBody, theTitle}

if titleBody is equal to "Enter additionally the body of the note" then
  set theText to text returned of (display dialog "Enter the body of the note." default answer (linefeed & linefeed & linefeed & linefeed & linefeed))
   set the clipboard to theTitle & return & theText
else
  set the clipboard to theTitle
end if

tell application "Tinderbox 7"
   activate
   --open the Inbox container
 do shell script "open " & inboxURL
 delay 0.5
  
   tell application "System Events"
       key code 125 using {shift down, command down} --arrow down
 end tell
end tell

tell application "System Events"
    keystroke "v" using {command down}
 delay 0.5
  key code 53 --Esc 
end tell
delay 1
-- return to the previous app
tell application "System Events"
 set frontmost of frontmostProcess to true
end tell

Finally, in the same spirit, you can change the AppleScript which is embedded in the excellent clip-to-Tinderbox service/workflow from Mark Anderson for all the clippings to be sent to the Inbox.

on run {input}
--replace the value of the property inboxURL with that of your own Inbox (Note > Copy Note URL)

    set the clipboard to input as Unicode text
    
    set inboxURL to "tinderbox://demo/?view=map+select=1492694214;"
    
    tell application "System Events"
        set frontmostProcess to first process where it is frontmost
    end tell
    
    tell application "Tinderbox 7"
        activate
        --open the Inbox container
        do shell script "open " & inboxURL
        delay 0.5
        
        tell application "System Events"
            key code 125 using {shift down, command down} --arrow down
        end tell
    end tell
    
    tell application "System Events"
        keystroke "v" using {command down}
        delay 0.5
        key code 53 --Esc 
    end tell
    delay 1
    -- return to the previous app
    tell application "System Events"
        set frontmost of frontmostProcess to true
    end tell
    
end run

Any comments or improvements are welcome!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: