Currently Being ModeratedFeb 2, 2013 7:47 PM (in response to MacMan240)
If it's just your girlfriend, you're probably not overly worried about security, so a simple change to your script should suffice...
set PowerSource to (do shell script "pmset -g ps")
do shell script "sudo ifconfig en1 up" user name "blah" password "blabblah" with administrator privileges
if PowerSource does not contain "AC Power" then
display alert "Please plug your computer in to a power source, then click continue."