Changing Proxy

Is there a way to change proxy settings without using GUI-scripting or changing location?

Multiple Post. See thread http://bbs.applescript.net/viewtopic.php?pid=59736#p59736