Mouse movement limiter.

terkpla

2014-01-03 17:45:35

Hello guys,

I need help with something.

I need a rule to not letting the mouse go over a border. (browser in ableton)

like something when the mouse hit certain pixel it wouldn't move over that pixel or beyond certain pixel, is for a dj template in ableton, i can add/delete songs from template but the browser is what is killing me now.

DvlsAdvct

2014-01-06 17:39:07

Hi terkpla

It's a good question. Instead of using the Movement command you can use the Absolute Position command and tie each axis to a global variable. This will take some measuring, and you'll need to define a start and end position at least for when you initialize your setup, but it would look something like:

Code: Select all

Translator 1: Initialize
Incoming Message: On Project Load
Rules: g0==20,000
g1==20,000
Outgoing Action: Mouse Absolute Position X=g0 Y=g1

Translator 1: Move Mouse X Axis
Incoming Message: <insert MIDI signal here>
Rules: g0=g0+1
if g0<20,000 then exit rules, skip outgoing action
Outgoing Action: Mouse Absolute Position X=g0 Y-g1
And then add another translator for the Y axis. Does that make sense?

terkpla

2014-01-06 19:48:08

Hello DvlsAdvct!

thanks for your reply, am a noob at this actually :oops: , this code should be pasted in the rule section on the mouse movement translator? cause it gimme massive error syntax.

Thank you :)

DvlsAdvct

2014-01-06 19:50:27

You will need to put the code in the mouse movement translator, yeah. How are you typing it?

terkpla

2014-01-06 20:06:59

pretty much copy/paste but it just says syntax error in all lines. i know am doing something wrong :oops:

DvlsAdvct

2014-01-06 20:11:16

Can you post a screenshot?

terkpla

2014-01-06 22:57:42

DvlsAdvct

2014-01-07 01:19:14

Well that will do it :p

Instead of putting my entire examples into the rules, ONLY put the part after Rules: and before Outgoing Action. The Incoming Action goes in the Incoming line of the translator, and the Outgoing Action goes in the Outgoing line. Rules only go into the rules section. Does that make sense?