Need Help With Audacity Script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Sidd
Posts: 3
Joined: 21 Nov 2022, 08:17

Need Help With Audacity Script

Post by Sidd » 27 Nov 2022, 02:54

Hi, there I have a simple audacity script that just needs a little bit of tweaking, hoping someone could help me out with my problem. The script will do three things with my audio, it will add a noise reduction, normalize, and limiter effects on the given audio file but I want the script to wait for the effect to finish before proceeding to add the next effect, unfortunately, winwait and winwaitclose does not work with my script.Pls note that the script works without winwait and winwaitclose but will not work properly if it's added, the only problem is that some effects take longer to work and process than others and i would need AHK to wait before applying the next effect. Really appreciate anyone who can help!!

Code: Select all

^F3::
#IfWinActive ahk_exe audacity.exe
Send !{c}n{Enter}{Tab}{Tab}{Tab}{Tab}
sleep 10
Send {Enter}
; Winwait, ahk_class #32770
; WinWaitClose, ahk_class #32770
Send ^a, 1
sleep 10
Send !{c}n{Enter}{Enter}
sleep 10
; Winwait, ahk_class #32770
; WinWaitClose, ahk_class #32770
Send !{c}{n}{n}{Enter}
sleep 10
Send {enter}
; Winwait, ahk_class #32770
; WinWaitClose, ahk_class #32770
Send !{c}{l}{l}{Enter}
sleep 10
Send {enter}
Winwait, ahk_class #32770
; WinWaitClose, ahk_class #32770
return

User avatar
mikeyww
Posts: 26593
Joined: 09 Sep 2014, 18:38

Re: Need Help With Audacity Script

Post by mikeyww » 27 Nov 2022, 07:51

will not work properly if it's added
This is not a real problem statement. What actually happens? Describe in detail.

You can add the leading window text to your WinTitles. Run Window Spy to see what it is.

#IfWinActive:
The #IfWin directives are positional: they affect all hotkeys and hotstrings physically beneath them in the script.
This refers to the hotkey or hotstring name itself. Example

sooyke_
Posts: 25
Joined: 18 Nov 2020, 10:27

Re: Need Help With Audacity Script

Post by sooyke_ » 27 Nov 2022, 13:48

Audacity have build in macro function , there are several examples to chain functions for audio processing . You can use ahk to start the macro.

User avatar
mikeyww
Posts: 26593
Joined: 09 Sep 2014, 18:38

Re: Need Help With Audacity Script

Post by mikeyww » 27 Nov 2022, 14:11

That's a good idea-- would be more reliable than trying to execute a series of multi-step menu & button activations.

Post Reply

Return to “Ask for Help (v1)”