Livecode Enhancements pack - error after update
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Livecode Enhancements pack - error after update
I bought the LiveCode enhancement package last November. I just now started to use it (the "magic palette"), with LC 9.6.9-rc3.
Now I tried to update it and I get this error. Any ideas on how I can solve it?
I tried to install the older one, but that didn't help - I get the same error.
Thanks and regards,
Tom
Now I tried to update it and I get this error. Any ideas on how I can solve it?
I tried to install the older one, but that didn't help - I get the same error.
Thanks and regards,
Tom
Re: Livecode Enhancements pack - error after update
Not ideal, but I solved it by re-install LiveCode and the enhancement package.
Re: Livecode Enhancements pack - error after update
Did you restart LC after the installation?
That fixed it for me.
That fixed it for me.
Re: Livecode Enhancements pack - error after update
Yes, I tried restarting it. I tried it with the v 10 DP that I have installed as well, to no avail.
-
- VIP Livecode Opensource Backer
- Posts: 44
- Joined: Wed Aug 01, 2007 2:15 am
- Location: Tucson Arizona US
Re: Livecode Enhancements pack - error after update
Hi, I too bought the Enhancements Pack last fall. I am just getting around to exploring EMLParser and the only info I found on it's use is
https://livecode-lessons-copy.screenste ... -emlparser
Where can I find the full EMLParser documentation?
The full documentation is important as I need to extract the dates associated with an email? (Ditto Title, Sender, Recipient)
from the above URL I see two functions it has, emlToArray() and getFullMailContentAsHTML()
I would like to see any others associated with it and the full parameter set and explanation of these two above.
Marc Bossiere
https://livecode-lessons-copy.screenste ... -emlparser
Where can I find the full EMLParser documentation?
The full documentation is important as I need to extract the dates associated with an email? (Ditto Title, Sender, Recipient)
from the above URL I see two functions it has, emlToArray() and getFullMailContentAsHTML()
I would like to see any others associated with it and the full parameter set and explanation of these two above.
Marc Bossiere
“You do what you do out of your own private passion for the thing itself”
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
Re: Livecode Enhancements pack - error after update
If you install the external, the Dictionary will be updated with the documentation (Search for 'EML').
it's not a lot - and this is an issue for many of the externals in the 'enhancements pack', there is the absolute minimum documentation possible, and even less in the way of actual examples.
This is all there is for EMLparser, it may be what you need so do check the dictionary.
it's not a lot - and this is an issue for many of the externals in the 'enhancements pack', there is the absolute minimum documentation possible, and even less in the way of actual examples.
This is all there is for EMLparser, it may be what you need so do check the dictionary.
-
- VIP Livecode Opensource Backer
- Posts: 44
- Joined: Wed Aug 01, 2007 2:15 am
- Location: Tucson Arizona US
Re: Livecode Enhancements pack - error after update
Thanks. Duh... I'm sure this was a lapse of memory on my part!
Visiting the Dictionary entry was very helpful. Still it's pretty paltry information there, I find. I tried
and get an empty result. I tried playing with other functions of EMLParser and can't seem to get much more than the body of an EML file.
Any ideas?
I've built the test stack as per:
https://livecode-lessons-copy.screenste ... -emlparser
What I'm after, primarily, is basics like to:, from:, title:, and date/time stamps
Visiting the Dictionary entry was very helpful. Still it's pretty paltry information there, I find. I tried
Code: Select all
put getHeaders(field "fileurl") -- a valid pathname of an EML file
put getHeaders(it) -- the imported text content of an EML file
Any ideas?
I've built the test stack as per:
https://livecode-lessons-copy.screenste ... -emlparser
What I'm after, primarily, is basics like to:, from:, title:, and date/time stamps
“You do what you do out of your own private passion for the thing itself”
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
Re: Livecode Enhancements pack - error after update
I can confirm that getHeaders() returns EMPTY, BUT this is becaue that function returns an ARRAY!
So this is a documentation bug! :-/
Please report this as a bug here: https://quality.livecode.com
You can extract your infos like this:
See attached screenshot from my debugger.
So this is a documentation bug! :-/
Please report this as a bug here: https://quality.livecode.com
You can extract your infos like this:
Code: Select all
...
answer file "EML"
put url("binfile:" & it) into tData
put emlToArray(tData) into tArray
put tArray["headers"] into tHArray
put tHArray["From"] into tFrom
put tHArray["To"] into tTo
## etc...
...
Re: Livecode Enhancements pack - error after update
Well, even easier :
See all keys of that array in my screenshot.
This is from Apple Mail, so the keys may differ on your machine.
Code: Select all
...
answer file "EML"
put url("binfile:" & it) into tData
put getHeaders(tData) into tHArray
put tHArray["From"] into tFrom
put tHArray["To"] into tTo
## etc...
...
This is from Apple Mail, so the keys may differ on your machine.
Re: Livecode Enhancements pack - error after update
I just reported this as a bug: https://quality.livecode.com/show_bug.cgi?id=24490
-
- VIP Livecode Opensource Backer
- Posts: 44
- Joined: Wed Aug 01, 2007 2:15 am
- Location: Tucson Arizona US
Re: Livecode Enhancements pack - error after update
Wonderful! Thanks, Klaus. I do not understand arrays very well, but I did successfully get all the parts I needed (sort of!)
I cobbled this together from what you sent and the tutorial I was originally following:
As you can see from the above (performed on a simple email), the result has all the elements I wanted (thanks to you) but I cannot seem to figure out - from the keys you posted a screenshot of - how does one get the Body of an email? I get it in HTML format but would prefer just plain text.
I cobbled this together from what you sent and the tutorial I was originally following:
Code: Select all
on mouseUp
answer file "EML"
put url("binfile:" & it) into tData
local tEMLArray, tBody
put emlToArray(url("file:" & field "fileurl")) into tEMLArray
put getFullMailContentAsHTML(tEMLArray, false, true ) into tBody
put getHeaders(tData) into tHArray
put tHArray["From"] into tFrom
put tHArray["To"] into tTo
put tHArray["Subject"] into tSubj
put tHArray["Date"] into tDate
put tHArray["Content-Transfer-Encoding"] into tContent
put tTo & CR & tFrom & CR & tSubj & CR & tDate & CR & CR & tBody
end mouseUp
“You do what you do out of your own private passion for the thing itself”
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
Re: Livecode Enhancements pack - error after update
Bonjour Marc,
the BODY (= the content of a mail) is the first key of that array, see my screenshot:
Please try this and report back.
Best
Klaus
the BODY (= the content of a mail) is the first key of that array, see my screenshot:
Code: Select all
...
put emlToArray(url("file:" & field "fileurl")) into tEMLArray
## This should give you the body in plain text, don't have an example with html to test here:
put tEMLArray["content"] into tBody
## Since my test mail contained UMLAUTS, and yours will surely contain some accents etc if in french, I had to:
put textdecode(tBody,"utf8") into tBodyClean
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 44
- Joined: Wed Aug 01, 2007 2:15 am
- Location: Tucson Arizona US
Re: Livecode Enhancements pack - error after update
Hi Klaus
I'm a little confused. I am unable to get plain text with your suggested line
put textdecode(tBody,"utf8") into tBodyClean
It appears to remain the same as tBody (HTML)
Marc
I'm a little confused. I am unable to get plain text with your suggested line
put textdecode(tBody,"utf8") into tBodyClean
It appears to remain the same as tBody (HTML)
Marc
“You do what you do out of your own private passion for the thing itself”
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
A Dillard (source: https://educheer.com/essays/annie-dillard-s-handed-my-own-life/)
Re: Livecode Enhancements pack - error after update
Hm, works here, but may highly depend on the mail itslef.
I just tried with some html emails and in the end some of the tEMLArray did not even contain the key -> content !?
I just tried with some html emails and in the end some of the tEMLArray did not even contain the key -> content !?
Re: Livecode Enhancements pack - error after update
See my screenshot:
tEMLArray["parts"][2]["content"] -> the plain text body
tEMLArray["parts"][3]["content"] -> the htmltext body
???
Not sure if this is a bug or a feature...
tEMLArray["parts"][2]["content"] -> the plain text body
tEMLArray["parts"][3]["content"] -> the htmltext body
???
Not sure if this is a bug or a feature...