• 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
AS Scripting gone in OSX?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AS Scripting gone in OSX?


  • Subject: AS Scripting gone in OSX?
  • From: Jim Witte <email@hidden>
  • Date: Tue, 22 Nov 2005 12:50:47 -0500

  How do I turn Airport power on and off with AS in OSX?  I've tried various variations of:

tell application "Internet Connect"
get item whose class is AirPort configuration of (every configuration)
end tell

(and then I'll set the power property) which don't work.  I can pull out a configuration by name, but the name of the Airport configuration is not necessarily "Airport".  Can I pull out a single configuration short of a repeat loop like this:

tell application "Internet Connect"
set tConfigs to (every configuration)
repeat with i from 1 to number of items in tConfigs
set pConfig to (item i of tConfigs)
if class of pConfig is AirPort configuration then
--display dialog i
set AirPort power of pConfig to false
end if
end repeat
end tell

Even this doesn't work (NSInternalScriptError).  And is there a way to supress the automatic opening of the application when any tell block is entered?

Thanks,
Jim
 _______________________________________________
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: AS Scripting gone in OSX?
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: Startup, shutdown
  • Next by Date: Mount Volume osax 10.4
  • Previous by thread: Re: Mail "get attachment" broken?
  • Next by thread: Re: AS Scripting gone in OSX?
  • Index(es):
    • Date
    • Thread