Auto Run an Extension

Dan P's Avatar

Dan P

14 Jun, 2019 08:24 PM

My apologies if this has been asked/answered. I could not find any discussions or documentation.
I have an extension I developed for my personal updating. It takes input from a file I generate overnight and updates an asset with transactions to maintain a current balance. I run it each morning when I open MD. Can someone guide me to a way to have MD run this when it starts? I know, I'm extremely lazy! More of an educational thing for me.

Thanks in advance.


  1. 1 Posted by hleofxquotes on 15 Jun, 2019 05:30 AM

    hleofxquotes's Avatar

    Assuming that your extension extends FeatureModule, you can override handleEvent(). Probably "md:file:opened" is a good place to try

        public void handleEvent(String appEvent) {
  "> handleEvent, appEvent=" + appEvent);
            if (appEvent.compareToIgnoreCase("md:file:opening") == 0) {
            } else if (appEvent.compareToIgnoreCase("md:file:opened") == 0) {
            } else if (appEvent.compareToIgnoreCase("md:file:closed") == 0) {
        protected void handleEventFileOpened() {
  2. 2 Posted by Dan P on 16 Jun, 2019 04:44 PM

    Dan P's Avatar

    Thanks! I'll give it a go.

  3. Dan P closed this discussion on 19 Jun, 2019 07:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac