Page 1 of 1

IML working for text fader, but not button

Posted: 18 Nov 2022, 06:35
by woodslanding
This code works on the text fader, for control = 'MYTEXTFADER' and data = 'name':

Code: Select all

    SendUsineMsg('SET_TARGET_PATCH','PARENT_PATCH');
    SendUsineMsg('SET_STRING_VALUE',control,'1',data);
but this code does not seem to be changing the value of a button, for control = 'MYBUTTON' and data = '1':

Code: Select all

    SendUsineMsg('SET_TARGET_PATCH','PARENT_PATCH');
    SendUsineMsg('SET_VALUE',control,'1',data);
I can't figure out why one is working and the other is not.... do I have this syntax right?

Re: IML working for text fader, but not button

Posted: 18 Nov 2022, 07:00
by woodslanding
okay, I remembered the trace within a trace, and the IML does seem to be going through:

Code: Select all

process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_STRING_VALUE INST 1 Reaktor  
Set String Value INST 1 Reaktor
process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_VALUE INSTMOUSE 1 1  
Set Value INSTMOUSE 1 1
process msg SET_TARGET_PATCH PARENT_PATCH    
SET_VAR patch 4928425519550224534 = D:\WINDOWS_MOON\Desktop\HH 5\gui.pat
process msg SET_VALUE INSTMOUSE 1 0  
Set Value INSTMOUSE 1 0
If I change the name of the control, I get an error saying it can't be found. However, with the inspector on the out cable of the button, I am not seeing any changes:
iml_button_issue.png
I am calling both from a processIdle thread in a script like so:

Code: Select all

if gLoadInst then
    begin
        debug('sending inst load                       @@@@@@@@@@@@@@@   INST: '  + instToLoadIN.asString);
        sendText('INST',instToLoadIN.asString); 
        gMouseName := 'INSTMOUSE';
        sendVal(gMouseName,'1');
        gMouseDown := TRUE;
        gLoadInst := FALSE;
    end;

    if gMouseDown then 
    begin
        sendVal(gMouseName, '0');
        gMouseDown := FALSE;
    end;
edit: okay, I changed the above code to 'else if gMouseDown' so the two would be sent on separate passes, and now the mouse button sometimes triggers.... I guess I'll try putting more space between IML events.

oh yes, I see, the mouse down and mouse up events ended up being sent simultaneously, so that makes sense....

Re: IML working for text fader, but not button

Posted: 18 Nov 2022, 08:00
by woodslanding
okay, I put a countdown in and it seems to be working. Thanks anyway...

Always helpful to figure out how to explain your problem to someone else!!

Re: IML working for text fader, but not button

Posted: 20 Nov 2022, 14:58
by senso