Slickrun as a poor-man's Quicksilver

104 views
Skip to first unread message

dmc

unread,
Jan 22, 2006, 2:51:51 PM1/22/06
to 43 Folders
One of the things I really miss when I'm on XP at work is Quicksilver.
I've grown very used to launching programs and appending to text files
from the keyboard. I'd looked for a while to find anything similar on
the PC side and came up short.

The closest I've come is an application called Slickrun[1]. It's a
nice little program that lets you start programs and execute some
simple command-lines. I have configured it to use the same trigger-key
combination that I have set on Quicksilver so I'm not learing anything
different that will confuse my muscle memory. My most-used
applications are now set up so they can be launched from the keyboard
Quicksilver-stype. To start a browser and launch Gmail, I just type:
ctrl-space gm <return>. ctrl-space sync <return> will synchronize a
partiular folder on my desktop with one on USB stick.

So I was able to satisfy my need to launch programs with the keyboard,
but Quicksilver's APP command was just not as easilly reproduced.

How Slickrun works is you simply define the command you are going to
create, the program that will run, and option directory and parameters.
So the Gmail one looks like this:

command: gm
filename: http://mail.google.com/mail/
path: -blank-
parameters: -blank-

Over on the Slickrun forums, someone posted a way to append to a file
[2]. The downside is, each command will only append to a specific
file. It looks like this:

command: app
filename: cmd
path: c:\Documents and Settings\MYUSERNAME\My Documents
parameters: /c echo $I$>>todo.txt

The $I$ is the stuff you've typed in after the command. If I type it
"app get milk on the way home", it will put "get milk on the way home"
at the end of the file todo.txt in "My Documents". This is pretty
good, but the limitations on the filing into one file is a pain. As
far as I can tell, Slickrun only accepts one parameter so defining the
filename on the command-line isn't a possibility.

My question for anyone comand-line gurus out there, do you have any
ideas about how I could get around Slickrun's limitations and allow me
to do something like: app filename.txt "get milk on the way home". I
was thinking a batch file may work, but I haven't looked into that too
far. Anyway, if anyone had any ideas, I'd love to hear about them.


One more feature Slickrun has is the ability to run several commands
with one command. What I've been doing up to this point is running a
command which runs two other commands. The two other commands will put
the date and the time into the file I have defined in the "app"
command. So I type "ctrl-space timestamp <return>app "get milk darn
it" <return>" This gives me something like this in my append.txt file:

Sun 2006 Jan 22
14:42:41.60
get milk darn it

If there are any users of Slickrun out there, do you have any tips on
how you use it?

[1]http://www.bayden.com/SlickRun/
[2]http://www.bayden.com/bbs/

JoshD

unread,
Jan 22, 2006, 3:30:55 PM1/22/06
to 43 Folders
Well, a quick solution, as I see it, is to set up a number of files as
repositories, and make different "app" commands for each one. You won't
be able to append to any file you like, but you can at least catch the
most likely culprits with a little forethought.

dmc

unread,
Jan 22, 2006, 4:02:03 PM1/22/06
to 43 Folders
That's pretty much how I've been handling it. Another though I had was
to put a manual tag at the start of the text to indicate where it
should end up.

Do something like:

app @phone - contractor about hardwood
app wgift - ipod case
app @errand - get the milk
app @waiting - rebate from Staples

I'd end up with a file like this:

@phone - contractor about hardwood
wgift - ipod case
@errand - get the milk
@waiting - rebate from Staples

Later I could sort the file, and then cut/paste the grouped entres into
the appropriate file.

Hmm, that may work. I'll play around with it. Thanks.

GTD Wannabe

unread,
Jan 22, 2006, 7:39:47 PM1/22/06
to 43 Folders
Ahhh, can't resist a batch challenge :) Love your description of
slickrun; I keep meaning to blog about it, but can't quite get there.

Anyway, I've created a simple batch file that takes in two parameters:
filename and text. I'm able to run this from slickrun, even though it
only allows for one parameter. The date and time are also
automatically inserted.

