Tag Archives | Tech

Get your bookmarks into shape

This isn’t a SQL related post, but it’s helpful so I’m going to post it.

This post assumes that you are using Firefox and your bookmarks have gotten out of control. It’s time that we do a little cleanup.

The first thing you need to do is download an add-on called Xmarks. That piece of advice along with using Firefox is worth the price of admission alone. Xmarks allows you to sync your bookmarks between multiple computers and is very helpful when you have ever have to rebuild your computer as you can just get them back once you reinstall Xmarks and sync with the server. This doesn’t replace normal backups but it’s a nice safety net and useful feature. It also syncs passwords if you use that feature, but I haven’t seen it fully catch every password in my experience. I guess it’s possible that using Xmarks in the first place might have created more duplicates, but I’ll hold off on saying that until I see what it does after I clean it up.

So at this point we have Firefox with the Xmarks add-on is installed, registered and our bookmarks are synced up with the server.

I have always needed to get my bookmarks in order, and I finally saw a post on Lifehacker that got me going. The sad thing is that it adds a toolbar, but you can always use it for it’s purpose and then get rid of it. The add-on can be downloaded directly from Firefox or by going here or here.

Once you’ve gotten it installed then it’s time to get down to cleaning out your closet. My main purpose was removing duplicates, but it also has a feature to check for bookmarks that return ‘File not Found’, ‘Server Not Found’, and ‘Timeout’. That could probably be a bit more tasking on your network to go hit all those sites but if you are at home that’s not a big deal.

Removing Duplicates

I’ll start off with a couple of negatives that aren’t deal breakers but do add to the time it takes to clean things up. When you click the IB icon and select ‘Check Duplicates in This Toolbar’ the window that it returns is way larger than the screen. You have to drag it to fit the screen size you want to work in. This may not be happening for everyone but it did happen for me.

DropDown Image

Once you’re past that point, you’ll find the biggest negative I have found. Let’s say it returns something that looks like this:

Well, you could just click each little check box besides the last one but surely there’s a better way. I’m used to using tab or the down arrow and hitting the space bar (or enter) when I want to do something repetitive like this. Maybe there’s a way that I haven’t found but please add a comment if you do because you could help others with the same problem. Of course, you wouldn’t get to use this brief intro to AutoHotKey that I’m giving. I’m sure there are better intros but you’ll have to suffer through mine for now. AutoHotKey is going to give us the ability to go through this a little faster than clicking every check box, so if you can get around the front-end time of writing the script you’ll save time on clicks in the end. I’ll provide the scripts that I have used as well.

Go ahead and download AutoHotKey. The Installer will work just fine for our purposes. Install the program and accept all the defaults. Feel free to hit the Readme if you want to learn a little more about it.

I think it’s a good idea to go ahead and create a specific folder on your computer for these scripts, because you’ll always know where to find them if you choose to use this program for something else.  Call it AHKey or whatever, just remember where you put it. Now fire up notepad or notepad++ (even better) and copy the text below into the document.

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;    Template script (you can customize this template
;      by editing “ShellNew\Template.ahk” in your
;        Windows folder)

#NoEnv
; Recommended for performance and compatibility
; with future AutoHotkey releases.

SendMode Input
; Recommended for new scripts due to its superior
;speed and reliability.

SetWorkingDir %A_ScriptDir%
; Ensures a consistent starting directory.

This is how it is suggested that you begin each script so I just went with that.  Basically, we want to use this program to simulate a mouse click, mouse move, mouse click, etc. Go ahead and add the following code directly after the SetWorkingDir line.

+2::
MouseClick, left
MouseMove, 0, 24, 0, R
MouseClick, left
return

In English, that means that when I hit shift and the 2 key perform the following actions: Click the left mouse button, move the mouse 24 pixels down and click the left mouse button again.  So in my right hand I’m holding the mouse arrow over the first check box. With my left hand I hit Shift-2 and the magic happens. This isn’t that big of a deal until you get to where you have thousands of bookmarks with 2-4 duplicates each, and that was the case for my bookmarks.
You could modify it to do four check boxes like this:

+4::
MouseClick, left
MouseMove, 0, 24, 0, R
MouseClick, left
MouseMove, 0, 24, 0, R
MouseClick, left
MouseMove, 0, 24, 0, R
MouseClick, left
return

So once you’ve saved your files (with the .ahk extension), double click the file to active the script. It will minimize into your system tray so you can go there when you need to close it. You can find ways to change the hot keys and do other things by reading through the documentation and website for AutoHotKey.

Hope that helps someone else out.

Comments { 0 } Posted on April 16, 2010 in Tech