Attach character strings to keystrokes?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
dfmead
Posts: 6
Joined: Wed Sep 10, 2003 10:10 pm
Location: El Cerrito, CA

Attach character strings to keystrokes?

Post by dfmead »

My first visit to the forums, and my first question! :D

MS Word allows users to attach a character string to a keystroke. Can TP do this? (I could find no mention of it in the forum, but TP may use unfamiliar terminology for this function.)

For example, most immediately I would like to attach the string

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

to some key combo involving "d," so whenever I have to add it to a new HTML file I can do so instantaneously.

I know I could turn on the macro recorder and attempt to type this string correctly (I can do that in Word, too), but it makes more sense to paste a string into a text window and then simply assign it to an unused keystroke.

Any enlightenment would be appreciated.

Dale Mead
mo
Posts: 306
Joined: Tue Mar 11, 2003 1:40 am

Post by mo »

This is one way to do this. I think more comprehensive even than what you are thinking about.

http://www.textpad.com/forum/viewtopic.php?t=3763

I use it for exactly the task you describe, breaking it down between the header material, title material, initial stuff like navagation bars and scripts, and the footer...plus a great many other on-going things I use all the time in making pages.
Best Wishes!
Mike Olds
User avatar
s_reynisson
Posts: 940
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

And to make it faster, after you've created a clip in some book, goto
Configure->Prefs->Keyboard, in Categories select Clip Library and
in Commands select ClipPaste, Asssign the new shortcut key Alt-9.

The first time you use it, press Alt-0, highlight your clip, press Alt-9.
Repeat as needed with Alt-0-9.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Another way of doing it is to record the keystrokes as a macro and assign that macro to a keystroke...
dfmead
Posts: 6
Joined: Wed Sep 10, 2003 10:10 pm
Location: El Cerrito, CA

character string to keystroke

Post by dfmead »

Thanks for clarifying the TP's keystroke assignment process. I've actually used it before but didn't connect it to this problem. I'll follow your instructions as soon as I work out creating the clip file.
s_reynisson wrote:And to make it faster, after you've created a clip in some book, goto
Configure->Prefs->Keyboard, in Categories select Clip Library and
in Commands select ClipPaste, Asssign the new shortcut key Alt-9.

The first time you use it, press Alt-0, highlight your clip, press Alt-9.
Repeat as needed with Alt-0-9.
dfmead
Posts: 6
Joined: Wed Sep 10, 2003 10:10 pm
Location: El Cerrito, CA

character string to keystroke

Post by dfmead »

Thanks, MudGuard. Actually, I'm trying to avoid recording the keystrokes; I want to cut and paste them as a unit instead. Given the three-line character string I want to insert repeatedly (which has to be exact because it's the universal DOCTYPE comment recognized by browsers for XML), the chance that I will type it flawlessly while recording ranges from zero to slim. And as other "forumers" discuss elsewhere, TP doesn't have a macro editor to speak of, so I'd likely have to repeat the recording until I get it perfect (or record character error deletes as part of the macro).

Dale Mead
MudGuard wrote:Another way of doing it is to record the keystrokes as a macro and assign that macro to a keystroke...
Post Reply