Control mouse click with Python
Hi Remotify forum members,
I see that Remotify has a user.py script that can run methods (a python class), can I run python code here that I currently run in terminal?
I have a python script (that I run manually) that listen for a specific midi command (sent from a midi controller when a button is pressed), when this command is received it clicks the ‘Type’ area (see attached picture) in Ableton’s browser to activate it so that I can copy in clip packs from a folder to tracks (Deck A and B). I do this as I have no other way of Activating Ableton’s browser.
I’m a bit of a new beginner in scripting and with Ableton so I would like to know if it is possible before I spend to much time on it, is this something that can be done with Remotify and python?
These are my imports in my python script;
import argparse
import os
import signal
import sys
import time
import rtmidi
from pynput.mouse import Button, Controller as MouseController
from pynput.keyboard import Key, Controller as KeyboardController

Hi Glenn,
thanks for answering!
Yes you are correct, I only click on ‘Type’ in order to bring Live’s Browser into focus.
From what I understand the Max 4 Life’s LOM (The Live Object Model) is more or les the same as the undocumented Control Surface Scripts Model (maybe I can figure out how to use “Focus View” as you suggested in my Control Surface Scripts).
When I have the browser in focus I use ‘down’, ‘up’, ‘right’ keys (my current python script catches Midi commands from my controller and sends these navigation keys) to select files (a clip pack). I then use Command + C to copy and then I send key ‘1’ or ‘2’ (tracks one and two are key mapped to 1 and 2) to select tracks in Ableton Live’s session view where I send Command + V to past the clips.
As I’m a beginner with Ableton Live and scripting in general I would be happy if you could give me some more pointers or maybe even some code examples (if you happen to have some).
Edit
I played around with Remotify and I now see where the picture you include comes from.
Dose this mean that Max 4 Life’s LOM (reversed engineered pyton version of it) is available from within Remotify?
Sign up
User registration is currently not allowed.