Thursday, November 09, 2006

AutoHotkey + Lifehacker = Not enough sleep :)

The life flowed around peacefully ... until I read this article on My mind could not rest until I analyzed the usability of the small utility. I have not felt such urge to try something new for a long time. Perhaps too long.

I saved the page to my account today yesterday at 14:57:27 (2:57:27 PM). Since that time my life just started to speed up.

There were minor obstacles in the way, but they melted away by my fury (getting syntax highlighting into Notepad++ was one of them, but that's another story). When the source first appeared before me like a new continent, covered in a veil of mystery (no comments, save a few obvious), waiting to be conquered.

I threw the ';' seeds and the grass began to grow. New '{' branches appeared on the main trunk and bugs crawled from under the rocks. The creation took about 8 hours and you can now admire it's beauty.

dnc.ahk, dnc.exe

If you have AutoHotkey installed, get the 'dnc.ahk' file, otherwise grab the executable. Controls are simple. Everything starts with a 'CTRL+ Numpad *' (sorry notebook users) and ends either by pressing 'Escape' or by focusing the mouse on the point you wanted. The 9 sectors, that appear on screen, map to the numeric area of the keyboard (keys 1-9, 1 is bottom left).

Hope you enjoy it. Comments and critique welcome.

Original source by Adam Pash. Thanks a lot for inspiration.

Update: Since the flash sharing widget is so flaky (see comments) I've replaced it with direct links to the files. Should have done that this way from the start. But the widget was easier to set up. Sorry. Won't happen again.

Labels: , ,


Blogger Miodrag said...

very nice script.

just make it little customizable and thats it :)

Anonymous Anonymous said...

This is very, very nice, I'm using it now to post :-) However do you think you could make either the "." or "+" numpad keys cause a double click. Double clicking seems to be the only thing I cant do.

Blogger BitShepherd said...

Thanks for the suggestions.

Used it a little myself and double clicking is a feature, that will definitely be added ASAP :)

Blogger Tracy said...

Very nice improvement over Adam's script! If it had multi-monitor support I'd be using it right now.


Blogger Grymoire said...

Okay, I couldn't wait. I admit it, sometimes I'm impatient. I added the following code to your script to get multi-monitor support. The code came from a freeware script at DonationCoder.

; Get the monitor resolution
If (monitorLeft<l)
If (monitorTop<t)
If (monitorRight>r)
If (monitorBottom>b)

Anonymous Anonymous said...

Very nice program though without a double click option it's not really useful...

Will check if such feature was added so you better add one! :P

Anonymous wersdfxcv said...

nice work.
a month ago i actually programmed a utility that does the exact same thing, using C#

it basically hijacks your Capslock (i also have an LWIN key version), and draws the 3x3 grid like your script does. but instead of using the numpad it uses the WERSDFXCV keys, so your left hand never needs to move.

if you want i can send you the program. i dont have a blog so i can't write about it, but i'll gladly supply the program if this kind of utility can gain any popularity. as for the source code, i accidentally destroyed the 3x3 grid code when i wrote a "midpoint" version (it moves to the midpoint between its current horizontal/vertical position and the edge with each successive keypress of E/S/F/C). and my code is beyond ugly. if you want this version i can send it to you too.

currently i use neither... because my laptop's capskey is OEM-modified, so it doesn't send KEYUP events. normally though, when you hold caps, it launches the grid. when you release, it terminates the loop.

if you're interested, by all means reply to my comment; ill check back in a while.

kudos again for the script; it does almost everything i tried to do (im a terrible programmer)... unfortunately it still doesn't work with my capslock :(

Anonymous Anonymous said...

Damn Flash!

I have a Flash blocker and was searching for the download link for an hour till I figured out what was the problem.

Anonymous Anonymous said...

