• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to Renew DHCP Lease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to Renew DHCP Lease
      • From: Gnarlodious <email@hidden>
    • Re: How to Renew DHCP Lease
      • From: Eric Geoffroy <email@hidden>
References: 
 >How to Renew DHCP Lease (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Setting permission from an applescript
  • Next by Date: Stopping classic
  • Previous by thread: How to Renew DHCP Lease
  • Next by thread: Re: How to Renew DHCP Lease
  • Index(es):
    • Date
    • Thread