Control mouse click with Python

5.42K viewsCSS Questionspython
0

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

Joachim Answered question
0

So I can have my CSS select Ableton’s Browser, the browser gets selected and gets a black border but even though it is selected I need to click in the browser area with my mouse for my up, down, left and right navigation to work. It is like the Browser is selected but not the subpart of it where the folders are.

I have found that I can use alt + 5 hotkeys to activate the Browser (from Abletons menu Navigate -> Browser) and then my CSS Navigate Browser commands works.

Now I’m back to sending keys and key combinations (using Hammerspoon) in combination with a Control Script. I would like to only use Control Script, I understand Ableton has not / will not make the API official and that remotify CSS somewhat has its hands somewhat tied. I don’t know if what I want can be done (I think it can as Ableton’s Push has the capability to load clips and songs).

I have done a lot of digging, and I have looked at the decompiled Push script and I see things that might be useful, that is if I knew more python.

The interesting thing (or sad thing) is now that I have learnt enough (more or less) to do without CSS (as I have made some simple Control Scripts of my own).

As Remotify CSS is paid software (not open source/free) I hade hoped for some official feedback/help here on the forum but i have seen very little of that here on this forum.

So much for a tool that clams one can write Control Scripts without coding 🙁

Would it be possible to get some official response from Remotify.io? Is it possible to select the Browser, navigate folders, select clips or clip packs and copy into a track in session view? Maybe you could have a look at Ableton Push control script?!

Joachim

Code I have used that partially works:
This selects the Browser
self.application().view.focus_view(“Browser”)

Navigate Browser Up
self.application().view.scroll_view(0, “Browser”, None)

Navigate Browser Down
self.application().view.scroll_view(1, “Browser”, None)

Navigate Browser Left
self.application().view.scroll_view(2, “Browser”, None)

Navigate Browser Right
self.application().view.scroll_view(3, “Browser”, None)

Joachim Answered question
You are viewing 1 out of 9 answers, click here to view all answers.