
...but I will try til I got it!
Code: Select all
Structure _FILEDESCRIPTOR
dwFlags.l
clsid.CLSID
sizel.SIZE
pointl.POINT
dwFileAttributes.l
ftCreationTime.FILETIME
ftLastAccessTime.FILETIME
ftLastWriteTime.FILETIME
nFileSizeHigh.l
nFileSizeLow.l
cFileName.c[#MAX_PATH]
EndStructure
Structure _FILEGROUPDESCRIPTOR
cItems.l
fgd._FILEDESCRIPTOR[0]
EndStructure
If OpenWindow(0, 0, 0, 700, 500, "Drag 'n' drop",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
ListIconGadget(1, 10, 10, 680, 100, "Drop Email here", 730)
cf_email = RegisterClipboardFormat_("Internet Message (rfc822/rfc1522)")
cf_content = RegisterClipboardFormat_(#CFSTR_FILECONTENTS)
cf_descrip = RegisterClipboardFormat_(#CFSTR_FILEDESCRIPTOR)
EnableGadgetDrop(1, cf_email, #PB_Drag_Copy)
EnableGadgetDrop(1, cf_content, #PB_Drag_Copy)
EnableGadgetDrop(1, cf_descrip, #PB_Drag_Copy)
EditorGadget(2, 10, 120, 680, 400)
Repeat
event = WaitWindowEvent()
If event = #PB_Event_GadgetDrop And EventGadget() = 1
Select EventDropType()
Case cf_email
ClearGadgetItemList(1)
ClearGadgetItemList(2)
*buffer = EventDropBuffer()
msg$ = PeekS(*buffer)
subject = FindString(msg$, "Subject:", 1) + 9
eos = FindString(msg$, #CRLF$, subject)
subject$ = Mid(msg$, subject, eos - subject)
AddGadgetItem(1, 0, subject$)
AddGadgetItem(2, 0, PeekS(*buffer))
Case cf_content
MessageRequester("Hey", "#CFSTR_FILECONTENTS is working", #PB_MessageRequester_Ok | #MB_ICONINFORMATION)
Case cf_descrip
*fgdBuffer._FILEGROUPDESCRIPTOR = EventDropBuffer()
eml$ = PeekS(@*fgdBuffer\fgd[0]\cFileName)
AddGadgetItem(1, 0, eml$)
EndSelect
EndIf
Until event = #PB_Event_CloseWindow
EndIf
End
Mail just uses StringsOne thing: Why does this (attachments) work with Writestring? I always thought, Writestring makes only sense with strings....
Code: Select all
eml$ = PeekS(@*fgdBuffer\fgd[0]\cFileName)
No need for embarassment Marco, I don't mind helping you figure this out.Marco2007 wrote:1. thanx for your effort. How embarrassing! I hope, I´m not turning nasty.
Yes and no as it involves digging a little deeper. It's not going to be easy since I do not have Outlook to do my trial and errors. There is still hope because Outlook Express has an alternative method for getting the messages but it's a lot more involved. If I can get it to work it should also work for Outlook...I think...I hope....Marco2007 wrote:Have you an idea, how I get the whole message, so I can writestring it?
He means like how Gotham City call for Batman LOLMarco2007 wrote:What? Sky?
What do you mean?