Muting/unmuting Tracks Using Autohotkey

AutoHotKey script:

  
SetDefaultMouseSpeed, 1   
  
clickImage(imagePath, imagePath2)  
{  
Loop  
{  
  
imagesearch, foundX, foundY, 0, 0, 1280, 800, %imagePath%  
; msgbox %foundX%  
  
if (foundX = "")  
{  
imagesearch, foundX, foundY, 0, 0, 1280, 800, %imagePath2%  
}  
  
if (foundX <> "")  
{  
break  
}  
  
}; ends Loop inside clickImage  
  
  
foundX += 20  
foundY += 20  
  
  
click %foundX%, %foundY%  
}; ends clickImage  
  
  
  
  
^!1::  
clickImage("C:\ahkImages\track1Highlighted.png", "C:\ahkImages\track1NoHighlight.png")  
return  
  
^!2::  
clickImage("C:\ahkImages\track2Highlighted.png", "C:\ahkImages\track2NoHighlight.png")  
return  
  
^!3::  
clickImage("C:\ahkImages\track3Highlighted.png", "C:\ahkImages\track3NoHighlight.png")  
return  
  
^!4::  
clickImage("C:\ahkImages\track4Highlighted.png", "C:\ahkImages\track4NoHighlight.png")  
return  

AutoHotKey download:
http://www.autohotkey.com/download/

In order for this to work, you will need to take screenshots of each of the buttons in a highlighted state and a nonhighlighted state, and put them in a folder so that the path is right.

The script as-is mutes/unmutes when you hit ctrl-alt-(1-4)

FoK

Didn’t knew autohotkey could do that…
I thought you would do something with Auto-IT3, but Auto-IT3 is not capable of detecting zones within Renoise

Never messed with Auto-IT3; AutoHotkey can compare your screen against existing image files and then use that comparison to build a target for a mouseclick (which is what is done in this script).

So it’s not under the hood at all, it’s just working off the way the app looks. But that’s maintainable enough for Renoise because it’s usually possible to get it into a known state re: what’s onscreen, at least for this purpose.

But you can Mute/Unmute with the computer keyboard anyway so why bother?

EDIT: Nevermind, seen the other thread now.

Yeah, I discovered too late that this is totally unnecessary. :wacko:

But if you wanted to click on something else the same technique would work.

Well, AutoIT3 has a function which can scan a certain area for pixel value and if something changes in that area, it can trigger an event… i have not really investigated if it can do more in that regard. I’ve used the function to detect tray-icon popup dialog that does not have any window handles or whatsoever to recognize its appearance.

can you?how?

with the backslash key, but this only works for the current selected track.
So if you want to mute more tracks you have to use the tab as well to shift the cursor.

No. Defaults are Ctrl + NumPad for tracks 0-9 for a total of 32 tracks that can be assigned. Of course you can always change these. I did have them on the F-Keys as a secondary set-up at one point, for example.

Ok, I don’t feel so bad if lots of people didn’t know. :blink:

I think it’s cool that you took the initiative to make a script. So kudos, no matter what.

Nopes, not even the writer of the manual is all integrated. I should only feel ashamed for not investigating this more thoroughly (Bantai is a lot sharper on these terms fortunately). My sincere apologies. But yes: i don’t use these keys since i have a workflow that does not require this feature.

Renoise simply has too much features :P

Heh, my 1.5 year old video is all based around muting/demuting!

http://www.youtube.com/watch?v=8UZaadHYaTY

If only this stuff was recordable in Renoise, then I would have my arrangment finished in 5 minutes!