|
-
May 12th, 2002, 09:54 AM
#1
Thread Starter
Frenzied Member
Spliting data
I am working on my own msn messenger.. but i want to split some info that i get from the server to go to some new variables :S
MSG Hotmail Hotmail 348
MIME-Version: 1.0
Content-Type: text/x-msmsgsemailnotification; charset=UTF-8
From: Jeroen
Message-URL: /cgi-bin/getmsg?msg=MSG1021213648.24&start=9940&len=456&curmbox=ACTIVE
Post-URL:****************
Subject: sdsdds
Dest-Folder: ACTIVE
From-Addr: **********@hotmail.com
id: 2
i want to get the SUBJECT.. and the FROM info :S can anybody oh and the from adress might be usefull to help me with it?
-
May 12th, 2002, 10:56 AM
#2
-= B u g S l a y e r =-
VB Code:
Private Sub Command1_Click()
Dim sArr() As String
Dim sTmp As String
Dim sMsg As String
Dim sFromInfo As String
Dim sFromAddress As String
Dim sSubject As String
Open "C:\message.txt" For Binary As #1
sMsg = Input(LOF(1), 1)
Close #1
sTmp = Split(sMsg, "From:")(1)
sFromInfo = Split(sTmp, vbCrLf)(0)
sTmp = Split(sMsg, "Subject:")(1)
sSubject = Split(sTmp, vbCrLf)(0)
sTmp = Split(sMsg, "From-Addr:")(1)
sFromAddress = Split(sTmp, vbCrLf)(0)
Debug.Print sFromInfo
Debug.Print sFromAddress
Debug.Print sSubject
End Sub
assuming the format of the message is constant.
-
May 12th, 2002, 11:19 AM
#3
-= B u g S l a y e r =-
the short and unreadable version
VB Code:
Debug.Print Split(Split(sMsg, "From:")(1), vbCrLf)(0)
Debug.Print Split(Split(sMsg, "Subject:")(1), vbCrLf)(0)
Debug.Print Split(Split(sMsg, "From-Addr:")(1), vbCrLf)(0)
... uh... I need a life...
-
May 12th, 2002, 11:26 AM
#4
Thread Starter
Frenzied Member
thnx.. i needed the last one.. because it will be put in a caption thnx allot m8.. so if i am correct it will get the info after FROM: and in front of a VBCRLF?
-
May 12th, 2002, 11:36 AM
#5
-= B u g S l a y e r =-
yepp
-
May 12th, 2002, 11:38 AM
#6
Thread Starter
Frenzied Member
thnx allot that helped allot ya know.. now i can do much more of the stuff i wanted ... gonna add ya in the special thanks to: :P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|