Re: How to Renew DHCP Lease
Re: How to Renew DHCP Lease
- Subject: Re: How to Renew DHCP Lease
- From: Brian <email@hidden>
- Date: Mon, 18 Apr 2005 18:38:38 +0200
Hello,
The "DHCP Release" button is a little bit far in the window :
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.network"
end tell
tell application "System Events"
tell window 1 of application process "System Preferences"
-- Go to the "Buit-in Ethernet" section
click pop up button 2
set aList to name of menu items of menu 1 of pop up button 2
-- I hope this will work with other languages
repeat with i from 1 to (count aList)
if ((offset of "Ethernet" in (item i of aList)) is not 0) then
click menu item i of menu 1 of pop up button 2
end if
end repeat
-- TCP/IP tab
click radio button 1 of tab group 1 of group 1
-- The button is here
click button 1 of group 1 of group 1 of group 1 of tab group 1 of group 1
end tell
end tell
There is a really useful Apple utility named "UIElementInspector", you can download it here :
http://www.apple.com/applescript/uiscripting/02.html
Brian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden