Feature request
for this usecase and many others:
1. Add "
Before playback expression..." setting. Should execute when transitioning from STOPPED to PLAYING and when changing track, but not from PAUSED state. a SEEK should also not trigger it.
2. New Expression Language function:
ShellRun(command, args, flags, timeout) command: shell command to execute (path to executable or .bat file)
args: optional arguments, e.g.:
filekey() [width] [height] flags: optional; 1=hidden, 2=KillOnTimeout, 4=CaptureStdout, 8= ... [flags values are added, 3=1+2]
timeout: optional, default=0; timeout in seconds to wait for command to finish. 0 means "do not wait", just start the process
With timeout>0:
- Mouse cursor can change to "busy" or some other custom icon/spinner while a command is executing, to provide some feedback to the user. Alternatively, show some on-screen indicator/notification somewhere.
- Pressing ESC or clicking the notification could immediately return from execution (forced timeout)
- On timeout, process should be killed only if "KillOnTimeout" flag is set.
Bonus: An "outputField" parameter could also be added - STDOUT would then be saved to this field. Alternatively, the CaptureStdout flag makes ShellRun() return the STDOUT output, allowing for things like setting a field to
=ShellRun(c:\tools\getInfo.bat) in the Tag Editor.