If the script is not a Plug-in script and it has a dialog the script will not record setting used recording the step into the action step just a script step with the name of the scrip will be recorded. When the Action step is played the script will run and do its normal process and display its dialog if it has one.
Plug-ins scripts like Adobe "Fit Image.jsx" and "Export Laters to file" have code that support action recording which record the setting used in the dialog into the action step being recorded and you will see the setting recorded into the action step if you expand the step so you can see all this is recorded for the step it the script is a plug-in script. If you do not record the step instead you insert the menu item menu File>Scripts>Name no dialog settings will be in the inserted in the action step. If the script is a plug-in script it should be recorded not inserted.
If the script is not a plug-in script it does not matter if you record it in an action or insert it into an action . Either way the step in the action will be a script step the names that has the script name the will be run. If the script displays a dialog it will display its dialog when the script is run.
Only Plug-in scripts can bypass displaying their dialogs. Edit the script "create sprites from layers" see if is is a plug-in script like Export Layers to files. If it is in the beginning of the script you will see all of its Dialog setting enumerated in "HARVEST_EXCEPTION_ZSTRING" section
