Thunderbird scripting - scripting

I need to process a number of messages in my Thunderbird.app (Mac OS X Snow Leopard, Intel Core 2 Duo), delete a few based on some criteria, export some others, move a small part of them to a special folder and create a filing hierarchy to go with it all - programmatically.
With Outlook I used to enjoy VBScript + the COM object model: it would do all of the above simply and intuitively.
What can I use to achieve the same with Thunderbird?
If multiple options are available, here are my current preferences in terms of languages (although I can adapt to most things): Python, C++, AppleScript, PHP, Perl, Bash, ...
If I need to move to a Windows box to use .NET and the like, I can (yet I'd imaging the most popular bindings come from the open-source world?!) If there was a command-line tool that did what I need, I'd use that! (thunderbird.sh show messages; thunderbird.sh create folder X as child of folder Y;)

You can develop Thunderbird extensions in a similar way to Firefox extensions in XUL and Javascript.
Try this tutorial.
This tutorial will introduce you to the components of a Thunderbird extension and will show you how to build your own.

You could also look at the tbscript plugin, although it does have external dependencies - it uses Python.

The tutorial linked to in the most popular answer as of today still works, but is outdated.
For current versions of Thunderbird, documentation is at https://developer.thunderbird.net. This has an add-on page that comes with a tutorial for developing a "Hello World" MailExtension.
The MailExtension API is new for Thunderbird 68 (although some parts were published for earlier versions) and allows one to write JavaScript to e.g. handle messages.

If you need a general purpose GUI scripting solution, try Autohotkey, it's very calable.

Related

Is it possible to make a DLL plugin for EditPlus to extend the editor like in EditPlug or Notepad++?

Is it possible to make a DLL plugin for the programming editor called EditPlus?
I wish to extend the editor like in EditPlug text editor or Notepad++ where you create a DLL which allows you to talk to the editor. Or another example is Total Commander where you create a DLL to talk to the program from your own code in delphi or visual c++, or any program that can create a windows DLL.
Or is there NO way to make a plugin in Editplus because they have not implemented a plugin system?
I do not see any kind of plugin architecture mentioned in EditPlus's feature list. If it does not expose a plugin API, then you cannot write a plugin for it. All you can do is create a DLL that is injected into EditPlus's address space by an external process and then uses OS API calls to directly manipulate EditPlus's UI and raw memory as needed.
EditPlus does not have a plugin system, so you cannot extend in any way.
EditPlus has no plugin system!
In EditPlus, You can only use Text Filter to do something like plugins do.
Text Filter can execute script file or executable file.
You can use perl, java, python, vbscript, javascript or command line application which support standard input and standard output to write and run as a text filter.
Text Filter only can change the text content in the editor area.
I'll be very glad if a real plugin system come with EditPlus.
See also:
Writing a text filter for EditPlus
Some Text Filters for EditPlus
yes it is possible. it's hard (..not so very hard..but still)
i explain in here the possibility to extend Editplus with php
https://stackoverflow.com/a/61254718/5781320
i see this cause i lookin' for other simplest methods than mine.(just by curiosity and fun) .. i wrote the fastest php framework in the world and I will glad to make it "talk" with editplus
There is possible to compile servers in PUREBASIC.com to interact with applications Android in b4a=open source now (b4x.com) that suppose to interact with google speech recognition so yes is possible to talk from your phone to the server dll or exe to interact with editplus,total commander,and many other stuff.
I did it myself cause i was curious if had delay.
EditPlus hasn't the direct possibility , Notepad++ does and on https://www.purebasic.fr/english/viewtopic.php?f=12&t=65680&hilit=notepad+plugin with the same purebasic i use on that notepad++ version work that pugin can be modiffied how you like to be .On actual version of notepad++ i tryed myself doesn't work : the plugin is obsolete and is rejected so witch method you choose is hard to implement the system you need int this dynamic expansion of open source / or developing.

Objective-C in Mono

I have a .NET application, which I want to port to OSX. Up to now I used a DirectShow DLL for WebCam handling. Can I use an Objective-C DLL for Mono? How? I'm a newbie on Mac. Is there an existing (WebCam handling) solution for this? Is there a better solution?
You want to use the QTKit framework to do this, in particular you can use the QTCaptureView as a reusable NSView that you can embed in an existing window or in an application to do the actual video capturing.
I have just added support for capturing to the MonoMac bindings a few minutes ago after I saw your question, so you will need to do a little bit of work.
Steps:
Install Mono, MonoDevelop and the MonoMac addin as described here: http://mono-project.com/MonoMac
Download the latest sources for MonoMac and MacCore from Github: http://github.com/mono/maccore and http://github.com/mono/monomac
Update the MonoMac.dll to the latest version, by going into the monomac/src directory and typing "make update"
At this point you should be able to use the QTCaptureView in your MonoMac applications like any other NSView. A tutorial showing the use of the API in Objective-C is here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/QTKitApplicationTutorial/BuildingaSimpleQTKitCaptureApplication/BuildingaSimpleQTKitCaptureApplication.html#//apple_ref/doc/uid/TP40008155-CH8-SW1
You can just use the equivalent versions in C#
I'm not sure what you mean by "an object-c dll for Mono".
Your absolute best approach is to learn the platform you're targeting and port only the logic and general architecture.
To access cameras, microphones, line-ins, etc. on Mac OS X, use QTKit (Quicktime Kit). It's mind-numbingly simple to set up a web cam view, record to files, grab frames, etc. It's built in and designed to make this sort of thing mostly drag-and-drop for developers.
MonoMac is just one alternative. There are Monobjc, CocoSharp, NObjective, MObjc / MCocoa and ObjC# (I cannot choose between them). Theese are all "bridges" between Mono and Cocoa, what mean you can use Cocoa API in Mono application. But I don't want to use the API directly. I just want a dinamically linked library, which provide me some function for WebCam handling (as I said, I did this up to this time on Windows). In other words: I need a wrapper in Mono for QTKit.
PS: If I rewrite the application in object-c that means several months, and double work in the future when the application will grow. I love object-c but I hate to work unnecessary.
I tried the accepted code in XCode, and when I tried to port to Monodevelop, several classes are missing, eg. QTCaputureSession, QTCaputreDeviceInput, CVimagebuffer.
(Sorry, I cannot edit my previous messages, this is another account.)

Quickest way to build a simple Symbian app?

I have a Symbian 9.1 handset, Nokia E65, based on Nokia S60 series UI. I'd like to build a simple, full screen, graphic application. It should be able to display some text and pictures and have a basic interaction from the keyboard. That's for me only, not to be deployed.
Now, what do you think is the quickest and most painless way to have it done?
I have the following skills:
- HTML, PHP, ASP.net, JS
- ASP.net and C#, Silverlight
- Java, but mostly for networking, not UI
- Some C++
I have downloaded the Nokia IDE, but it is scary at first sight :)
Any tutorial or example are welcome!
Edit:
In particular, two questions:
is there a possibility to make a stand-alone flash application for that handset?
how about the QT mobile version?
For your device, definitely use Python for S60. It is much easier to start with than Symbian's C++ SDK and in case you ever need more low level functionality than python gives you, you can write small modules in c++ and use them in your Python program.
For a simple application like the one you are describing, Python will do just fine. You don't even need any of Nokia's IDEs / tools on the PC, you can just write the code in any text editor, copy it to the phone and test it live.
As others have mentioned, other options include:
Symbian C++ SDK : As you have discovered the tools and not the most intuitive to work with, development is not straight forward either.
Nokia's WRT : Using javascript/css/html, but it is not available for your phone.
Qt : Not available for your phone.
Java Me : Probably your second best option, your code will be slightly larger but more protable. The tools are not as straight forward as with Python, but definitely not as complicated as with Symbian.
If you think you may like to do some further development on the Symbian platform in future, I'd strongly suggest looking at Qt. Unfortunately, however, you can't use it on your E65, since Qt requires S60 3.1 or higher. (The E65 runs S60 3.0).
Since Qt coding in done in C++, you also have access to native platform APIs if required. For most apps however, the (considerably more user-friendly) Qt APIs provide all the functionality you need.
Depending on your background, the learning curve may be steeper than using Java or Python, but the pay-off is that you get access to a very powerful toolkit. And of course, as long as you use only Qt APIs, your app should be easily portable to other Qt platforms if necessary.
Go for Java ME.
All the things you list in your post is possible to do in Java.
The Symbian SDK for C++ can be downloaded here.
NSBasic is another option.
Kindness,
Dan
May I suggest Python? For newer Symbian handsets I'd recommend Web Runtime (WRT), but it is not supported on good old E65.
I'm obviously biased but I would suggest getting the 2D graphics example code from the "Quick Recipes On Symbian OS" book:
If you know HTML and JS already, you should be able to write a Web widget for your Symbian device pretty easily, using the tools available through Forum Nokia. More info here:
http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/
These widgets are standalone full screen applications that use the device WebKit browser engine for rendering and UI. You can also use keyboard inputs and customize the softkeys if you wish.

