Quicksilver to Mori

Here’s one way to use Quicksilver to enter information into Mori. This is all taken from Leo’s post, I’ve just added some screenshots to help people out.

  • Get and install Quicksilver
  • Install Text Manipulation Actions plugin by going into Quicksilver’s Plug-ins preferences panel and checking the Text Manipulation Actions plugin.

Quicksilver's Plug-ins panel

  • Add the following Applescript program to ~/Library/Application Support/Quicksilver/Actions/ with the name “in.scpt” (you will probably need to create the Actions folder)
using terms from application "Quicksilver"
    on process text theText
        tell application "Mori"
            tell front document
                set inFolder to entry named "Inbox"
                make new entry at end of entries of inFolder with properties {name:theText}
            end tell
        end tell
    end process text
end using terms from
  • Next restart Quicksilver so it can discover your changes.
  • Now invoke Quicksilver by typing Control-Space. Type ‘in’ to find your script, hit Tab twice, enter your text, and hit the Return key when you are done. The text that you entered has now been added to Mori’s inbox.

Quicksilver to Mori

  • You can modify the above script to include the contents of the clipboard by adding these lines.
set clipboardText to the clipboard as text
make new entry at end of entries of inFolder with properties {name:theText, note:clipboardText}

Acting on text in Quicksilver

Another way to add text in Quicksilver is to invoke Quicksilver then hit "." (period) to put it into text mode. You can then enter any text you want, or paste the clipboard. Once you're done, tab to the Actions pane, type the first letter or two of your Applescript and hit enter. (This is the method Merlin Mann documents on 43folders.com).

it's the same number of keystrokes as Jesse's example, but I find it faster since Quicksilver only has to search the Actions folder instead of the entire drive for your Applescript.

I haven't figured out how to enumerate Mori folders in Quicksilver, but you can easily create several scripts, each of which stick the text into a different Mor folder.

--
Leo Laporte
Chief TWiT

Tryin’ it...

Yeah, that works a treat. Ta.

Useful!

This is amazingly useful. I've created a modified version that places the typed text into the body of the note and uses the first 60 characters for the title:

using terms from application "Quicksilver"
on process text theText
tell application "Mori"
tell front document
set inFolder to entry named "Inbox"
set theTitle to ((characters 1 thru 60 of theText) as string)
make new entry at end of entries of inFolder with properties {name:theTitle, note:theText}
end tell
end tell
end process text
end using terms from

What I'd like is to have the ability to define the title by using some code at the end of the title text. For instance, to write:

This is the title||This is the body of the note.

Or something of the sort.

here it is

This version will break the note at the first "||", or whatever characters you set in the line marked below. Also I added a check for whether or not there is an "Inbox" and it makes one if there isn't.


using terms from application "Quicksilver"
on process text theText
tell application "Mori"
tell front document

--make sure there's an inbox to receive the new entry
if exists entry named "Inbox" of root entry then
set inFolder to entry named "Inbox" of root entry
else
set inFolder to (make new entry with properties {name:"Inbox", content type:"public.folder"})
end if

--breaks the entry into two.
set saveDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"||"} --change this string to change which characters separate the title and note. If you leave it out the note will be empty, and everything you type will go into the title. If you start your typing with these characters, you're entry will be untitled, and everything will go into the body of the note.
set theList to every text item of theText
set AppleScript's text item delimiters to saveDelim
try
set theTitle to item 1 of theList
set theText to item 2 of theList --erase this line if you want the title to be included in the body of the note as well
end try

make new entry at end of entries of inFolder with properties {name:theTitle, note:theText}
end tell
end tell
end process text
end using terms from

Script needs tweaking?

Your script is very useful but it seems there's been a change in Mori causing the script not to compile. It fails at this line:

set inFolder to (make new entry with properties {name:"Inbox", content type:"public.folder"})

I changed "content type" to "content" and it worked, but instead of creating a folder it made a document and put the new note into that.

The script works fine if there is an existing folder called "Inbox".

"content type" has become

"content type" has become "kind". If you change that then I think it should work OK.

Tweaked script

Here's my version of the script. This one breaks title vs contents based on the first newline in the text - you can insert a newline in Quicksilver's text entry by hitting option-return. It also adopts the Inbox check of the previous posted revised script.


using terms from application "Quicksilver"
    on process text theText
        set delims to AppleScript's text item delimiters
        set AppleScript's text item delimiters to ASCII character 10
        set theLines to every text item of theText
        set AppleScript's text item delimiters to delims
        set theTitle to first item of theLines
        set theBody to ""
        repeat with i from 2 to count of theLines
            set theBody to theBody & item i of theLines & return
        end repeat
        tell application "Mori"
            tell front document
                if exists entry named "Inbox" then
                    set inFolder to entry named "Inbox"
                else
                    set inFolder to (make new entry with properties {name:"Inbox", kind:"public.folder"})
                end if
                make new entry at end of entries of inFolder with properties {name:theTitle, note:theBody}
            end tell
        end tell
    end process text
end using terms from

--
And remember, no matter where you go, there you are.
-Buckaroo Banzai

Mmm...

This isn't working for me unfortunately; here's what I do:
- I bring up quicksilver
- Search for in.scpt (which is in the actions folder in quicksilver app support) which contains this applescript:

using terms from application "Quicksilver"
on process text theText
tell application "Mori"
tell front document
set inFolder to entry named "Inbox"
make new entry at end of entries of inFolder with properties {name:theText}
end tell
end tell
end process text
end using terms from

- Then I press tab twice as suggested and a third box doesn't appear, it just switches between the two boxes (there's no 'process text' box at all.)

I then tried Leo's method, but that didn't work either, I entered text in the first box, then tabbed to the next, selected in.scpt, and pressed enter, nothing happens in mori....

Any help would be much appreciated, thanks.

Quicksilver - Service Menu Module

You can also use the "Service Menu Module" plugin to completely avoid AppleScript (picture).

works perfectly... but is there a way to add column info?

The Service Menu Module plugin works great -- adding a new entry is just invoke Quicksilver, type the title, hit return.

Is there a way to automatically assign a due date to these entries? Or any other column selections?

Putting a colour label to note from Quicksilver into Mori Folder

Simon NZ

Building on what has gone before - thanks very much guys (esp.Kevin)- and ....
After much messing about, this works for me. I have several scripts to push the note into several different folders and assign colours to them. Then I can use a Smart Folder to pull all RED notes from all folders - RED being ( for me ) "Requires your urgent attention".

This script is called PersonalRED.scpt for me in my QS Actions Folder.

using terms from application "QuickSilver"
on process text theText
set delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ASCII character 10
set theLines to every text item of theText
set AppleScript's text item delimiters to delims
set theTitle to first item of theLines
set theBody to ""
repeat with i from 2 to count of theLines
set theBody to theBody & item i of theLines & return
end repeat
tell application "Mori"
tell front document
set inFolder to entry named "Personal"
make new entry at end of entries of inFolder with properties {name:theTitle, note:theText}
tell entry named theTitle
set label to red label
end tell
end tell
end tell
end process text
end using terms from

SideNote : I noticed QS was taking up a lot of resources and tried to live without it. Now I have QS back (after 2 days of pain!) and have closed Mail(work) and Entourage(personal) and only open Mail and Ent a couple of times per day to read email rather than having them constantly running and interrupting. I get more done now with QS and without Mail and Ent.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.