Please fill in this template when posting!
XMBC Version: v2.20.5
Installed or Portable version: Installed
Windows Version: win 10
Mouse Information (brand/model): doesn't matter
Relevant Computer Information (CPU, RAM etc): intel i5
Did the problem occur after an upgrade of XMBC? (If so, from what version?): no
Did the problem occur after a Windows update/upgrade? (If so, from what version?): no
How long have you used XMBC?: 2 month
What language and keyboard layout do you use in Windows?: chinese
Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:
I need do something when i press a mouse key,and stop it when i release the mouse key?
this is my code seems like this for example: in layer1: e{WAITMS:100}{layer:2},in layer2: q{WAITMS:200}{layer:1},
my real code is much more compolex,so I want a loop when i pressed mouse4 it run and it stop when i release mouse4,it can stop at layer1 or layer2,i dont care witch layer it stop,but i need to stop imeddiately.maybe i have five layer,i just give a 2 layer example.thank u
press to loop and release to stop
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Re: press to loop and release to stop
OK so that sounds pretty simple...
Just so method 6 "repeatedly while the mouse button is down" is probably the most suitable option.
That should repeat while you hold the button as stop when you release the button. It should stop when releasing the button BUT, as I suspect you have found, it will finish the currently executing sequence by default.
I believe this is why I introducd the {flush}, {od}/{ou}/{or} tags, so you can add a command that runs only on button up (releasing the button)...
for example: {ou}{flush}e{WAITMS:100}{layer:2},in layer2: q{WAITMS:200}{layer:1}
If you want to stop and not finish the currently executing repeat, it may be possible to add {ou}{flush} or maybe to the beginning but I would have to check on that as that's a little less clear to me.
However, I just tried this and Im not sure its working... Because when you change layer, its breaking the repeat (because the layer has changed, the simkey is not the same on the next layer)... I don't know if that's a new bug in the latest beta or if its always done that, so I will need to investigate further when I can find some time for XMBC.
Thanks,
Phil
Just so method 6 "repeatedly while the mouse button is down" is probably the most suitable option.
That should repeat while you hold the button as stop when you release the button. It should stop when releasing the button BUT, as I suspect you have found, it will finish the currently executing sequence by default.
I believe this is why I introducd the {flush}, {od}/{ou}/{or} tags, so you can add a command that runs only on button up (releasing the button)...
for example: {ou}{flush}e{WAITMS:100}{layer:2},in layer2: q{WAITMS:200}{layer:1}
If you want to stop and not finish the currently executing repeat, it may be possible to add {ou}{flush} or maybe to the beginning but I would have to check on that as that's a little less clear to me.
However, I just tried this and Im not sure its working... Because when you change layer, its breaking the repeat (because the layer has changed, the simkey is not the same on the next layer)... I don't know if that's a new bug in the latest beta or if its always done that, so I will need to investigate further when I can find some time for XMBC.
Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
Re: press to loop and release to stop
It works,i think i only need one layer like {ou}{flush}1{wait:n}2{wait:n}3{wait:n}4...
Re: press to loop and release to stop
Great!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)