Please find attached one sample script which prompts the user to select and set mid surface thickness.
To run this script you will have to select the API version as V17 or greater. See below image.
When you run the script, you won't see a typical pop up panel for entering inputs. Here, the inputs panel appears on the left side, usually where you see the Tool options. See below image showing the inputs for this script.
Let me know if this helps.