Action recordable scripts in Photoshop
In order to build a script that requires user input (from a GUI) and can be recorded into an Action, you must code a particular set of features - I'll be providing a commented example, to be used as a template.