Scripting: issues running [CLOSED]

Sorry if this is not the right forum to ask about Audacity scripting.

I successfully built Audacity code on Windows, including the mod-script-pipe.dll module.

Now, I am trying to run the script to get the screenshots saved to the $home.‘/pipetest’ directory but I am having an issue on line 105, when the code is trying to iterate the contents of the pipe to build an array to return.

while ($resp = <FROM_SRV>) {

The code just enters a endless while loop and I need to kill the perl process. Every time I try to run the script I get this error.

Audacity is always open before running the test.

Note that after killing the perl process, I need to re-open Audacity in order to run the script again (unless until line 105), otherwise I will get an error on line 46 as the program can’t open \.\pipe\ToSrvPipe.

Does this mean that Audacity is not “listening” to the pipes that are indeed created by the script and perhaps, the mod-scrpt-pipe.dll, despite being in \win\release\Modules is not working?

My environment is:
Windows 10
Perl installation from ActiveState
Build of Audacity 2.1.2

Any help will be appreciated.

More information:

I have enabled the mod-script-pipe module in Audacity (Edit → Preferences → Modules)

Before entering to the endless loop at line 105, the script writes [Select: Mode=All] on the command line.

Also, if during the time the perl script is in the endless loop waiting for a response from the pipe I close Audacity, the script continues and prints a lot of information such as total time for commands (please see attached file).

Question: Are execution times recorded in the attached file for each command (i.e. exporting a file [Total time for command: 6e-006 seconds.]) suspiciously short?

output.txt (27.1 KB)

Scripting is experimental and only intended for developers. No official support is offered for it.

You can save screenshots one at a time in Audacity without using scripting. One possible purpose of scripting is that we would use it to automate screenshot production for the Audacity Manual. So it “should” work.

I see you have posted on audacity-devel So rather than having concurrent threads I will close and lock this topic.