Couple of points:
1. This assumes that the batch file is in the same directory as the
text files you're going to write to.

2. The text to be input to the text file must be enclosed in quotes.
This is the only way for the batch file to see that whatever follows
the filename is one argument. I've put in some scripting goodness
(just found online tonight) that strips off the quotes in the final
file.

Here is the batch file. Copy and paste what's between the lines into
app.bat and put it in the directory with your target files.

======================================
:: GTD Wannabe
:: Command to append text to a file
:: 22 Jan 06
:: In response to:
http://groups.google.com/group/43Folders/msg/68b3cc8169188eb4
::
:: First param is name of the file, including extension
:: Second param is the text to be appended to the file
::
:: Assumes that this command will be run in the same directory as your
target text files

:: Filename is first param
set filename=%1%

:: Remove the quotation marks from the second parameter
set text=%2%
set textclean=%text:~1,-1%

:: Write the current date/time and second parameter text to the
appropriate text file

:: These two lines put the date/time and text one one line. Remove the
:: if that's what you want.
::echo %date% %time% %textclean% >> %filename%
::echo. >> %filename%

:: These lines put the date on a line, time on a line, and text on a
line. Add in :: if you don't
:: want it done this way. See block immediately above.
echo %date% >> %filename%
echo %time% >> %filename%
echo %textclean% >> %filename%
echo. >> %filename%
======================================================
Note: there's a couple of the comment lines that wrap around in this
format - you'll need to clean them up before running it.

Here is the slickrun command:

command: app
filename: app.bat
startup path: F:\...\ <== wherever you hid the batch file
parameters: $I$

I run it this way: get the slickrun prompt up, then

app testing.txt "Get the darned milk!"

The testing.txt file now looks like:

Sun 22 Jan 06
19:37:40.60
Get the darned milk!
<blank line>

Hope this works for you! It was fun :)

dmc

unread,
Jan 23, 2006, 9:45:48 AM1/23/06
to 43 Folders
That's funny, I left an anonymous comment on your blog just yesterday
morning.

Your script looks great, I haven't tested it yet, but reading through
it looks like it is what I want.

You've given me some other ideas. I modified your file and added a
third parameter for tags do my file ends up looking like:

Sun 22 Jan 06 19:37:40.60
Get the darned milk!

Tags: shopping todo lactose

One other thing I have in mind is pasting from the clipboard. There's
a freeware command out there that copies the clipboard to stdout, I
think it was called pclip. It would be nice to add a conditional and
have it check for a specific file, say "read.txt". If that is the file
in parameter 1, have it paste the clipboard rather than paste what is
in parameter 2.

Thanks for the work, it has given me some good idea.

GTD Wannabe

unread,
Jan 23, 2006, 1:25:18 PM1/23/06
to 43 Folders
Have you heard/read of the Slacker Manager hack for using a vbs script
to automatically append to a text file? I wrote about it here

http://gtdwannabe.blogspot.com/2005/12/using-vbs-to-createappend-text-file.html

Right now, it's tied to one specific text file, but maybe you could
tweak it somehow. I don't know enough vbs to play with it. But, it
does have the ability to paste what's on the clipboard into the file.

dmc

unread,
Jan 27, 2006, 12:31:37 PM1/27/06
to 43 Folders
I tried that VBS script when I first heard about it a while ago. I
never warmed to it, it was too out of the flow for me. I think I can
get everything I need with batch files. So far anyway. :)

I'm still playing with this a little bit but I am settling on the
following.

I bring up Slickrun and put in this:

app <tags> <text> <filename>

'tags' are required, 'text' and 'filename' are not.

If I have something in 'text' and leave 'filename' blank, the text gets
appended into a default file named !bigtextfile.txt. If I put in a
filename, the text gets appended to that file.

Here's an example:


<ctrl-space>app "todo" "do something"
app "todo @home" "do something"


Gives me the following in !bigtextfile.txt:

===================================Fri 2006 Jan 27 12:13:24.43=====
do something * tags: todo *

