| View previous topic :: View next topic |
| Author |
Message |
flypaper Contributor


Joined: 19 Oct 2001 Posts: 104
|
Posted: Mon Nov 25, 2002 4:46 pm Post subject: I dunno what to do... |
|
|
| I use the vdsipp.dll to connect to a mailbox w/ the POP3 protocol for work. We used to use Netscape mail, and even if the sender was sending mail with HTML on only the text would show up. We have since switched to Outlook to send mail. Now when I get the message it has all the HTML code in it. Got any ideas what broke, or how I can fix it? |
|
| Back to top |
|
 |
flypaper Contributor


Joined: 19 Oct 2001 Posts: 104
|
Posted: Mon Nov 25, 2002 6:27 pm Post subject: |
|
|
This is what comes back btw:
| Code: | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=276315917-25112002><FONT face=Arial
size=2>test message</FONT></SPAN></DIV><br>-----------------------------------------------------------------------<br> |
I only need the part that says 'test message.' How can I easily strip the rest off? And not everyone sends via HTML mail... |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
|
| Back to top |
|
 |
flypaper Contributor


Joined: 19 Oct 2001 Posts: 104
|
Posted: Tue Nov 26, 2002 12:46 pm Post subject: |
|
|
Can someone explain to me how Garret's program works? I guess I don't really understand HTML all that well and one less DLL would be good. Thanks guys!
EDIT - Unless I'm doing something wrong Garret's program just loops. Hmmm |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Nov 26, 2002 9:30 pm Post subject: |
|
|
Maybe a more complete example might help you:
| Code: | DIALOG CREATE,HTML Stripper Example,-1,0,400,253
DIALOG ADD,EDIT,EDIT1,6,4,392,95,,MULTI,SCROLL
DIALOG ADD,BUTTON,BUTTON1,106,4,64,24,Browse
DIALOG ADD,BUTTON,BUTTON2,106,78,174,24,Strip HTML Tags!
DIALOG ADD,BUTTON,BUTTON3,106,260,64,24,Save
DIALOG ADD,BUTTON,BUTTON4,106,332,64,24,Exit
DIALOG ADD,EDIT,EDIT2,134,4,392,95,,MULTI,SCROLL
DIALOG ADD,STATUS,STATUS1,
DIALOG SHOW
LIST CREATE,1
LIST CREATE,2
:evloop
wait event
goto @event()
:BUTTON4BUTTON
:CLOSE
LIST CLOSE,1
LIST CLOSE,2
exit
:BUTTON1BUTTON
DIALOG SET,STATUS1,Working........
%a = @filedlg("Web pages|*.htm;html;shtml|All files|*.*",Select local file)
if @null(%a)
DIALOG SET,STATUS1,IDLE
goto evloop
end
LIST Clear,1
LIST LOADFILE,1,%a
rem %B = @text(1)
DIALOG SET,EDIT1,@text(1)
DIALOG SET,STATUS1,File loaded
goto evloop
:BUTTON2BUTTON
DIALOG SET,STATUS1,Stripping HTML!
LIST Clear,2
List Seek,1,0
%A = @text(1)
Repeat
If @greater(@pos(<,%A),0)
%B = @pos(<,%A)
%C = @pos(>,%A)
%D = @substr(%A,1,@fsub(%B,1))
%E = @substr(%A,@sum(%C,1),@len(%A))
%A = %D""%E
End
until @equal(@pos(<,%A),0)
DIALOG SET,EDIT2,%A
DIALOG SET,STATUS1,Stripping completed.
goto evloop
:BUTTON3BUTTON
goto evloop |
I'm not sure all that works. It's been awhile since I played with this
example. Yes, it loops. It loops until it has gone through the entire
contents of %A and removed any html tags.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Nov 26, 2002 9:53 pm Post subject: |
|
|
This isn't related to the problem at hand, but...
I think we should use a topic title that describes
the problem we're having...
"I dunno what to do..." isn't very helpful when
searching or scrolling thru old posts for info.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|