No internet connection
  1. Home
  2. How to

Mouse click with current mouse position

By Andrew Sherman @Andrew_Sherman
    2021-01-29 09:47:46.468Z

    Is it possible to generate a mouse click (or mouse double click) using the current mouse position? For example I have a transition already selected in Adobe Premiere and I want to edit the duration.

    • Press Streamdeck button to trigger
    • Double click at current mouse location
    • enter preset value (eg 4)
    • simulate press enter or click ok
    Solved in post #3, click to view
    • 4 replies
    1. Hi Andrew,

      Yes you can :)

      In a macro, you can use the Get Mouse Position action with the Mouse Double Click action, like this:

      First, add the two actions, then drag the orange "position" output from Get Mouse Position over the Position property on Mouse Double Click.

      Converted to a script, this becomes:

      
      const position = sf.mouse.getPosition().position;
      
      sf.mouse.doubleClick({
          position: position,
      });
      
      
      1. Your full macro would look something like this:

        ReplySolution
        1. Given your description, this would be a great candidate to turn into a template, so you won't have to copy/paste this for each of the duration lengths you want to set up.

          To learn how to work with Templates & Presets, please see this webinar:

          https://www.facebook.com/soundflow.org/videos/633065107406660

      2. A
        In reply toAndrew_Sherman:
        Andrew Sherman @Andrew_Sherman
          2021-01-29 13:14:21.654Z

          Excellent, thank you