===================================Fri 2006 Jan 27 12:15:19.93=====
get off the couch and eat something * tags: todo @home *

If I leave out both 'text' and 'filename' the contents of the clipboard
will be appended to !bigtextfile.txt.

So, with the above existing example, I did this:


<ctrl-space>app "@review"


And this is what !bigtextfile.txt looks like


===================================Fri 2006 Jan 27 12:21:57.62=====
do something * tags: todo *

===================================Fri 2006 Jan 27 12:22:05.40=====
do something * tags: todo @home *

===================================Fri 2006 Jan 27 12:22:29.56=====

This is copied and pasted text. This is copied and pasted text. This is
copied and pasted text. This is copied and pasted text. This is copied
and pasted text. This is copied and pasted text. This is copied and
pasted text. This is copied and pasted text. This is copied and pasted
text. This is copied and pasted text.

* tags: @review *

What I like about this is it dosn't take me too far out of my workflow.
I don't get as distracted moving to a different window and moving my
hand to the mouse. Once I get on the mouse or into another window, the
path back to what I was originally working on may be longer than I
planned. Maybe I'll just check my email or see what is going on in the
news while I'm away from what I was dealing with. Distractions happen,
anything that keeps me where I'm currently working helps.

GTD Wannabe

unread,
Jan 28, 2006, 4:21:04 PM1/28/06
to 43 Folders
That sounds good dmc. Would you mind posting your batch file? :)

jos...@gmail.com

unread,
Jan 28, 2006, 10:56:02 PM1/28/06
to 43Fo...@googlegroups.com
hmm... I'd like that batch file too

dmc

unread,
Jan 29, 2006, 10:04:23 AM1/29/06
to 43 Folders
Sure. I'll post it later today.

dmc

unread,
Jan 30, 2006, 12:36:09 PM1/30/06
to 43 Folders
I currently use three batch files. I'll eventually consolidate them
into one when I am 99% happy. They are a little sloppy, I'd like the
parameters to be consistent across the files. But they work pretty
well.

All of the files are in the directory where the text files are located.


For the clipboard pasting, I use a program called pclip.exe from this
package:

http://unxutils.sourceforge.net/

It simply takes the clipboard contents and sends it to stdout. You
should be able to put it in the C:\WINDOWS\system32 folder and it will
work.

These batch files require XP/2000 or higher.


The first one is app.bat. This is the one called by Slickrun, here is
the magicword:

MagicWord: APP
Filename: app.bat
Path: <working path>
Parameters: $i$
Notes:

>From Slickrun you would type: app "tag1 tag2" "Text to be appended"
filename with no extension and no quotes.

text and filename are optional

Filename will end up being !filename.txt but the filename would be
entered without the ! or the .txt.

If filename isn't entered, the name will be !bigtextfile.txt.

If the text is entered, we call append.bat
If the text isn't entered, we call clippaste.bat. It isn't set up to
paste the clipbord contents to anything but !bigtextfile.txt, so if no
text is entered no filename would be entered either.

======

:: app.bat
:: First parameter is tags in quotes (optional)
:: Second param is the text to be appended to the file in quotes
:: Third Param is the filename (optional)


:: Assumes that this command will be run in the same directory as your
target text files

:: Tags is first parameter
set tags=%1%

:: Text is second param
set text=%2%

:: Filename (will be in format !filename.txt)
:: if no filename defined, bigtextfile will default
set filename=%3%
IF NOT DEFINED filename set filename=bigtextfile


IF DEFINED text append.bat %filename% %text% %tags%
IF NOT DEFINED text clipaste.bat %filename% %tags%

======

If text is entered, append.bat will be called

The following will be appended to your file:

=============================================Mon 01/30/2006
12:07:14.99=====
text entered in Slickruns * tags: test test2 *


======

:: append.bat
:: Modified from the batch file in this posting:
:: http://groups.google.com/group/43Folders/msg/ead80884d6ac3398


::
:: First param is name of the file

:: Second param is the text to be appended to the file

