Hi, y'all,
I've gotten good tips here before, so I thought I'd give something back...
Yesterday, my boss, (whom I've been trying to convert from AmiPro)
complained that there wasn't a button to cycle through text colors. Sounded
like a good idea to me, so I wrote this macro. To use it, just paste th
text into a macro and attach it to a toolbar button. When you press the
button, the word containing the insertion point will cycle through the
available colors. Holding down the shift key will cycle the colors in
reverse order. If you have a block of text selected, the color change will
apply to the whole selection.If the insertion point is not inside a word,
the color change will apply to any text subsequently typed from that
insertion point.
Here's the macro code:
Declare Function GetKeyState Lib "USER32.DLL"(nVirtKey As Long) As Integer
Sub MAIN
Dim x
x = CharColor()
If GetKeyState(16) < 0 Then
If x = 0 Then
x = 16
Else
x = x - 1
End If
Else
If x = 16 Then
x = 0
Else
x = x + 1
End If
End If
FormatFont .Color = x
End Sub
Y'all enjoy, now!
Bruce Adams
... It works better when you turn the brightness up.
-*- TurboEDIT v1.11a [MSP96]
--- ProBoard v2.15 [Reg]
---------------
* Origin: Cortland's Remote (NY) (3-Nodes-1#-Win95-V.34's) (1:260/742)
|