I am having some trouble trying to set the proxies. Most of the code (below) works ok, I can capture the variables ok, however I cannot effectively pass them to the command, this syntax works great when setting the computername etc, but not with this command. I continuously get the error :
"error "** Error: The parameters were not valid." number 4"
I am told I may need to use a echo command and a pipe from this document
However, I am unable to get the syntax right. The end goal is obvious, I need to prompt for a username and PW and then set the proxies for a given interface.
My Script:
set myUser to text returned of ¬
(display dialog "Enter Your email address" with title ¬
"My Proxy Setup" default answer ¬
"" buttons {"Continue…"} ¬
default button 1 ¬
)
set myPassword to text returned of ¬
(display dialog "Enter Your corporate password" with title ¬
"My Proxy Setup" default answer ¬
"" buttons {"Continue…"} ¬
default button 1 ¬
)
**do shell script "/usr/sbin/networksetup -setsecurewebproxy Wi-Fi domain.com 8443 On" & myUser & myPassword**