Script to move the cursor without moving focus from "pan/crop" or "track motion" timelines to the main timeline
Hi,
I'd appreciate your help.
I'm using the script below to move the cursor by 1 second to the right. I've assigned a shortcut to the script from Options>Customize Keyboard.
When the script is triggered by pressing the respective shortcut from the main timeline, no problem at all.
However, if I'm working from the "pan/crop" or "track motion" timelines, the script will move the cursor, but changing the focus to the "main timeline", broken my workflow.
For instance, from the "pan/crop" timeline I'd like to move the cursor and insert a keyframe by pressing the "insert" key, what is not possible since the cursor is now on the "main timeline", and I need to use the mouse to move the focus again to the "pan/crop".
=> When working on the "pan/crop" or "track motion" timelines, could a Vegas script move the cursor without moving the focus to the main timeline?
I mean, if working on the "pan/crop" or "track motion" timelines, the focus should be kept there when the script is triggered.
If working on the main timeline, also the focus should be kept there.
I recorded my screen detailing the issue:
Thank you!
using System; using System.Collections; using System.Windows.Forms; using ScriptPortal.Vegas; class EntryPoint { public void FromVegas(Vegas vegas) { vegas.Transport.CursorPosition = vegas.Transport.CursorPosition + Timecode.FromSeconds(1); } }