Alternative to Dreamweaver?

I'm tired of Dreamweaver overwriting wrong files on the server,
so I'm looking for an alternative.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
I'm using Windows.
Every web developer should be hand-writing their mark-up - all forms of automated abstraction inhibit your understanding and awareness of the code and create maintenance problems for the future. I'm quite a zealot about this, you may be able to tell.
On that basis, I can heartily recommend Editplus: has code colouring, FTP and a huge amount of feature-sugar from line duplication to macros.
Notepad++ extended with some plugins is a really handy replacement. Though I can't call it IDE, it does virtually everything a developer need. In my case (a lot of repetitive code) Texter (a small app working in background) makes notepadd++ even more handy. So, my suggestion is: Notepad++ and Texter.
I switched to notepad++ when I had the same kind of problems with DreamWeaver. I tried some other programs too, but they were too complicated for my needs.
If all you need is color-coding and ftp-support, notepad++ is a good choice.
Visual Web Developer Express, which is the lightweight version of Visual Studio.
http://www.microsoft.com/express/
If you're using a Mac you should take a look at Coda
Well personally I use Programmer's Notepad but it doesn't support the facility to upload files to the server. You could get Notepad++ and this FTP plugin. I haven't tried Notepad++ but I'm sure that it isn't WYSIWYG.
Perhaps KompoZer? It has all the features you've asked for, and there's a Windows version (as well as Mac and Linux).
Dreamweaver... Not my cup of tea, because it lacks good support for modern web programming with Javascript or PHP.
For primary design, I use WeBuilder from Blumentals. Its also a good and not expensive PHP and Javascript IDE with debugging support and also has good CSS support with a built-in CSS editor.
I'm not a big fan of text editors like Notepad++ as an IDE replacement, because you often need a lot of additional plug-ins to have similar features like a IDE. But for some files or quick editing nothing can beat such editors (I like Notepad++ the most on Windows).
So for Windows I would prefer WeBuilder for all things (design & programming).
You use only Windows? For Linux there are other alternatives too ;)
When I searched an alternative for the Dreamweaver for PHP, I found some IDEs and one among them is Netbeans. Soon it became my favorite for my object oriented coding.
Here is the download page.
This has support for Zend and Symphony frameworks.
They also support File uploading.
When developping in PHP, I generally use Eclipse PDT.
If you are more oriented towards HTML/CSS/Javascript, you might be interested by Aptana, which is based on Eclipse too... Which means it can use lots of plugins, including some to work directly on a server, I suppose (see TM/RSE, for instance).
Note than Aptana can also be installed into an existing Eclipse installation, as a plugin.
Oh, also, I almost forgot : Eclipse is free, and there are both a free and a commercial version of Aptana.
(One bad thing about Eclipse being it requires a quite powerful computer -- at least 2 cores and 2 GB of RAM, if you want to use any other application at the same time...)
E Text Editor, a Textmate clone for Windows, claims to have FTP Support. But i haven't used this feature before.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
The Zeus editor can highlight and fold HTML files, it integrates with HTML Tidy and can seamless edit files from the server via ftp/sftp.
It also has support for a host of other languages (i.e C/C++, C#, Java, Javascript, PHP, etc etc)

Symbian and OpenC Applications

I have been researching around trying to find the best way to begin developing an application which aims to analyse user's writing styles based on outgoing SMS messages. I have installed Symbian's SDK and Carbide and purchased a book on their specific style of C++ to get started. However, I was told to check out Open C for Symbian as I have some previous C experience. I have installed the plugin from http://www.forum.nokia.com/Resources_and_Information/Explore/Runtime_Platforms/Open_C_and_C++/ and tested a simple Hello, World! application with success.
Although, the initial success would lead me to believe Open C would be a better option for me, I am worried about limitations of using Open C. For example, I need to be able to access native functions of the Symbian OS to capture keystrokes while in the SMS composer. I also need to be able to run my application in the background and have it load on system startup as not to interfere with user's normal activities.
Can someone clarify if Open C can access such functions and fulfil my needs in terms of developing this specific application? Also, what are the limitations to using Oepn C in comparison to the standard Symbian C++?
I'm by no means a Symbian guru but we've used the Open C/C++ plugin for Symbian here. My understanding is that the plugin is simply an extension -- it gives you the standard libraries and lets you deal with familiar functions (in our case, just the simple cstring.h, and stdio.h libraries were what we were looking for).
You can still mix and match the Symbian calls and likely will have to deal with some painful conversions to get your char* into the proper "descriptor". However, you should only have to do these at the interfaces at which you're touching existing Symbian libraries (as they're going to expect descriptors, not char*s).
In our code, we have some places where we're using a remove call to delete files and in the same class, creating the detailed Symbian RFs abd RFile objects.
So yes, while we use C/C++ libraries to do some low-level stuff and a lot of string manipulation, we're also using the Web Browser Control, key input monitoring and all that.
...And yes, we need to clean up our code. :-)
Open C provides a set of standard C libraries for Symbian OS programs i.e. it is a library.
This means you can call Open C code and Symbian native code freely in the same program, just as with any other library, provided you respect the preconditions and assumptions that the libraries require.
This is where the complexity comes in, because the standard Symbian APIs often require things like descriptors and a working active scheduler, whereas the Open C libraries don't. But provided you're careful you can do what you want.