Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 05-11-2017, 10:26 AM   #1
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default Set Mouse Cursor Position & Focus Midi Editor API that will not alter the zoom/pos

Hi,

I'm trying to allow for sensible touch-screen (single touch) performance of a script where you touch a button and the script performs an action.

The problem that exists - is that the script is running on its own monitor, and the mouse is likely over some other part of the Reaper GUI. When the button is touched on the touch screen monitor - the mouse cursor jumps to that position, and I need a way to put it back to where it was before the touchscreen was touched - otherwise this method of working would ultimately become incredibly irritating.

I don't think that there is currently any way to do this - and adding this feature would be really useful - not just for this but also for other things like dragging a knob - resetting the mouse location to central on the knob (and hiding the cursor) - to allow for 'endless' rotation of the knob - no screen boundaries to prevent further movement of the knob when the mouse hits the top or bottom of the screen.

Also would allow for positioning the mouse cursor on some target area of the script automatically.

So that's it - if there's already a way I've not worked it out.

Would be really really useful.

Also - Why is there no dedicated set focus for the MIDI Editor window? We have it for Arrange and some others - but nothing for the MIDI Editor?

Thanks,
Leon.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website

Last edited by lb0; 05-13-2017 at 06:23 PM.
lb0 is offline   Reply With Quote
Old 05-12-2017, 01:05 AM   #2
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Well for the mouse moving task I'm going to give AHK a whirl - and preferably find a way of activating the AHK script from my script. EDIT: AHK not ideal for this as not touch compatible. AutoIT not working particularly better either.

But I'm still interested in a focus specifically for the MIDI Editor. I guess this could also be incorporated into AHK - but seems a little messy.

Currently I'm using 2 calls to 40716 View: Toggle Show Midi Editor windows.

This isn't ideal as it flashes the editor window briefly - and takes longer than expected to run - thus a small but noticeable delay in my script when called.

I tried the deprecated (and hidden) 40194 - but this resets the editor's zoom and scroll position - so not any use.

Thanks,
L.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website

Last edited by lb0; 05-13-2017 at 06:28 PM.
lb0 is offline   Reply With Quote
Old 05-12-2017, 08:06 PM   #3
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

You should edit it into the title. I put something similar in a few scripts. Toggles the filter window. Causes a flash on my machine that has a good graphics card, but not the weaker computer. Maybe it has a major flaw in some scenario, but I have not encountered it. Kind of lame at any rate.

It belongs in any script using GetUserInputs. I don't know how many times I did damage in Arrange with a shortcut meant for the MIDI Editor. It is REALLY lame to have to click to get focus back.
FnA is offline   Reply With Quote
Old 05-13-2017, 06:26 PM   #4
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by FnA View Post
You should edit it into the title. I put something similar in a few scripts. Toggles the filter window. Causes a flash on my machine that has a good graphics card, but not the weaker computer. Maybe it has a major flaw in some scenario, but I have not encountered it. Kind of lame at any rate.

It belongs in any script using GetUserInputs. I don't know how many times I did damage in Arrange with a shortcut meant for the MIDI Editor. It is REALLY lame to have to click to get focus back.
Have done that now. And after only managing to get something veerry clunky going with AHK - that doesn't work well with Touch screens - so not suitable for this purpose - I'm still keen on the Set mouse pointer position request too!
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 05-13-2017, 10:19 PM   #5
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Nice. No idea if the mouse cursor request is even possible, but it seems like the MIDI Editor request should be. I don't know if I should say it now, but maybe the subjects should be split into two threads. Well, good luck with them both!
FnA is offline   Reply With Quote
Old 05-14-2017, 04:08 PM   #6
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Maybe a general "mouse API thread" would be good.

I think the big one is GetMouseButtonState. I requested it in the API wish list but here it would get more attention from users who might benefit. I have seen several scripters asking/complaining about it but am not aware of a request in this forum. It would make something close to mouse drag scripts possible. It would help me with the time/loop selection undo scripts. Another guy is waiting to finish drag select tracks in arrange. I don't know exactly how the Acid Eraser works, but it seems that might be possible in a script. etc, etc.

It might be good to get the modifiers too, but I think a lot would be possible with just the mouse button states.

It would be nice to have more advanced version of what Breeder made for getting mouse contexts. Something that gets specific zones of a track. The ones that set off tooltips. It might even be nice to get that tooltip info.
FnA is offline   Reply With Quote
Old 05-03-2019, 08:37 PM   #7
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Hey Leon,

thanks to Julian, we now have reaper.JS_Mouse_SetPosition( x, y ) to st the cursor position.
Does that help?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 05-04-2019, 04:18 AM   #8
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by _Stevie_ View Post
Hey Leon,

thanks to Julian, we now have reaper.JS_Mouse_SetPosition( x, y ) to st the cursor position.
Does that help?
Hey Stevie - ha - only just read this message. Yeah - I'll be looking into incorporating this into Stripper for both parameter changes (currently if the mouse hits the top or bottom of the screen during a control drag - then it stops and you have to let go of the control and re-grab it. But also - as already mentioned on the other thread - for the touchscreen use.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.