• 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: Toggle Modem Autoconnect Preference?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle Modem Autoconnect Preference?


  • Subject: Re: Toggle Modem Autoconnect Preference?
  • From: email@hidden
  • Date: Tue, 11 May 2004 20:34:00 -0400

I'd like to write a script to to toggle my modem's autoconnect preference in the PPP options, but can't seem to locate the appropriate preference file. Does anyone know which file it might be?

The desired File is 'prefererences.plist' at '/Library/Preferences/SystemConfiguration'.
The Key whose Value you are to change is 'DialOnDemand'.

To see how 'DialOnDemand' is changed from an '0' to '1' -
01. Via the 'System Preferences' 'Network' Utility - navigate to the Sheet [Show: PopUp Menu set to 'Internal Modem' and then click on the 'PPP Options...' Button] with the 'Session Options:' 'Connect automatically when needed' Check Box.
02. Click on the Check Box, the 'OK' Button, and then the 'Apply Now' Button.

Note: Should an Alert Box with 'Internet Connect: The connection has failed because you have not entered a telephone number' may appear at times, if so, just click on the 'OK' Button.

Locate the 'preferences.plist' File and drag it [thus making a Copy] to the 'Desktop', or to a 'Desktop' based 'untitled folder', and rename it - say 'preferences1-.plist'.

Now repeat Steps 01 and 02 above but removing the Check Mark from the 'Session Options:' 'Connect automatically when needed' Check Box, and not renaming the second 'Desktop' based dragged 'preferences.plist'.

Run 'FileMerge' - I assume you have installed the Developers Disc, where 'FileMerge' is located at '/Developer/Applications/Utilities'.

Drag 'preferences1.pist' onto the 'Left' drag and drop Well, of 'FileMerger' and 'preferences.plist' onto the 'Right' drag and drop Well, and then click on the 'Compare' Button.

A 'preferences[1].plist vs. preferences.plist' Window will appear.
Scroll down to where a single difference is highlighted.

As you will see - 'DialOnDemand' is in the 'PPP' Dictionary, of a unique Key - such as '412E767A-4887-11D8-BF11-00306570B9C0'* in the 'NetworkServices' Dictionary.

'412E767A-4887-11D8-BF11-00306570B9C0'* is listed in the 'Service' Dictionary of the 'Network' Dictionary of the '412E4FD6-4887-11D8-BF-00306570B9C0'* Dictionary of the 'Sets' Dictionary.

The '412E767A-4887-11D8-BF11-00306570B9C0'* Dictionary is determined by viewing the String of the 'CurrentSet' Key.

* - your Number / Letter Strings are sure to vary.

This should be a good starting Point.

--

SJWL
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Test, critique and ridicule this script!
  • Next by Date: Help with recursion
  • Previous by thread: Re: Toggle Modem Autoconnect Preference?
  • Next by thread: panther weirdness
  • Index(es):
    • Date
    • Thread