New Label Dialog Preference & Macro

Feedback and Reviews for Audacity 2.x
Forum rules
This board is ONLY for general feedback and discussion about Audacity 2.X.

If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
Al Stu
Posts: 131
Joined: Thu Oct 11, 2018 8:26 pm
Operating System: Windows 8 or 8.1

New Label Dialog Preference & Macro

Post by Al Stu » Sun Oct 21, 2018 11:13 pm

"Use dialog for the name of new label" ought to be ignored by macro AddLabel command.

The label name (text) can be set by the macro with the SetLabel command. Prompting for the label name in macro execution is unnecessary.

Help page:
Use dialog for the name of new label: This is off by default, but when enabled creating a label will pop up a dialog box for you to enter the label name (rather than the default behavior of opening the new label itself for editing). When the dialog is closed, focus is returned to the track which was the focus before the dialog opened. This functionality is primarily provided to aid Visually Impaired users who use screen readers, but may be useful to normally sighted users too.
New Label Dialog Preference.jpg
New Label Dialog Preference
New Label Dialog Preference.jpg (156.24 KiB) Viewed 465 times

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

Re: New Label Dialog Preference & Macro

Post by steve » Mon Oct 22, 2018 12:23 am

I presume that this solves the mystery of your other topic?
Al Stu wrote:
Sun Oct 21, 2018 11:13 pm
"Use dialog for the name of new label" ought to be ignored by macro AddLabel command.
I'd guess that most people that turn this option on, actually want this behaviour.
If you want it on normally, but off when running a particular macro, you could add:

Code: Select all

SetPreference:Name="GUI/DialogForNameNewLabel" Value="0"
at the start of the macro, and

Code: Select all

SetPreference:Name="GUI/DialogForNameNewLabel" Value="1"
at the end.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Al Stu
Posts: 131
Joined: Thu Oct 11, 2018 8:26 pm
Operating System: Windows 8 or 8.1

Re: New Label Dialog Preference & Macro

Post by Al Stu » Mon Oct 22, 2018 1:10 am

steve wrote:
Mon Oct 22, 2018 12:23 am
I presume that this solves the mystery of your other topic?
Al Stu wrote:
Sun Oct 21, 2018 11:13 pm
"Use dialog for the name of new label" ought to be ignored by macro AddLabel command.
I'd guess that most people that turn this option on, actually want this behaviour.
If you want it on normally, but off when running a particular macro, you could add:

Code: Select all

SetPreference:Name="GUI/DialogForNameNewLabel" Value="0"
at the start of the macro, and

Code: Select all

SetPreference:Name="GUI/DialogForNameNewLabel" Value="1"
at the end.
I'd guess that most people who want it on, is for manually adding labels. It defeats a main purpose of macros. Automation.
I'd also guess that most people who don't what it on would not appreciate a macro leaving it turned on.

Turning it off at beginning of macro and then on again at end of macro may result in it being left off if the macro is halted/fails. If going to use macro to control it then it would be better to have a macro command to ignore the setting rather than changing the setting.

Post Reply