run.qml not working (Windows)

• Jan 2, 2022 - 23:36

I can't get run.qml to show the console dialog. Some other plugins I've tried didn't show the console, either. In run.qml specifically there is something wrong with the 'proc.start("cmd.exe /c dir");' line, because when I commented it out and tried 'proc.start("notepad");' I got the expected behavior.


Comments

It does work, it does create output in the console (if run in the Plugin Editor):

Läuft…
Plug-In Details:
  Menü Pfad: Plugins.run
  Version: 3.0
  Beschreibung: This demo plugin runs an external command.
Debug: run ls
Debug:  Datentr�ger in Laufwerk C: ist Win10Pro-SSD
 Volumeseriennummer: 8218-5B99

 Verzeichnis von C:\Program Files\MuseScore 3\bin

10.02.2021  11:38              .
10.02.2021  11:38              ..
02.02.2021  03:56           309.128 concrt140.dll
11.03.2014  10:54         4.173.928 d3dcompiler_47.dll
10.02.2021  11:38              iconengines
10.02.2021  11:38              imageformats
26.03.2018  10:59           476.051 lame_enc.dll
19.03.2018  14:31         2.894.541 libeay32.dll
03.12.2019  21:03            21.112 libEGL.dll
03.12.2019  21:03         2.515.064 libGLESv2.dll
23.08.2018  19:58           390.353 libogg.dll
13.07.2011  19:29         2.375.168 libsndfile-1.dll
23.08.2018  20:10           630.014 libvorbis.dll
23.08.2018  20:10           363.607 libvorbisfile.dll
02.02.2021  03:56           585.096 msvcp140.dll
02.02.2021  03:56            23.944 msvcp140_1.dll
02.02.2021  03:56           186.248 msvcp140_2.dll
02.02.2021  03:56            41.352 msvcp140_atomic_wait.dll
02.02.2021  03:56            20.360 msvcp140_codecvt_ids.dll
08.02.2021  13:14           607.744 MuseScore3-crash-reporter.exe
08.02.2021  13:14        34.941.440 MuseScore3.exe
14.06.2016  12:00        20.923.392 opengl32sw.dll
10.02.2021  11:38              platforms
08.01.2019  15:25           608.256 portaudio.dll
10.02.2021  11:38              printsupport
08.02.2021  12:57               104 qt.conf
03.12.2019  21:03            33.400 Qt5Concurrent.dll
20.12.2019  13:17         5.842.040 Qt5Core.dll
03.12.2019  21:03         6.061.688 Qt5Gui.dll
03.12.2019  23:35           354.936 Qt5Help.dll
03.12.2019  21:03         1.236.088 Qt5Network.dll
03.12.2019  21:03           327.800 Qt5OpenGL.dll
04.12.2019  01:48           291.960 Qt5Positioning.dll
03.12.2019  21:03           325.752 Qt5PrintSupport.dll
03.12.2019  22:49         3.470.800 Qt5Qml.dll
03.12.2019  22:52         3.462.608 Qt5Quick.dll
03.12.2019  23:43           124.024 Qt5QuickControls2.dll
03.12.2019  23:43           782.968 Qt5QuickTemplates2.dll
03.12.2019  23:00            75.216 Qt5QuickWidgets.dll
03.12.2019  21:03           208.504 Qt5Sql.dll
03.12.2019  21:40           334.968 Qt5Svg.dll
03.12.2019  21:03           193.656 Qt5Test.dll
03.12.2019  23:39           117.880 Qt5WebChannel.dll
08.12.2019  17:03           341.112 Qt5WebEngine.dll
08.12.2019  17:03        67.829.368 Qt5WebEngineCore.dll
08.12.2019  17:03           227.448 Qt5WebEngineWidgets.dll
03.12.2019  21:03         5.599.352 Qt5Widgets.dll
04.12.2019  01:37           468.088 Qt5WinExtras.dll
03.12.2019  21:03           197.240 Qt5Xml.dll
03.12.2019  21:40         3.305.592 Qt5XmlPatterns.dll
08.12.2019  17:03            25.208 QtWebEngineProcess.exe
10.02.2021  11:38              sqldrivers
19.03.2018  14:31           540.776 ssleay32.dll
02.02.2021  03:56            94.088 vcruntime140.dll
02.02.2021  03:56            36.744 vcruntime140_1.dll
10.02.2021  11:38              webengineresources
26.10.2018  14:59         2.551.808 WinSparkle.dll
              49 Datei(en),    176.548.014 Bytes
               8 Verzeichnis(se), 698.643.472.384 Bytes frei

It does indeed do nothing visible if run via Plugins > run, but that isn't to be expected, not with that proc.start("cmd.exe /c dir");, and esp. with that console.log(proc.readAllStandardOutput());

Actually your proc.start("notepad"); doesn't really work. Yes, it does start notpad, but MuseScore then hangs, at least until notepad exits. To me that is at least as unexpected as the current behavoir is to you.

OTH that plugin is not supposed to do something useful, it is meant as an example how thing might get done.

Do you still have an unanswered question? Please log in first to post your question.