Variable as midi value

Hello
im triggering my macro using a shell script

osascript -e 'tell application "Keyboard Maestro Engine" to do script "B524CE71-ACD7-4BA1-A776-1D3683DE0163" with parameter "10"'

i want to get that parameter "10" and use it to send a midi with that value
how can i do it ? in the screenshot you can see it will not accept the variable as value

12%20PM

Hi @mortiestMorty,

The "with value" field is a calculation field , so it won't accept text tokens like %TriggerValue% as-is. What you need to do is first save the contents of the %TriggerValue% token to a variable, then use that variable in the "with value" field:

image

awesome now i have progress bar with touchosc,

here is my script:

#! /bin/bash
segundos=120
for ((i=0; i<$segundos;i++));
do
    echo -n "osascript  with parameter $i"
    osascript -e 'tell application "Keyboard Maestro Engine" to do script "Progreso" with parameter "'$i'"'
    sleep 1
done

thank you @gglick

1 Like