I want to set the script parameters through command-line parameters, and then when running, users don't need to fill in the parameters; they can run directly
I think you could use another thread with the browser to accomplish this. And saving the necessary data to a resource / global variable, then using this data in the new thread, whether with the browser or whatever needs to be done.