You can pipe yes as that is a Linux command to any script that you run:
Code:
yes | /scripts/createacct happytime.foo happytf 12346666
If you do the above, it pipes yes when it runs and will create the user without having to input yes. Re-write your script to pipe yea like this and it should work. I just tested it and it doesn't even then ask me during the creation (I'm just pasting a small output as it creates the full account and goes on multiple lines afterward):
Code:
# yes | /scripts/createacct happytime.foo happytf 12346666
+===================================+
| New Account Info |
+===================================+
| Domain: happytime.foo
| UserName: happytf
| PassWord: 12346666
+===================================+
Checking input data......Done
WWWAcct 12.5.0 (c) 2012 cPanel, Inc.......Done
Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done
Adding User......Done
Copying skel files from /root/cpanel3-skel/ to /home/happytf/......Done
Adding Entries to httpd.conf......Done