Page 1 of 1

Help with macro

Posted: Sat Mar 28, 2020 10:32 am
by Medo
I need help with makeing one macro, idk if is it posible to do it with this program,

so what i need is when i click right click button on mouse i want program to click numbers 1 and 2 but i want it thos hapend no offten than each 4 sec for number one and 6 sec for number 2, so when i press right click it presses 1 and 2, when i click again 1 sec after it will do nothing, but when 4 sec passed it will spam 1 agian but not number 2 until 6 sec has passed for it. is this posible

ty

Re: Help with macro

Posted: Sat Mar 28, 2020 10:38 am
by phil
I'm afraid I don't think that is possible.... There is currently no way to say only do <action> if it has not already been performed in the last <time> seconds. You may be able to do this with AutoHotkey where you have a much more powerful scripting language, but I'm not sure.

Re: Help with macro

Posted: Sat Mar 28, 2020 10:43 am
by Medo
{WAIT:n} funcstion is doing this half way, problem is it will click number 1 again again since it stops clicking but will continue after 4 sec so when i click 100 times it will click number 100 times more each 4 sec i was trying to do some sort of blocking where it will block for 4 sec after first click like do wait and turnn of macro

Re: Help with macro

Posted: Sat Mar 28, 2020 11:58 am
by phil
Yes it will keep executing it whenever you click, thats why I said right now its not possible... No matter how much you {wait}, it will still re-run the macro every time you click.

What is needed, would be an "Ignore / Don't send" if clicked withing x seconds/milliseconds of the last click. And what would it do instead - nothing I presume (just block the original mouse click and not send any simulated keys. Its definatly something I can add in the future, but its not be an insignificant change. I will add it to my todo list but I'm not entirely sure when I would be able to implement it - there is quite a queue of things to do so while it may get into 2.20 thats probably some time away (although as we are all stuck indoors right now, maybe I will spend a bit more time on XMBC).

In the mean time, I was thinking perhaps an autohotkey script (that you could trigger by XMBC perhaps) may be possible as a workaround/alternative.

EDIT:
I just realized that adding a single option to the simkey dialog would not have the desired effect here - as you want different bits of the macro to execute within different times. That would make things much more tricky... I'm not entirely sure that I will be able to do that, certainly not without pulling all the code to bits (which wont be happening any time soon!).

Re: Help with macro

Posted: Tue Apr 14, 2020 11:58 am
by pesklein
Thank you so much for the update, Phil :)