Re: NSReceiverEvaluationScriptError: 4 on Airport Toggle on/off
Re: NSReceiverEvaluationScriptError: 4 on Airport Toggle on/off
- Subject: Re: NSReceiverEvaluationScriptError: 4 on Airport Toggle on/off
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 22 Feb 2004 08:04:51 -0800
On 2/22/04 7:09 AM, "Robert Short" <email@hidden> wrote:
>
Here is the script I am attempting to use, kindly donated by a list
>
member.
>
I have toggled on the assistive devices switch in preferences and am
>
still getting the ReceiverEvaluationScriptError
>
>
Anyone have any ideas? Thanks so much for helping me. I have spent a
>
lot of time looking at Apple's web site and googling for a solution and
>
come up empty handed!
>
>
>
tell application "System Events"
>
tell process "Internet Connect"
>
if exists button "Turn Airport Off" of window "Airport" then
>
click button "Turn Airport Off" of window "Airport"
>
else
>
click button "Turn Airport On" of window "Airport"
>
end if
>
end tell
>
end tell
It's not working because you haven't opened the application first, so there
is no 'process "Internet Connect". You just need to preface that script with
a line at the very top (tested):
tell application "Internet Connect" to launch
--
Paul Berkowitz
_______________________________________________
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.