:: Third param is the tags
:: Called from app.bat

:: Filename is first param ! added to start and .txt added to end
set filename=!%1%.txt

:: Remove the quotation marks from the second parameter
set text=%2%
set textclean=%text:~1,-1%

:: Remove the quotation marks from the third parameter
set tags=%3%
set tagsclean=%tags:~1,-1%


:: Write the current date/time and second parameter text to the text
file
echo.>> %filename%
echo =============================================%date% %time%===== >>
%filename%
echo %textclean% * tags: %tagsclean% * >> %filename%


=======

If no text was entered (and no filename), cliptext.bat will be called
and paste the contents of the clipboard to !bigtextfile.txt with the
tags.

=======

::cliptext.bat
::First parameter is the filename
::Second parameter is the tags
::Called from app.bat

:: Filename is first param
set filename=!%1%.txt

:: Tags is second param
:: Remove the quotation marks
set tags=%2%
set tagsclean=%tags:~1,-1%

:: Write the current date/time and second parameter text to
theappropriate text file

echo.>> %filename%
echo.>> %filename%
echo =============================================%date% %time%===== >>
%filename%
echo.>> %filename%
pclip>>%filename%
echo.>> %filename%
echo.>> %filename%
echo * tags: %tagsclean% * >> %filename%

dmc

unread,
Feb 24, 2006, 8:12:35 AM2/24/06
to 43 Folders
In case anyone was interested, I have tweaked how I use Slickrun to
capture info on the fly that works pretty well for me.

I have the above Magicwords set up to capture information from the
clipboard and to append text to a file. This works well, but what has
really taken this to a new level for me is when I set up Magicwords
for each context.

Here's an example of one:

MagicWord: @COMPUTER
Filename: CMD
Path: C:\Documents and Settings\user\My Documents\Sync\text files
Parameters: /c echo @COMPUTER - $i$>>!todo.txt

I have one of these set up for each context, @home, @errand, etc. Now
when I invoke Slickrun with ctrl-space, all I have to do is type
something like this:

@computer Check order status at Amazon

And this gets appended to my todo textfile:

@COMPUTER - Check order status at Amazon


I end up with a todo list that looks something like this:

@COMPUTER - Add Martin and Orlaff to BB queue
@HOME - March 28 - cable payment due
@COMPUTER - Order Simpsons' season 6
@PHONE - Make orthodontist appointment
@ERRAND - Get white socks
@PHONE - Contractor - bathroom
@HOME - Move box in attic

At the end of the day, I sort this file to get something like this,
everything nicely group together by context:

@COMPUTER - Order Simpsons' season 6
@COMPUTER - Add Martin and Orlaff to BB queue
@ERRAND - Get white socks
@HOME - Move box in attic
@HOME - March 28 - cable payment due
@PHONE - Contractor - bathroom
@PHONE - Make orthodontist appointment


What makes this work so well for me is that it requires very little
conscious thinking. With the batch files, I may have to think about
which file I'm sending the text to or to make sure I format the command
correctly. With the context Magicwords, I only need the context and
the todo text. I've found that when I am doing something and need to
pop something into the todo list, the context Magicwords are so quick
and thoughtless, that I never really leave what I was originally doing.
I never have figure out where I left off because my hands never leave
the keyboard and my mind never really needs to expend much energy
changing gears (changing gears slows me down a lot). The thought is
quickly out of my head and I don't think about it anymore.

Using the context Magicwords also means the todo list gets populated
with consistent data. It is always @CONTEXT - todo text. So the list
is clean, set up correctly and easy to read.

dmc

unread,
Feb 24, 2006, 9:08:33 AM2/24/06
to 43 Folders
One more thing if anyone is listening.

I've been trying out using Slickrun on a USB drive using the process in
this post:

http://www.bayden.com/bbs/viewtopic.php?t=371&highlight=usb+drive

So far it is working pretty well. For Windows 98 machines you need to
change the program from CMD to COMMAND.COM. But other than that, I'm
finding it very useful.

