So I came across a program that lets me get close to what I desire. It drastically helps the entering of repeated text over and over again and can be configured to do way much more then that.
The program, is AutoHotkey.
This is a program that can take various keystrokes, or keystroke combinations to preform various tasks on the computer. You're most likely familiar with CTRL-C, CTRL-V, or maybe even the windows shortcuts WIN-M (minimize all), WIN-L (Lock computer), WIN-E (Open Explorer). The program above can be setup in such a way that you can either change or add to the default hotkeys on your computer.
Another of it's features is the ability to replace text as you type. As I said before I type a lot of SQL code so after setting up the program above, I setup the following "replacements" that definitely help as I manually enter SQL statements.
sf : SELECT * FROMSo if I happen to want all the records from table sUsers where cState = 'NE' and nMajInt = 1234. This is what I would type:
df : DELETE FROM
wc : WHERE cState = 'NE'
ami : AND nMajInt =
sf sUsers wc ami 1234The resulting text into the editor would be:
SELECT * FROM sUsers WHERE cState = 'NE' AND nMajInt = 1234Now if you can't see the time savings in that, your either blind, or don't have to type that much in your day to day activities.
I also use it to do various table manipulations that I often encounter, so I entered the following replacements as well:
atj : ALTER TABLE jlw_x DROP COLUMN nRowIDFor each, all I type is the three letters and a space, the program then automatically replaces them with their associated values. (Keep in mind my examples here are not AutoHotkey scripts, just a way for me to present the functionality)
GO
dtj : DROP TABLE jlw_x
GO
iej : IF EXISTS (SELECT * FROM dbo.sysobjects where id = object_id(N'[jlw_x]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [jlw_x]
GO
AutoHotkey is not just limited to replacing text. Like I mentioned before it can be configured to run pretty much anything on the computer, or to simulate almost any input device. I have a few programs that I almost always want to run when I start the computer (but not always!) So I setup a special Windows hotkey (WIN-Q) that when activated will launch the 7 different programs I need. Or I find that I always open a new notepad session to jot down quick notes either while on the phone or if someones standing nearby and I need to take down info quickly. Therefore I setup CTRL-ALT-N to launch a new notepad session.
I definitely recommend at least trying it out to see if you find it usefull. If you're not very technically inclined there is a very well written guide on its website that details all the various features and how to use them.
No comments:
Post a Comment