Endel S. Leinfiedtz
Joined: 09 Apr 2008 Posts: 3 Location: 2-1/2 Mile Island, PA
|
Posted: Wed Apr 09, 2008 9:02 pm Post subject: The Clipinator |
|
|
Lifehacker recently published the source for an AHK script by one of their readers (ck). It speeds up repetitive copy-paste operations by allowing one to remain in the browser environment. The simplicity of the source just floored me.....
| Code: |
#c::
Send, {CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
sleep, 300
Send, {CTRLDOWN}v{CTRLUP}{ENTER}{ALTDOWN}{TAB}{ALTUP}
return
|
....and I thought, "God Almighty, what a powerful tool!" I went and downloaded AHK, cruised the site and so far can't say a single negative thing about it. Obvious pros generously taking their time to not only help with the queries, but suggesting alternative routes to the same goal; very little of the snarky-flamey-snobby crap that plagues most "communities"; even the occasional idiotic questions handled with aplomb and restraint.
In short, AHK is the kind of thing I'll devote serious study to, and its proponents are the kind of people I'd be proud to be associated with. Consequently, I'd like to contribute my first ham-handed bloatcode, which takes ck's idea 2 steps farther. It sets up 3 hotkeys:
WIN+C copy-pastes the manually-selected text, with 2 linefeeds, a divider ( ========== ) and 2 more linefeeds.
WIN+V selects all, copy-pastes the entire page, again with linefeeds and the divider.
WIN+B inserts a date-time stamp, a linebreak, the URL from the address bar, and another linebreak.
(Obviously, you can easily substitute the editor of your choice for Notepad+.)
| Code: |
#c::
Send, {CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
WinActivate, Notepad+
sleep, 300
Send, {CTRLDOWN}v{CTRLUP}{ENTER 2}=========={ENTER 2}{ALTDOWN}{TAB}{ALTUP}
return
#v::
Send, {CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
WinActivate, Notepad+
sleep, 300
Send, {CTRLDOWN}v{CTRLUP}{ENTER 2}=========={ENTER 2}{ALTDOWN}{TAB}{ALTUP}
return
#b::
Send, {F6}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}
WinActivate, Notepad+
sleep, 300
Send, {F5}{ENTER}{CTRLDOWN}v{CTRLUP}{ENTER 2}{ALTDOWN}{TAB}{ALTUP}
return
|
I've found it pretty handy for researching on the web, and humbly offer it as is. Feel free to critique/shred/crunch/howl-at-the-n00bery-of-it. I've only tested it on 98SE/Firefox2.0/Notepad+ but, from the look of it, it oughta run on about anything Win, yes?
OK, so now that I've contributed my first code, I feel entitled to contribute to the idiotic questions:
"How do you remap the ANY key???"
^o^ ROTFLMFAO ^o^ _________________ Windows Error Messages You Never See #47: "PIBKAC -- Problem Is Between Keyboard And Chair" |
|