I've been looking for some time for a program/script like yours. And found this page on a search. It sounds good, but could you PLEASE SHARE YOUR CODE WITH US?? I do some ahk coding, and would like it for my own use. Your say you put the code on, but instead there was only a page of other links, such as 'XSL Transformations'. I also spent 30+ minutes o google searching for it, to no avail. could you post the actual real link, if it exists? And wouldn't it have been better to post it on the AHK site? Or email me a copy of the AHK code? Thanks

Blogger Vijay said...

Grymoire thanks for the multi-monitor fix!

I applied it and works well... though the numbers now don't correspond exactly to the grid in the first selection, instead you've to intuitively choose left or right side of the numbers.

Can the author integrate this into the code yet?

Blogger Dimitris said...

This comment has been removed by the author.

Blogger Dimitris said...

This comment has been removed by the author.

Blogger Duane said...

I'm really excited to try this out, but I can't find the dl link anywhere. I've disabled my Flash blocker (thx, anon. for the tip) and still nothing, even in IE.

Even if we can't have the code, please at least post the file somewhere we can get it. Thanks.


Anonymous Anonymous said...

ops.. well.. great script... however could you please remove the xls flowchart which I am not sure how got from my desktop into your widget :)

Anonymous Anonymous said...

..a second thought - if I can replace the mistakenly uploaded xls sheet with a blank one that easily - I could do this with the ahk or the exe files uploading some malicious exe or script with the same names... correct me if I am wrong... but if this is the case I consider this quite an insecure way of sharing files at

Blogger BitShepherd said...

I'm currently in contact with support to resolve the mistakenly uploaded file.

wersdfxcv> You can send it to vorkronor who has an email account at (hope this won't get me any more spam than I already get). Although I don't do C# my JAVA programming skills should help me understand it. If you knew how to draw to the screen using JAVA, I'd rewrite that in NO TIME. 'Cause JAVA rocks (and has excellent dev tools)!

other peeps> It's not closed source or copyrighted or anything, so feel free to hack at it as you see fit and blog about it!

Likely future evolution: The program has become so unwieldy in autohotkey, that if there's any update it will be in JAVA. Having no propper objects and no real IDE is a PITA and a showstopper. I just have to find a way in JAVA to draw the lines to the screen. Somehow.

Anonymous Anonymous said...

I have tried explaining the issue to the support guys at but they keep on pasting me the same template:


Thank you for your message.

Go to and login to your account. Go to the 'My Files' tab, locate the file you wish to unshare, right click the file and select the 'Unshare' option.

Please feel free to get back to us for any further assistance

The team

Tricky because the "Unshare" option is available only for files uploaded by myself in my shared folders - not when I browse to someone else's shared folder.
However, I believe that files uploaded by the creator of a shared folder can be replaced with newer versions ONLY by the creator of the folder which means that we do not have a security problem. It is unusual to me though that anyone else can add files to this folder without restrictions.

Anonymous Anonymous said...

wow. just discovered this. have been using mousekeys for years. i gave up the mouse many yrs ago b/c i was using a laptop so much and the silly little joysticks in the keyboard and the tuoch pads sucked. i have so many little known kybd shortcuts in my arsenal... i would never have discovered these if it weren't for giving up the mouse all those yrs ago. it also led me to txt based browsers like links, elinks and w3m which are fantastic. hell, i've even given up the windows shell as of vista- i boot into cmd.exe instead. i am so glad you took the time to make this little utility. thank you!!

Anonymous Anonymous said...

there's a program called "Numpad Mouse" that does all
this and more. you can actually store mouse coordinates
and then jump to them. it is a way better solution than
this approach. plus you can drag and double-click. you
can do that with dnc or mouser. not only that, but you
can actually Ctrl-click. even mousekeys can't do that.

Blogger johny radio said...

This comment has been removed by the author.

Blogger johny radio said...

this is the error i get:

Blogger BitShepherd said...

I think, that this gets called when you change the hotkey in the Settings window. Changing it again could repair it. Otherwise you can try to get the latest version of autohotkey and run the '.ahk' script directly.


Post a Comment

<< Home