No internet connection
  1. Home
  2. How to

Running "BG Edit" Script moves cursor to far left of screen

By Matt Yocum @Matt_Yocum
    2021-08-16 21:46:27.064Z

    Running "BG Edit" Script moves cursor to far left of screen

    System Information

    SoundFlow 4.3.5

    OS: darwin 20.5.0

    ProductName: macOS
    ProductVersion: 11.4
    BuildVersion: 20F71

    Steps to Reproduce

    1. Launch PT Session
    2. Set two markers
    3. Run BG Edit Script (which selects from previous to next marker, trims, adds 1 frame to either side, then adds fades)

    Expected Result

    BG edit should run without moving cursor

    Actual Result

    Cursor gets teleported to far left of edit window/screen

    Workaround

    move cursor back a lot

    Other Notes


    Links

    User UID: ShGWcGXzu2dzdsOHjNepjcRMrYw2

    Feedback Key: sffeedback:ShGWcGXzu2dzdsOHjNepjcRMrYw2:-MhFvWZl-G1PE1opghkn

    Feedback ZIP

    • 6 replies
    1. Hi Matt,

      Can I get you to use the Script Help feature for this or quote the script you're using?

      1. MMatt Yocum @Matt_Yocum
          2021-08-18 20:46:02.576Z

          Hey Christian,

          Sorry for not getting back to you sooner. Is there a way to get automatic emails similar to the AVID beta forum where I get a notification when you reply on here? I totally forgot to come back for this.

          I'm going to copy and past the script here below. I'm using your macro script setup to trigger key punches but I've converted it to a script for you here:

          sf.ui.proTools.memoryLocationsSelectBetween();

          sf.keyboard.press({
          keys: "cmd+t, alt+numpad minus, cmd+numpad plus, f",
          });

          Thanks!

          1. MMatt Yocum @Matt_Yocum
              2021-08-18 20:55:15.165Z

              Actually I just figured out the email reply setting so now I should get notified!

              Thanks :)

              1. Hi Matt,

                I'd highly recommend using UI automation for this instead of keyboard simulation.
                You can learn more about how to use UI automation instead of keyboard simulation in the following 2 videos:

                Please also check this video for how to best get help in various situations so that scripts and any log files are sent to the forum – will give you quicker and better help if you follow this:

                Finally, make sure to check this for how to quote code in the forum:

          2. M
            In reply toMatt_Yocum:
            Matt Yocum @Matt_Yocum
              2021-08-24 18:24:24.950Z

              Hey Christian,

              Thanks for providing these excellent tutorials. I really appreciate it.

              One thing I realized almost immediately though is that the "Click Menu Item" UI automation isn't going to work for me because I would need to change the application selection in the shortcut super often. I know most people just select "pro tools" but being a part of the AVID Beta tester group I'm constantly updating and renaming "pro tools" to append version numbers and such.

              Is there a workflow to get around this?

              Also, after watching the videos I'm still not sure why the mouse is being thrown to the far left of the screen, similar to the edit window being thrown to the far left? Not sure how keyboard shortcuts are the culprit here

              Thanks again for your time!
              Matt

              1. M
                In reply toMatt_Yocum:
                Matt Yocum @Matt_Yocum
                  2021-08-24 18:29:24.105Z

                  Also, you may find it useful info (maybe) that I think the culprit is actually the "select between markers" trigger.

                  I tried running the same script with that disabled and it works flawlessly every time. Then I tried the "go to previous/next marker" trigger which doesn't work the same way but also did not give me any issues. Lastly, I tried running ONLY the select between markers trigger without doing any of the subsequent key presses and it gives me the same thing where it moves the cursor.

                  Something in the way soundflow is achieving selecting between markers is the fault in the chain here. Any ideas?

                  Thanks again
                  Matt