Auto Hot Key

by frank on August 15, 2006

in Tools

Thought I would write a post about one of the most useful tools I have come across – Auto Hot Key. This is an awesomely useful and powerful tool and I haven’t even scratched the surface, but it really comes in handy when programming, so that you can bust out the syntax for that foreach loop/switch statement/do-while just like nothing.

But my favourite use is for debugging. I can just jump to anywhere in my code, write site test;[enter] and I’m all ready to output that database result/globals array/object. With the following entry…

 :oc:site test;::
(
echo "[pre tag] style='color: red' ";
print_r($);
echo "[pre tag]";
) 

It will insert…

echo "[pre tag] style='color: red' ";
print_r($);
echo "[pre tag]"; 

Of course, this is the most simple use of this tool, you just need to browse the website a little to recognise the potential. Enjoy!

(replace the [pre] tags with actual pre tags by the way)

Was this article useful?

rss feed icon

Email this article to yourself or...

rss feed icon

Subscribe to the RSS feed for more useful articles and tips.

Share this article with others

  • del.icio.us
  • Twitter
  • Reddit
  • StumbleUpon
  • Facebook
  • Digg
  • timmow

    Randomly googled your website… could you just use a function to do this? I have a function called debug() which does what you have mentioned…

  • http://deadlytechnology.com franktank

    Correct! You can, the advantage of this technique would be not having to include that function in your code base I guess.