|
|
|
05-22-2019, 12:52 PM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Copy selected item and past at mouse position without moving the edit cursor ?
hey guys
I want to use "middle click" in the arrange view to:
copy selected item and past at mouse position without moving the edit cursor.
possible?
I tried to make custom action with "sws - undo move edit cursor" but it doesn't work, the edit cursor moves 2 positions back instead of just undo the move after pasting the item.
please help
thanks
|
|
|
05-22-2019, 01:15 PM
|
#2
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
|
If you use 'SWS/BR: Save edit cursor position, slot x' / 'SWS/BR: Restore edit cursor position, slot x' instead of the 'sws - undo move edit cursor'? (didn't try myself)
|
|
|
05-22-2019, 01:27 PM
|
#3
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by nofish
If you use 'SWS/BR: Save edit cursor position, slot x' / 'SWS/BR: Restore edit cursor position, slot x' instead of the 'sws - undo move edit cursor'? (didn't try myself)
|
it doesn't work.
it saves the position of the edit cursor after clicking (even if I put the "save edit cursor" before the "copy item..") so nothing happens. :/
other ideas? scripts?
|
|
|
05-22-2019, 01:45 PM
|
#4
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 4,689
|
I do that in my script, but I wrote my own item functions for that
probably the easiest way would be via chunk
get all selected items chunk
addmediaitem to track
set that chunk to it
move it to mouse position via reaper.SetMediaItemPosition( item, position, refreshUI )
|
|
|
05-22-2019, 01:59 PM
|
#5
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
I havr a script to do that,
loook for Duplicate in key search :P
|
|
|
05-22-2019, 02:47 PM
|
#6
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
I havr a script to do that,
loook for Duplicate in key search :P
|
i use ur script
"Script: X-Raym_Copy selected items and paste at mouse position.lua"
the problem that the edit cursor still moves when I use it with mouse middle click.
have another script ?
|
|
|
05-22-2019, 02:48 PM
|
#7
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by Sexan
I do that in my script, but I wrote my own item functions for that
probably the easiest way would be via chunk
get all selected items chunk
addmediaitem to track
set that chunk to it
move it to mouse position via reaper.SetMediaItemPosition( item, position, refreshUI )
|
script link?
|
|
|
05-22-2019, 02:56 PM
|
#8
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 4,689
|
I can write it for you,but if Rays script already do that it it can be modded to paste at mouse position
|
|
|
05-22-2019, 03:21 PM
|
#9
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
"Script: X-Raym_Copy selected items and paste at mouse position.lua"
Oh yes this is the one.
If you don't want it to move edit cursor, you can use it in a custom action with SWS actions to Save and Restore cursor position.It should works.
|
|
|
05-23-2019, 04:54 AM
|
#10
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
|
Quote:
Originally Posted by Reflected
the problem that the edit cursor still moves when I use it with mouse middle click.
|
Isn't that because of the option: 'Editing behaviour -> Move edit cursor when pasting/inserting items'?
If so, if you want to have it enabled generally maybe disable it temporarily in your script / custom action?
(I wouldn't know how though currently from top of head.)
|
|
|
05-23-2019, 05:20 AM
|
#11
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by nofish
Isn't that because of the option: 'Editing behaviour -> Move edit cursor when pasting/inserting items'?
|
i already turned off this option but still the same
|
|
|
05-23-2019, 05:21 AM
|
#12
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by Sexan
I can write it for you,but if Rays script already do that it it can be modded to paste at mouse position
|
can you please?
X-Raym
can you give sexan the code for modding it?
|
|
|
05-23-2019, 06:40 AM
|
#13
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Reflected
This is one of my free scripts, code is already open source for anyone who want to look at it.
Also, there is nothing to correct in my script:
It's a setting issue on your side.
|
|
|
05-23-2019, 07:00 AM
|
#14
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
@Reflected
This is one of my free scripts, code is already open source for anyone who want to look at it.
Also, there is nothing to correct in my script:
It's a setting issue on your side.
|
did you configure it for use with mouse middle click ?
what could be the setting issue on my side ? :?
|
|
|
05-23-2019, 07:21 AM
|
#15
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Middle click ! Oops no,
I just tried, and even with a custom action, and indeed in this case,
despite the script internally already save and restore cursor after paste,
despite the fact I wrapped it arround Restore and Save cursor positin action,
it doesnt work.
Middle click seems to always move cursor. And its impssoble to bypass that from the script or from a custom action.
I guess you need another mouse modifier for now.
|
|
|
05-23-2019, 10:49 AM
|
#16
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
I guess you need another mouse modifier for now.
|
which will work?
|
|
|
05-23-2019, 11:06 AM
|
#17
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
I personally use a keyboard shortcut. It is way more intuitive. You can also consider toolbar button.
|
|
|
06-07-2020, 05:52 PM
|
#18
|
Human being with feelings
Join Date: Dec 2015
Location: Russia
Posts: 36
|
Sadly it dont work for mouse(
|
|
|
12-15-2021, 01:37 PM
|
#19
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
no matter what I do, when I assign this script to left click action it moves the edit cursor :/
|
|
|
12-15-2021, 02:41 PM
|
#20
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Reflected
Check mouse modifier / Reaper settings. This is issue is not related to this script as it has save and restor edit cur pos internally, so cursor change happen before or after the script run basef on another setting.
|
|
|
12-15-2021, 03:06 PM
|
#21
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
@Reflected
Check mouse modifier / Reaper settings. This is issue is not related to this script as it has save and restor edit cur pos internally, so cursor change happen before or after the script run basef on another setting.
|
but if I set the modifier to "no action" it doesn't move the edit cursor
this is my setup, can you check this on your side?
|
|
|
12-15-2021, 04:50 PM
|
#22
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Reflected
Map it to an keyboard shortcut and you will see if doesn't move the mouse cursor, revealing it is a user setting or reaper default behavior somewhere else which move the cursor.
To answer your feature request you sent in private forum, and as I don't think it can impact current users of this action, I have updated the script so that it select the new copied items by default.
|
|
|
12-17-2021, 03:54 AM
|
#23
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
@Reflected
Map it to an keyboard shortcut and you will see if doesn't move the mouse cursor, revealing it is a user setting or reaper default behavior somewhere else which move the cursor.
To answer your feature request you sent in private forum, and as I don't think it can impact current users of this action, I have updated the script so that it select the new copied items by default.
|
can you check this on your side? (with the mouse modifier)
is this a reaper bug ?
|
|
|
12-17-2021, 04:18 AM
|
#24
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
okayyy I found something...
please tell me you can fix this
it can be an issue within the script itself..
1. I used a shortcut (shift +alt + x)
2. I selected an item
3. keep the shortcut pressed (hold) and move the mouse
4. see the edit cursor does moves and get back
not seeing it all the time because it's probably too fast, but you can see it happens in the gif.
here:
|
|
|
12-17-2021, 05:01 AM
|
#25
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Reflected
Internaly, the script move the edit cursor to mouse position, run the paste action, and restore edit cursor position. Restore is built-in inside the script already. That is why I think that if it stays at a different place than before, the cursor may have move either before or after the script run.
A PreventUIRefresh call in the script make cursor moving and view transparent, but according to your screenshots this might a bit of troubles when run several time in very short interval.
Anyway, the important part of your screenshot is that it do end successfully everytime by restoring the initial edit pos.
|
|
|
12-17-2021, 05:03 AM
|
#26
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
Quote:
Originally Posted by X-Raym
Anyway, the important part of your screenshot is that it do end successfully everytime by restoring the initial edit pos.
|
can you test it with the mouse modifier on your side to solve this problem?
Track - Alt+ Left mouse click
see if it happens in your side
|
|
|
12-17-2021, 05:55 AM
|
#27
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Reflected
It does the same as you noticed,
The Edit cursor position is updated before the script execution,
so it is definitely something which cannot be fixed inside the script cause it happen outside it. 😕
|
|
|
12-17-2021, 06:55 AM
|
#28
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,295
|
I've created a bug report (even though I'm not sure this is a bug), but it make no sense that without a script it doesn't move and with a script it does move...
here
https://forum.cockos.com/showthread.php?t=260808
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:10 PM.
|