set first responder and network settings...

Hi !

I have a problem that bugged me for days ! I just would like to change the ip of my mac using a script. The ip to use depends of an other script so I cannot use the “set current location/scselect” function. Therefore I have to enter the IP through a script. My problem is that when I managed to open the network settings panned, I do not manage to enter the IP I want (for exemple 127.127.127.127) using “set first responder”, can anyone help me/correct me ?

set first responder of window "Network" to text field "127.127.127.127" of window "Network"

thanks a lot in advance !

I think the best way to do this is by changing your “Location”

I thought so too but I cannot as the ip comes from before in the script. Wouldn’t my approach work ?

I haven’t tried this, but in general, assuming you had gone to the TCP/IP pane of the window “Network” and had “Manually” selected, then the IP Address is the value of text field 1 of group 1 of group 1 of group 1 of tab group 1 of group 1 of window “Network”