Combine VBscript dialog with a standard function button

I have the following code in a (standard function) button:

ffmpeg -i {filepath$} -codec:v libvpx -quality good -cpu-used 0 -b:v 500k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1000k -threads 4 -vf scale= -1:480 -codec:a libvorbis -b:a 128k {destpath$}{file$|ext=webm}

This will convert a video file to webm with ffmpeg. This works fine. However there are some variables which I would like to edit. For example it would be great to have a script dialog to make the user select either "good", "best" or "realtime".

As far as I know we would have to use a VBscript to create the dialog. I have never used VBscript in my life but I just found out that Dopus has a script dialog editor that I might be able to use.

TL;DR: The big question here is how can I combine a VBscript dialog in the code I already have. Should I change the function from standard function to script function or what? An example here would be a lot of help :slight_smile:

You don't need to use scripting for very simple dialogs/choices. See Codes to display dialogs.

If you do want to use scripting, the easiest thing is to have the script run the command, as it can then feed whatever parameters it needs from the dialog it displayed into the command it will run. Examples of how to run commands from scripts are in almost every example script, so that will be the easy part. Learning VBScript or JScript will be the harder part, if you have not done any programming before. (OTOH, if you have, then they are both easy to learn. JScript is probably preferable since javascript is a lot more common these days and more likely to be useful for other things you might need to do one day.)