Menu

Switch to running app (instead of launching a 2nd instance)

2020-03-06
2020-03-07
  • Michael Baas

    Michael Baas - 2020-03-06

    It sometimes happens to me that I launch a 2nd instance of an app (by selecting it from ML) when I'm not aware that it's running already. It would be nice if ML could (optionally) switch to the running instance in such cases...

     
    • madproton

      madproton - 2020-03-06

      Try ....

      In [Settings] - [Options], check [Single Instance].

       
      • Michael Baas

        Michael Baas - 2020-03-07

        Thanks, that was checked already. Your reply encouraged me to look closer and appearently it works most of the time, but with some apps it doesn't. I'm always linking to the executable, not the Shortcut from Start Menu. Maybe I need to this differently?
        Evernote (C:\Program Files (x86)\Evernote\Evernote\Evernote.exe): nothing happens (when launching if already running). The app does not get focus and stays in background.
        MySQL Workbench (C:\Program Files\MySQL\MySQL Workbench 8.0 CE\MySQLWorkbench.exe) - gets focus, stays in background
        * GitKraken (C:\Users\mbaas\AppData\Local\gitkraken\app-6.5.3\gitkraken.exe) - opens a 2nd instance. The Startmenu links to "C:\Users\mbaas\AppData\Local\gitkraken\Update.exe --processStart "gitkraken.exe"", that also opens a 2nd instance. Would be nice if that could instead switch to the running process (given appropriate cmdline-switches). I guess that's an issue for Squirrel which I follow up there...
        Thunderbird and many others behave fine. So I guess ML is fine and the others have issues that might or might not be addressed there.

        Thanks - I'm happy now - no more requests! (Though I reserve the right to come back! ;-))

         
        • madproton

          madproton - 2020-03-07

          Oops sorry. I thought you were talking about single/multiple instance of ML.

          As for other apps, ML checks for the window title. Tries to match the full title, then partial. Sometimes you may have an app with a similar title as an open folder, then it tries to ALSO match the window process name.

          It's a bit hard to predict whether an app will behave as expected. I read somewhere sometime ago that there is a bug in the programming API where some windows ignore the "bring to foreground". There was a workaround but it seemed too messy and may be incompatible with older versions of WIndows. It's hard to test because I no longer have XP, VIsta, 7 and 8. :-(

          Thanks.

           
  • Michael Baas

    Michael Baas - 2020-03-07

    It's hard to test because I no longer have XP, VIsta, 7 and 8. :-(

    Not a problem, neither do I ;-)

    I think I once read something about Windows preventing apps from coming to foreground as a security measure, but it's only vague memory and I do not recall more details. (In that case one could question why it even worked with Thunderbird.) Oh well, let's blame Microsoft and Window's idiosyncracies.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.