store/retrieve cursor position in a macro? where's retrieve?

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
babag
Posts: 33
Joined: Fri Sep 18, 2020 10:09 pm
Operating System: Linux *buntu

store/retrieve cursor position in a macro? where's retrieve?

Post by babag » Fri Nov 06, 2020 7:02 am

i just made a macro and was surprised i couldn't find an option to retrieve a stored cursor position. i was able to store the position but couldn't find a counterpart for retrieval in the macro window. i also was able to find 'cursor to stored cursor position' in the 'select' menu but not in the macro window. i sometimes go blind looking for things in the various menus and windows so maybe i just missed it. did i? is it called something else? the workaround i came up with was to do it in two parts:

select cursor to stored
cursor to selection end

this worked for what i was doing but would be better if i could find a single 'cursor to stored cursor position' command in the macro window. the first command here creates a selection that ends at the retrieved position. the second command moves the cursor to the end of that selection. any pointers appreciated.

thanks,
babag

steve
Site Admin
Posts: 81218
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: store/retrieve cursor position in a macro? where's retrieve?

Post by steve » Fri Nov 06, 2020 9:52 am

Is this what you are looking for?
https://manual.audacityteam.org/man/scr ... ct:_Region
SelSave: | Store Selection | none | Stores the end points of a selection for later reuse.
SelRestore: | Retrieve Selection | none | Retrieves the end points of a previously stored selection.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

babag
Posts: 33
Joined: Fri Sep 18, 2020 10:09 pm
Operating System: Linux *buntu

Re: store/retrieve cursor position in a macro? where's retrieve?

Post by babag » Fri Nov 06, 2020 7:39 pm

thanks, steve. that works.

it's another unintuitive thing to me as it works with selections rather than cursor position. i was looking for a retrieve or restore counterpart to the 'store cursor position' command but couldn't find it. i actually think i tried at least one of these selection commands but probably got things crossed. i probably did something like 'store cursor position' and later 'retrieve selection' in trying to find a way to restore the cursor position. seems odd to be able to store something but not retrieve/restore it.

thanks again,
babag

Post Reply