• 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: Scripting the Location
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting the Location


  • Subject: Re: Scripting the Location
  • From: Craig Sutherland <email@hidden>
  • Date: Mon, 1 Sep 2003 09:36:28 -0500

When the network location choices and status are returned with scselect, then using the same command to change the location is next. Fiddling with this, scselect needs both the number and the name of the location to make the switch. If there are 10 possible choices, how would they be presented to the user? You end up with a textual representation of the System configuration framework preference that is stored in /var/db/systemconfiguration/preferences.xml. This same info is presented in a GUI format with the Network Pref Pane. Has moving the interface from GUI to text made the scripting user choices better?

We can explore and find the under the hood mechanism, objects and techniques that are the core of user interaction. In this case, it looks like using the location menu item in the Apple menu along with a good understanding of what can be done with the existing dynamic network configuration is the best solution. As an exercise and learning process, attempting to script this has been useful and fun, but is this a path to implement a better interface than what is currently available

Craig
On Saturday, August 30, 2003, at 06:00 PM, John C. Welch wrote:
On 08/30/2003 16:05, "Paul Berkowitz" <email@hidden> wrote:
Actually there were two questions:
1. Why am I getting an ERROR in AppleScript?
This seems to happen if you get a large amount of text back. I've run into
it in other things.
2. And is there any way to avoid it other than the try/error block I used?
The error number is 1 (yup, 1) so I can trap for that number particularly,
but I'd bet there's something more reliable I can do in the shell script to
avoid the error.
Dunno off-hand.

john

Groovin' to Too Darn Hot (1956 Version) by Ella Fitzgerald off of Ella Fitzgerald Sings the Cole Porter Songbook, Vol. 1
_______________________________________________
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: Mail.app - dictionary implementation questions.
  • Next by Date: Outlook Express script: forward email as attachment
  • Previous by thread: Re: Mail.app - dictionary implementation questions.
  • Next by thread: Re: Scripting the Location
  • Index(es):
    • Date
    • Thread