Parse .msg outlook file with flutter/dart - dart

I need help running this python code in a windows flutter app
import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
msg = outlook.OpenSharedItem(r"C:\test_msg.msg")
using the win32 package, as I can't understand how to use it... I'm quite sure it's doable since this is available in the package and seems to be what is needed...

The most easiest way is to automate Outlook for that like the Python code does. Be aware, the code mentioned make sense only for Windows machines. The COM technology doesn't exists on other platforms.
Also you can find the MSG file format described in depth in MSDN. So, you may search for existing parsers over the internet or create your own.

Related

Send Commands to Delphi Application with Lua Script

I would like to be able to access TButton TCheckBox TEdit etc.. of a running Delphi application from a Lua script.
It is a retail Delphi application so I have no access to the source code. I would normally use AutoHotKey but would like more control.
Is this possible as I seem to be able to change things with the Enabler below. Could it be done by integrating Lua into a Delphi app and use it to send to the retail Delphi app ?
Or is there another way ?
An open source solution would be best so to make it available to others.
I use Reaper DAW and it has API for Lua scripting I would like to be able to do similar with the Delphi app without the API available.
In order to run any script in a specific application then that specific application needs to have suitable scripting capabilities built into it in order to be able to interpret that script accordingly.
Now I'm guessing that "retail" application you are using doesn't have LUA scripting built into it otherwise you probably wouldn't be here.
So I'm afraid that the answer is no. You can't interact with a third part application from LUA script unless that application is designed to work with LUA scripts.

How can I distribute my program if it has dependencies?

So I recently wrote a chat bot which relies on lua and luasocket to respond to a twitch stream's chat. It's very basic and has various files it reads/writes to. It runs from the local computer. I finally got it working perfectly and now I'm interested in potentially distributing it to streamers who would get the most practical usage out of it.
But I can't just give them the files and lua script; they wouldn't be able to run it. They would need an interpreter and they would need to set up luasocket. With very little experience this is a very daunting task. Even I struggled to properly get luasocket working to make this bot.
So my question: Is there a way to package the lua interpreter and luasocket library such that I can give my bot to other people in an easy to use and practical manner? Preferably a .exe file, but really anything that doesn't require them to go out and set up the entire language and script dependencies on their own.

Using COM from an F# script

How do I use COM libraries from an F# script? Is it even possible? How do I reference the required COM libraries in an .fsx file?
More specifically, I'd like to use InstallShield Automation from a build script. Despite all my efforts, I could only get it to work with a regular compiled project.
Edit: I already tried the COM type provider project. However, it doesn't seem to find any types in the particular COM library I'm interested in. If it's a bug or intended behavior, I don't know.
I think possibly maybe the COM type provider might help you out:
One advantage of this method is that you can author and deploy F#
scripts without having to pre-generate the interop assemblies. Another
advantage is that you can easily explore all the COM components
installed on your machine via intellisense.
And yes I did just google it, which OP also might have done before asked here.

How can I use Application Recovery and Restart in Delphi?

MSDN states that "ARR is designed for C and C++ developers." After googling around for a while, I could not find any Delphi example for ARR. Is it possible to use ARR in a Delphi application?
Haven't tested this, but as far as there are headers for it, it should work. For implementing it, you can get the JEDI API Headers that contains JwaAppRecovery.pas unit, covering the Application Recovery and Restart API.
Yes, it's a regular Windows C-style API. A quick Google search reveals that InnoSetup supports it, so there should be your Delphi source code example, too.

How to convert ODT to DOC/RTF without openoffice.org

Is there any way to convert odt documents to doc or rtf on linux without openoffice or any library that relies on having openoffice installed ?
OpenOffice.org and its derivatives (LibreOffice, Symphony, etc) currently have one of the best converters between ODF and the Microsoft formats (besides the ODF support built into MS Office).
If those converters are not an option for you, you can choose between some alternatives: Foremost you might want to check out the KOffice project which also offers command line tools for file conversion:
KOffice - File Filters
Then there is another open source project with a free BSD license available on SourceForge:
OpenXML/ODF Translator
This project offers not only add-ins for Microsoft Office, but also a stand-alone command line version which also runs on Linux.
Then there would also be a different approach: You can automate Google Docs using command line tools:
googlecl: Command line tools for the Google Data APIs
Google Docs file conversion have internally been based on the OpenOffice.org file filters, but as far as I know they have been replaced by Aspose, a library for document formats.
Aspose is available in several versions, and as you have a Linux dependency you might want to check out their Java version.
Aspose.Words for Java
The library has its price, but you won't find another library that is not a full office suite with that quality.
If you don't want to use OpenOffice, Google Docs is your best bet. Cross-platform, web-based, and free, it takes about 2 minutes. You would upload the file, and check convert, then redownload as a doc or pdf (depends on what you want).
http://docs.google.com/
You could try this freeware (Docx2Rtf) and run it under WINE.
Checkout unoconv. It relies on OpenOffice.org its core, but it doesn't rely on any GUI packages. I assume this is what you want?
Use http://zamzar.com/ It has great support for all those formats. And is not reliant on any other installed program.
And of course, being a web page, it will work on any OS.

Resources