Toggle between two instances of Live running at the same time

I'm able to toggle between two instances of live by pressing Alt + Tab. It's awkward to get at the keyboard of my laptop to do this so I thought I'd try sending Alt + Tab in response to a button on one of my controllers. I can see MT sending out Alt (down) Tab (down) in response to the key press, then Alt (up) Tab (up) in response to the release of the button, but this has no effect. I tried this as inject Windows actions (is that what inject is for?), but that didn't work either. Is there a solution?

Thanks,

Gabriel

Hi Gabriel, try without injected keystrokes. With injected keystrokes, you are targeting a given control object within an application. In this case, you don’t want this because Alt-Tab is a keystroke recognized by Microsoft Windows itself.

Also if you have Bome set to suppress outgoing keystrokes while focused in the options, understand that it will also suppress Alt-Tab so make sure that you don’t alt-tab to MT Pro or you may never get out (at least with your MIDI controller).

 

Steve

 

Thanks Steve. Neither suggestion seems to help. Though I see Alt Tab output in the log file, it doesn’t seem to affect Windows.

Hi, are you running MIDIBuddy? I know the Alt Key is an option you use to control that so maybe it is interfering if you have it running.

Also, are you putting a short delay (say 10-20ms) between keystrokes. Sometimes Bome sends them faster than the Windows Interface can handle.

Alt Down – Tab Down (Delay 20ms) – Tab Up (Delay another 20ms) – Alt up (Delay another 20ms)

 

Hi Gabriel,

This will toggle between the last to active instances of an application. Just make sure that MT Translator is not one of them since it suppresses outgoing keystrokes when it is active.

 

 


Attachments:
1554422825271_Alt-Tab-Demo-2019-04-04.bmtp

Hi Steve,

I’m not sure why, but your script isn’t working here to switch between the two instances of Live. It’s pretty much what I tried, including delays.

Gabriel

Does it toggle between any other two applications.
Also it may be be apparent it toggled so put one screen of live on top of the other, offsetting one slightly so you have a better visual of whether it is working.

I can try with Live if I can figure out how I can start up two instances.

No, it doesn’t. I’m stacking screens as you suggest so I can tell if it switches. When I use the laptop keyboard and press Alt Tab, a popup appears with mini icons for the active apps. This doesn’t happen from MT.
As for starting two instances of Live…. go to Options/Preferences select the Look Feel tab… the sixth option is Allow Multiple Instances. Click it to On.
Thenif you have Live in the system tray (or whatever that’s called… the bar along the bottom of the screen) if you click it once to start the first instance, you right click it to start the second instance. You can ignore the Rewire warning.
It seems you are able to switch between active apps when you try your code… is that right?

OK, I have Live Intro which only allows 16 channels so the multiple instance option doesn’t show on my computer.
They probably disable it so you couldn’t cheat and use two instances to get more than 16.

I can switch between instances of other apps using the project file I sent you. I switched easily between an editor and a browser. Do you have MIDIBuddy running. If show, shut that down and see as MIDI Buddy might be using the Alt Key for it’s purpose.

I haven’t started MIDIBuddy while trying this. I remember using autohotkey a while back. I wonder if it’s running in the background without my knowing it. I don’t see it in the Task Manager though I don’t know if it would show up there. It’s interesting that I can switch when I use the Keyboard, but not when I send the same Keys out from MT. And especially interesting that you CAN get it to work from MT

Yes, very strange. AutoHotkey generally does not run in the background unless you start it up by putting it in the Startup Folder on you system. If you don’t see it in task manager, then it is probably not running.

The other thing to look at is if you have some sort of mouse/keyboard processor running (like Logitech). Some of these applications create havoc with certain applications.

Finally since I didn’t test with Ableton, perhaps there is a hotkey defined within there that is interfering with Windows switching. Maybe it compares the “real keyboard” to a “virtual keyboard” for its actions. For this reason, MT Pro has issues with some games.
Maybe I should try switching between a Live Window and a browser to see if I have problems there.

If Live hotkeys were interfering, then wouldn’t they interfere with Laptop generated Alt Tab as well as MT generated Alt Tab? I’ll try switching between apps when Live isn’t running. I don’t use any mouse/keyboard processor as far as I know.

Doesn’t work even if Live isn’t running.

Not sure why. It IS working on my Windows 10 PC.

I think you’ve already gone beyond the call of duty. There’s another approach I’ve used in the past. It’s a bit sloppy I suppose, but seems to work. When two instances of Live are running, there’s an Icon in the system tray – the same one I use to launch the instances in the first place.
If I hover the cursor over it, a popup appears with a small representation of each instance side by side. If I move the cursor over the instance I want and then click, then that screen goes to the top (the two screens are maximized and stacked on top of each other).
I can do this under MT control with the mouse commands. It took a bit of fooling around with the timing, but finally I got it working. I don’t like it much because it feels kind of tenuous.
So anyway, I don’t want you to waste any more time helping me out. Thanks for what you’ve done.
Gabriel

I’m glad you found a work around. Let me know if you every find the root cause. I’ll poke around at it from time to time and let you know if I discover anything.

Thanks for the kind words!

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz