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

From what I learned, when using CSS’s menu’s:
- LOOP contains all the iterables
- CONDITIONS contain all the properties
- ACTIONS contain all the functions
(Although it’s worth mentioning that not all iterables, properties and functions that can be found in the API are found in these menu’s. But you can still use them with custom code.)
If you look inside the CONDITIONS menu, you’ll find “Clip” >>> “file_path”.

If you click this option, then the code that points to a file_path is presented under the condition. You can use CSS’s path menu (grey upward pointing hand) to point to a specific Clip, like the one in the Highlighted Clip Slot:

Then, to use this code in an Action, just copy the line of code into a Custom Code Action. This can either be done inline, like in the example below that prints the file_path in CSS’s log:

Or by clicking the Custom Code button “< >“; but then you’ll need to fully code the Action yourself. The example below just puts the file_path in a variable f, but doesn’t do anything with it:

Don’t forget to remove the condition that was used to get the code, otherwise it will bring up errors.
Sign up
User registration is currently not allowed.
Good to know, thanks again!
Yet still a long way to go before i can do what i wanna do with Control Surface and a controller