Disable external button
patriot_stv
Junior Member
Hello!
Is there a command that can disable all external buttons? I mean, I need to EXT button is only activated when a specific event on and off until the event has not occurred
Is there a command that can disable all external buttons? I mean, I need to EXT button is only activated when a specific event on and off until the event has not occurred
Comments
-
Set a variable inside your code that reflects when you want the buttons to work. In the button event for the external button test if that variable is on or off.
-
I understand it. I can not find a team that can disable the external buttons on mio r4 upon the occurrence of certain events.
For example
button_event [mio_1, key_volup] {push: {send_string dvReciv, 'volup}
button_event [mio_1, key_voldw] {push: {send_string dvReciv, 'voldw}
Etc.
If (event1= 1) {*disable key_volup and voldw*} --- what command for disable?
in the project I made the substitution device. it works, but I think this is the wrong decision.
Example
Define_variables
DEV void_dev
Define_event
Channel_event {mio_1,button} {
on: dvReciv = void_dev
Off: dvReciv = 5001:1:1}
button_event [mio_1, key_volup] {push: {send_string dvReciv, 'volup}
button_event [mio_1, key_voldw] {push: {send_string dvReciv, 'voldw}
Etc)))) -
Try something like this:
BUTTON_EVENT[mio_1,0]//0 catches all button events for the mio_1 dev/port { PUSH: { STACK_VAR INTEGER nBtn; nBtn = BUTTON.INPUT.CHANNEL; if(!nDisable)//prevents the following buttons from firing if set { SWITCH(nBtn)//these buttons will work if nDisable is not set as long as a case matches nBtn { CASE key_volup:{send_string dvReciv, 'volup';} CASE key_voldw:{send_string dvReciv, 'voldw';} CASE key_volxx:{send_string dvReciv, 'volxx';} CASE key_volyy:{send_string dvReciv, 'volyy';} } } SWITCH(nBtn)//these buttons will work regardless of the disable flag as long as a case matches nBtn { CASE key_disable:{nDisable = !nDisable;} CASE key_pwr_on: {send_string dvReciv, 'pwr_on';} CASE key_pwr_off:{send_string dvReciv, 'wr_off';} } } }instead of changing your dev to a null which will likely just piss off the master when it tries to send a string to it unless your null is a virtual that is.
Just set a var and use as a flag to determine if button pushes should be processed or not which is what AMXJeff was talking about.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
