Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: The actual state of the button into a variable
Good day.
VDJScript: I have a CUE button on the mixer. Sends PFL On / Off status. How do I store the status of a button in a variable?
set 'CUE' ????
Thank you for your help.

Inviato Tue 17 May 22 @ 8:02 pm
locodogPRO InfinityModeratorMember since 2013
set 'CUE' `pfl`

not sure on the usefulness, you could just query pfl itself

pfl ? it is on : it is off

Inviato Wed 18 May 22 @ 1:01 am
this is just a test script. But it doesn't work. I'm learning.
set 'CUE' `pfl` &
var 'CUE' ?
prelisten :
prelisten_stop :

Inviato Wed 18 May 22 @ 9:48 am
To describe the problem. VDJScript Mix pio900nx: I need to save the current state of the CUE button in the CUE press event. This occurs in a PFL on / off event.
pfl? it is on: it is off
In my opinion, in this case I am asking about the "headphone output on / off" status but not the current status of the CUE button on the mixer.

Inviato Wed 18 May 22 @ 9:59 am
locodogPRO InfinityModeratorMember since 2013
you are pressing this button?, does it have the correct deck focus?

this custom button on deck 1, when deck 1 pfl is on & button is pressed sets the var a to 1.0, if deck 1 isn't pfl & the button is pressed the var will = 0

set a `pfl`

easiest to watch what is actually happening by opening
and checking the update box, and testing your button watch what changes

Inviato Wed 18 May 22 @ 10:06 am
it solves
toggle 'CUE'
when PFLon / off writes the actual value of the CUE button to the CUE variable. Solved

Inviato Wed 18 May 22 @ 5:47 pm