¤¤¤¤¤¤VB CoDeS¤¤¤¤¤¤
CODES

Getting SN and Text From an Incoming IM Box

AOL% = FindWindow("AOL Frame25", vbNullString)
MDI% = FindChildByClass(AOL%, "MDIClient")
IM% = FindChildByTitle(MDI%, ">Instant Message From: ")
S$ = GetCaption(IM%)
p = Len(S$)
p = p - 23
T$ = Right(Left(S, 33), p)
RICH% = FindChildByClass(IM%, "RICHCNTL")
Q$ = GetWinText(RICH%)
G$ = Right$(Q$, Len(Q$) - (Len(T$) + 2))
A$ = Left$(G$, (Len(G$) - 1))
SN$ = T$
TEXT$ = A$

SendText To Chat With Spaces

YaY$ = " What you want to say with spaces"
AOL% = FindWindow("AOL Frame25", vbNullString)
LIS% = FindChildByClass(AOL%, "_AOL_ListBox")
CHA% = GetParent(LIS%)
EDT% = FindChildByClass(CHA%, "_AOL_Edit")
GO% = SendMessageByString(EDT%, WM_SETTEXT, 0, Chr(160) & YaY$)
SEND% = SendMessageByNum(EDT%, WM_CHAR, &HD, 0)

Get Chat Text Using VBMSG.VBX

Message$ = agGetStringFromLPSTR$(lparam)
SN$ = Mid$(Message$, 3, InStr(Message$, ":") - 3)
TXT$ = Mid$(Message$, InStr(Message$, ":") + 2)

Put the following coding in a timer(Timer.Interval = 1; Timer.Enabled = False):
AOL% = FindWindow("AOL Frame25", 0&)
LIS% = FindChildByClass(AOL%, "_AOL_ListBox")
CHA% = GetParent(LIS%)
VEW% = FindChildByClass(CHA%, "_AOL_View")
Vbmsg.SubClassHwnd = VEW%

Keep Windows Open Using VBMSG.VBX

CallDefProc = False

Put the following coding in the Command_Click procedure, and replace WIN% with the name of the window you are subclassing:
Vbmsg.SubClassHwnd = WIN%

Prevents Duplicate List Items

For i = 0 To List.Listcount - 1
Item$ = LCase$(List.List(i))
List.Listindex = 0
If Item$ = LCase$(Query$) Then MsgBox "That item is on the list.": Exit Sub
Next i
MsgBox "That item has not been found on the list."

Searches A String For A Given Character

For i = 1 To Len(Text)
T$ = LCase$(Mid$(Text, i, 1))
If T$ = LCase$(Query$) Then MsgBox "Your Query is character number " & i
Next i

Load Text From a File

Dim a As Variant 'A will be your file index
Dim b As Variant 'b will be getting the text from the file
On Error GoTo D
a = 1
Open sFile For Input As a
While (EOF(a) = False)
Line Input #a, b
Text.Text = Text.Text + b
Wend
Close a
d:

Save Text to a File

Dim a As Integer 'Will be your file index On Error GoTo C a = 2 Open sFile For Output As a< br > Print #a, Text.Text< br > Close a< br > C:< br >

MAin Page