Hello guys!
I'll try my best to explain what I'm looking for... I need a script that will move items in list view based on the items that I currently have selected.
In order for this to work properly, AHK needs to grab a list of ALL the items in the list view and another list of just the selected items. The script should move 'Item A' to the top of my selection and 'Item B' to the bottom of my selection. 'Item A' and 'Item B' will always have the same, static name in the list, so their name can be used to determine their location.
I can move 'Item A' and 'Item B' up/down using hotkeys provided by the program (CTRL - UP, move selected item up // CTRL - DOWN, move selected item down).
To help clarify, I provide a couple examples :
User 'maestrith' also kindly provided me with this example that aims to do something similar - http://autohotkey.com/board/topic/10170 ... nge-items/
Unfortunately I'm just a beginner at AHK, so I'm unable to edit it for my needs.
Help is much appreciated, thank you in advance!
Moving/sorting items in list view
Re: Moving/sorting items in list view
I have not looked at maestrith's script.
Are you able to get any values when you use commands such as ControlGetFocus? I hope that would be able to tell you what items you have selected, or at least their indexes. Cause if we know where the first select item is, we can put Plugin A at that index, and if we know where the second selected item is, we can put Plugin B at that index+1. (Or would it be +2 cause Plugin A would offset everything by 1?)
Though, reading that documentation, it doesn't seem like it'll give you a list. Something else would need to be done, and I'm unfortunately unaware of what that would be. To clarify, this is a non-AHK program? If it were an AHK progam using an AHK gui, it should be easier to figure out.
Are you able to get any values when you use commands such as ControlGetFocus? I hope that would be able to tell you what items you have selected, or at least their indexes. Cause if we know where the first select item is, we can put Plugin A at that index, and if we know where the second selected item is, we can put Plugin B at that index+1. (Or would it be +2 cause Plugin A would offset everything by 1?)
Though, reading that documentation, it doesn't seem like it'll give you a list. Something else would need to be done, and I'm unfortunately unaware of what that would be. To clarify, this is a non-AHK program? If it were an AHK progam using an AHK gui, it should be easier to figure out.
Re: Moving/sorting items in list view
You are correct it's not AHK program. It's a window within a digital-audio-workstation Reaper. Someone suggested that ImageSearch could/would work but I'm not sure :/Exaskryz wrote:I have not looked at maestrith's script.
Are you able to get any values when you use commands such as ControlGetFocus? I hope that would be able to tell you what items you have selected, or at least their indexes. Cause if we know where the first select item is, we can put Plugin A at that index, and if we know where the second selected item is, we can put Plugin B at that index+1. (Or would it be +2 cause Plugin A would offset everything by 1?)
Though, reading that documentation, it doesn't seem like it'll give you a list. Something else would need to be done, and I'm unfortunately unaware of what that would be. To clarify, this is a non-AHK program? If it were an AHK progam using an AHK gui, it should be easier to figure out.
Re: Moving/sorting items in list view
PixelSearch may be viable, if all the options are visible on screen and there is no need to scroll a scrollbar. You could use it to find all areas that are blue in the list, indicating a highlight. You can calculate the coordinates for each slot relative to the window to decide where the top and bottom are and perform an individual pixelsearch in each of those slots for something blue. Then, you can use ImageSearch to decide where the Plugin A and Plugin B currently are, and move accordingly. Very tricky stuff, but it may work.
-
- Posts: 8
- Joined: 18 Jan 2016, 13:26
Re: Moving/sorting items in list view
this might not be a good question, but have you tried using the reaper action list (maybe with sws extensions) to build these macros?
Check this
Check this
-
- Posts: 8
- Joined: 18 Jan 2016, 13:26
Re: Moving/sorting items in list view
do you need a script running to detect these things?Exaskryz wrote:PixelSearch may be viable, if all the options are visible on screen and there is no need to scroll a scrollbar. You could use it to find all areas that are blue in the list, indicating a highlight. You can calculate the coordinates for each slot relative to the window to decide where the top and bottom are and perform an individual pixelsearch in each of those slots for something blue. Then, you can use ImageSearch to decide where the Plugin A and Plugin B currently are, and move accordingly. Very tricky stuff, but it may work.
or is there a 'debugging' tutorial, or some other tools?
With some winspy.exe I can see the list (fx: track 1) but not it's contents. not sure how to do pixelsearch or controlget focus (yet)
thanks
Who is online
Users browsing this forum: Bing [Bot], Rohwedder and 365 guests