No internet connection
  1. Home
  2. Ideas

Template command property - new property type

By Andrew Sherman @Andrew_Sherman
    2024-04-01 11:09:10.890Z

    I'd like to be able to select command items from a specified folder in a package.

    For example some of my templates do the following:

    1. Run a Soundflow command which provides an initial value
    2. Run menu automation in another application, which launches a script which is run in the other application, using the initial value
    3. Run another Soundflow command.

    Currently I do this using command IDs and paste the value into a string property in the template, but it's very cumbersome.

    I'm hoping to be able to maker the process quicker by being able to choose commands from a dropdown list in the property. Ideally it wouldnt be the whole list of all commands in Soundflow, but I would specify the package and even a folder within the package first, then the dropdown would contain the list of commands relevant. These commands are themselves built in templates and each have their own command id.

    Solved in post #3, click to view
    • 7 replies
    1. S
      SoundFlow Bot @soundflowbot
        2024-04-01 14:27:59.737Z

        This issue is now tracked internally by SoundFlow as SF-1170

        1. In reply toAndrew_Sherman:

          Hi Andrew,

          You can use the "Callback Function" type for this instead. Instead of allowing just a single command to be dropped, it allows you to add any number of commands for a property.

          You call it as a function from within the template.

          Reply3 LikesSolution
          1. AAndrew Sherman @Andrew_Sherman
              2024-04-02 09:20:19.292Z

              Wow, this looks promising Christian. I tried to add a function to my command, and I've added the Callback Function property to the template, but when I add a command to the property in the preset, it does not seem to trigger the command. Could you let me know how to use the Callback Function?

              1. Example, where the property is called onButtonDown:

                const { onButtonDown } = event.props;
                
                if (onButtonDown) {
                    onButtonDown();
                }
                
                1. AAndrew Sherman @Andrew_Sherman
                    2024-04-02 14:48:26.330Z

                    Wow, my mind is blown. This is going to be very powerful. With great power comes great responsibility

                    1. Yay! :)

                      1. Loved this. I was coming here to request this and this post was suggested. Did not know this existed. Have to fix up function Buttons for dummies now :P