Thursday, December 20, 2007

The app that launched a ... nother

I'd read about an application called Launchy a few times, while perusing RSS feeds, and thought it had potential. Most recently today. So I thought I'd check it out, after reading this article, which promised quick access to making appointments in my google calendar. Goodie! Just what I've been wanting - I have the Google Desktop sidebar showing the Google Calendar and it has a link to creating a calendar entry, but it's invisible if I have any appointments on the day (unless I pop the calendar out to the side and then scroll down - no longer so quick!).

Of course the main idea of Launchy is launching applications. The way it's set up by default, it will check your start menu and make everything there available to you - press Alt-Spacebar and start typing the name and it will show all matches - not just from the beginning of the word either. This means a long list to scroll through though (all those readme and help files etc that are put in your start menu when you install a program), so I created a new folder and copied only the wanted program file shortcuts to it and then configured Launchy to catalog the files in there instead of the start menu.

I like to listen to internet radio with VLC, so I have some .pls files there too, which I have included in the catalog (by choosing *.* as the file type for that particular directory structure).




All I need to do to listen to the radio is press Alt-Spacebar and type the first few letters of the .pls filename and it will offer me the radio stations from which I can then select the one to open. Unfortunately, I cannot show you a screen-grab, since Launchy disappears as soon as you press any keys on the keyboard...

After giving Launchy the directory to look for the apps I want it to be able to launch, I decided to fiddle around with quick access to Outlook some more. I found some hints and ideas here and did some websearching and then tailored some scripts I found here to suit my purposes.

I now have shortcuts to create new tasks, calendar items, contacts, email (though that's not required, being handled by Launchy already) and notes in Outlook. It launches an empty appropriate form for you to fill out.

Then there's the scripts that are like the quick-add for google calendar, to add notes and tasks to Outlook by just typing in one line of text which the script parses and then creates the note or task accordingly.

And then there's my masterpiece: finding and displaying a contact quickly. This is something I have been looking for for months, if not years. I'd hoped there'd be a google desktop gadget to do it (there's not), or the google desktop search would do it (I haven't been able to figure out how), or failing all that, that the Plaxo search function would do the trick (nope - can't get it to work), albeit inside Firefox. So today, I spent some time writing a vbscript (my first time with vbscript!) that will search my Outlook contacts for a string it will ask me for, and then display the first entry it finds in the normal Outlook Contacts form. Yay!

Then, being on a roll, I thought I would write a batch file (remember them????) to open all the applications/files/directories that I need open when I'm working. OK, I admit I had to look up how to do that - it's been a while since I wrote a batch file. A looooooooong while. But I got it all working: Now all I have to do is press Alt-Spacebar and start typing "DoWork" (the name of my batch file) and press enter when it's found and it launches all the things I need when I'm working. Beautiful!

Launchy is, of course, free.

Now I just have to decide whether or not to keep Twitter...

8 comments:

ashamel said...

Excellent stuff.

So you just have to copy new program shortcuts into this custom directory when you install them and that it?

I do wonder about backing up all these scripts and macros somewhere, so you can move computer. Is that easy?

Bianca said...

That's right. Though you don't have to go to even that much trouble if you don't want to.

I have this folder in one of the directories that is regularly backed up, so no problem there.

dertyp said...

sounds great, but.....where is the script you mentioned for searching outlook contacts? :)

thanks in advance

Bianca said...

I have called this file OLFindcontact.vbs

Just copy from call Main downwards into an empty text file and name it with a 'vbs' extension.

call Main

'finds the first occurrence of a name in Outlook Contacts folder and displays its contact card
'can search by first or last name or both or parts thereof

Sub Main()
Dim objApp
Dim objNS
Dim objContacts
Dim colItems
Dim objItem
Dim strName
Dim strWhere
Dim blnFound

' get folder to search
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objContacts = objNS.GetDefaultFolder(10) 'olFolderContacts

strWhere = "[FullName] <> vbNullString"
Set colItems = objContacts.Items.Restrict(strWhere)

'get name to search for - if there's one you search for repeatedly you can put it in
'the default string, which is inside the last set of quotes (currently empty) -
'on the next line
strName = InputBox("Find a Name in Contacts","Find Contact","")
If strName <> "" Then
For Each objItem In colItems
'make sure it's the right item type
If TypeName(objItem) = "ContactItem" Then
If InStr(UCase(objItem.FullName), UCase(strName)) > 0 Then
objItem.Display
blnFound = True
Exit For
End If
End If
Next
End If

If Not blnFound Then
MsgBox "Not Found"
End If

Set objItem = Nothing
Set colItems = Nothing
Set objContacts = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Sub

cassidy79 said...

Hi!
These vbscripts are really great, but do you know if it is possible to avoid that extra window? I mean, is it possible to type in the arguments like "@category subject" directly in launchy to add that task immediatly? I'm new to vbscript and I couldn't find out, maybe you know?

thanks

Bianca said...

Yes, it is possible to have the script get its input from the command-line, thereby allowing you to enter the string directly into Launchy. I've updated the Task script for myself as a test and it works great. If you want a copy, let me know and provide your email so I can send it to you.

cassidy79 said...

Wow, thank you very much, that would be great! I tested some things myself but always ended up with some errors and didn't get it to run.
Please send to: cassidy79(at)gmx.de

Thanks

clintgeek said...

I'd like a copy of the one that takes the command line input. I couldn't figure out how to email you. Excellent script, thanks in advance. clint -(at)- clintgeek -(dot)- com Thanks so much!