Looking for script

Hey guys, do any of you have a script which uses a GUI to set variables which also then has a button to run a script using the variables set in the GUI? I'm trying to get this set up so users can run my script and have a nice GUI to set the variables and image path without having to mess with my actual scripts, but I am having a lot of problems getting the GUI linked up with my actual scripts.

If any of you have a sample script I could look at to try and figure out what I am doing wrong I would greatly appreciate it.

thanks,
rob