Error: when trying to aovid the dialog waiting in the script

Hi everyone!
When I tried to make my pipeline, I used

bst_process('CallProcess', 'process_select_files_data', [], [], ...

to import 'link to raw' data to the database automatically, then I found that the dialog would wait until pressing the 'Import' which interrupted the process.
I revised the
bst_mutex('waitfor', panelName);(line 68 in gui_show_dialog.m)
if panelName== 'ImportDataOptions'
bst_mutex('waitfor', panelName);
It works on my script, but when other dialogs wait, there is a warning that:

** Error: Line 68: 矩阵维度必须一致。
** Call stack:
** >gui_show_dialog.m at 68
** >panel_process1.m>RunProcess at 115
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 777
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 298

It looks like no matter, but the process can't work after pressing 'run'. Would you resolve it?

The process_select_files_data finds data (recording) files that are already imported in the Brainstorm database. To add a raw data to the database as "link to raw", use the process process_import_data_raw.

If you have already the "link to raw" in your database, you can use any of following process to import the recordings. There are examples of their use in many of the provided tutorial scripts:

  • process_import_data_event To import epochs around events from raw file
    (example in tutorial_introduction.m)
  • process_import_data_epoch To import epochs from epoched raw file
    (example in tutorial_ctf.m)
  • process_import_data_time To import an specific segment from row files
    (example in tutorial_epilepsy.m)

Edit: Added info on processes process_import_data_*

thank you, I made an error while copying the code, I did use import_raw_to_db(sAvgData(count).FileName),
But that problem hasn't been solved: whenever I run this program, the dialog stays until I press the 'import' button

The import_raw_to_db is used when importing a raw file using interaction with the GUI, thus it is expected from the user to click on the Import button.

For importing non-interactively recordings from a raw file, use one of the three processes that were mentioned in the post above.

Also, form the line shared import_raw_to_db(sAvgData(count).FileName) it seems sAvgData is a structure corresponding to a recording already imported in the database (because it has the FileName field). I am not sure what is the goal of using import_raw_to_db on it.

thank you! I would try it.
The reason to use ‘import in database ’ on sAvgData is for connectivity calculation, the raw reviewed form my files can’t participate this calculation. So I got the name of these data, then did above processes.