Need some help with NetworkSetup in applescript

Hi all

I have created an applescript to populate the proxy settings on a mac

do shell script "networksetup -setwebproxy Wi-Fi proxy 8080 on " & username & " " & password

where username and password are Karl & test

the events log shows

do shell script “networksetup -setwebproxy Wi-Fi proxy 8080 karl test”

So looks good - but

it does not populate the username and password into the fields, just takes out what was there and turns auth off

This is on 10.7.3

Any suggestions?

Thanks

Karl