GTD Wannabe

unread,
Feb 24, 2006, 10:43:36 AM2/24/06
to 43 Folders
Dmc, I absolutely love this idea! I never could get in the hang of
using multiple text files, and who can remember complicated parameter
formats? This is just perfect.

It's so good that I had to:
1. post [1] about it on my blog
2. tweak [2] it to suit my taste, immediately, before doing any work
at all!!!

[1]
http://gtdwannabe.blogspot.com/2006/02/slickrun-scratchtxt-ubiquitous-capture.html
[2]
http://gtdwannabe.blogspot.com/2006/02/ubiquitous-capture-tool-at-your.html

dmc

unread,
Feb 24, 2006, 11:39:14 AM2/24/06
to 43 Folders
I'm glad you like it, as I mentioned I'm thrilled with how well it is
working for me. When I'm reviewing my list, I barely remember typing
them in.

I read your post, I like the idea about putting in a check box. I've
got to think about adding that to my Magicwords. It may be something
that I'd use.

Usually the date isn't something I care too much about when capturing.
Some of the stuff I do fairly quickly and I remove them. The longer
term ones get put into Outlook/Pocket Informant with a due date (if
needed) . What works best for me is having the context first, sorting
will group them together in the way that I like. But as you mentioned,
the date could be added to the end.

I like your idea of a word without a context. I think I'll add a word
called '@' that I'll use for the @ANYWHERE context. Thanks!

GTD Wannabe

unread,
Feb 24, 2006, 1:59:26 PM2/24/06
to 43 Folders
I'm definitely listening! I'm keeping track of a list of USB-possible
aps, just in case I move that way in the future. I was just thinking
that it sucks to get all of this keyboard shortcut goodness organized,
only to lose it if you work on another machine. Very sweet :)

GTD Wannabe

unread,
Feb 24, 2006, 2:03:07 PM2/24/06
to 43 Folders
Someone's already posted a comment to my blog post [1] about this. In
it, they show how they use exactly one magicword "@" and make the
context part of the parameter. So they would enter

@ CODE - implement foobar widget

to get

@CODE - implement foobar widget

A couple of more characters on the input side, but saves you from
having to create multiple magic words. I thought it was an elegant
refinement. Note: to try it, I had to name my magicword @@, probably
because there was no way to make @ unique with the other magicwords.

[1] http://gtdwannabe.blogspot.com/

dmc

unread,
Feb 24, 2006, 4:00:10 PM2/24/06
to 43 Folders
I saw that comment, that's about as minimalistic as you can get. And
if my typing skills were better, I would think of adopting it. :) It
is an elegant solution, I like it.

I don't like messing too much with my contexts, I have a fixed number
of them and they don't change that often. I'm pretty boring, my set of
contexts fits most all situations for me. I think too many of them
would start to be counterproductive at some point. With my set of
context Magicwords, things stay neat, simple and organized for me.

GTD Wannabe

unread,
Feb 24, 2006, 4:17:37 PM2/24/06
to 43 Folders
I just like how things have evolved along this thread, from kludge at
the beginning to minimalist elegance at the end :)

Marco Vinicio Rodriguez-Vargas

unread,
Feb 24, 2006, 8:06:26 PM2/24/06
to 43Fo...@googlegroups.com
>[...] For Windows 98 machines you need to
> change the program from CMD to COMMAND.COM. [...]

In ancient (MS-DOS) ages, the %COMSPEC% environment variable had the
path to the command interpreter. It seems that in Windows XP it's
still around since if you type

echo %COMSPEC%

in the command prompt this path is displayed.

That would work if SlickRun supports environment variables.

HTH

--
Marco V. Rodríguez Vargas

dmc

unread,
Feb 25, 2006, 7:25:34 AM2/25/06
to 43 Folders
%COMSPEC% works nicely on XP with Slickrun. I'm going to need to test
it on 98, fortunatly I won't need to do that for a few weeks.

Thanks for that tip.

Reply all
Reply to author
Forward
0 new messages