• 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: "script does not understand the [handler] message" appears randomly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "script does not understand the [handler] message" appears randomly


  • Subject: Re: "script does not understand the [handler] message" appears randomly
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 23 May 2013 17:20:27 -0700

On May 23, 2013, at 3:31 PM, Alex Hall wrote:

Here's my wifi script, just so you can get an idea - all the scripts work about this way, though some have different keywords and some need more logic. Still, this is basically how it works:

#script: wifi status.scpt
set template to "You are connected to $ssid at $signalStrength DbM."

property utilities : load script POSIX file "/Users/mehgcap/prog/apple scripts/utilities.scpt"
property getResourceInfo : load script POSIX file "/Users/mehgcap/prog/apple scripts/getResourceInfo.scpt"

set wifiInfo to getWifiInfo() of getResourceInfo
set keywords to {"$ssid", "$signalStrength"}
set keywordReplacements to {(ssid of wifiInfo), (signal_strength of wifiInfo)}
set template to str_replace(keywords, keywordReplacements, template) of utilities
if not wifi_enabled of wifiInfo then set template to "Wifi is currently disabled."
tell utilities
speak(template)
end tell
#end script

I don't see any obvious source for the problem in that code. However, there's one last thing I can think of—be sure your handler names don't conflict with terminology from applications, scripting additions, or AS itself.

I will look into [script library utilities], but I want these to be distributable. Ideally, a user needs to just download the zip file, unzip it into ~/library/scripts/Voiceover, and that's it. They can assign them to keystrokes, assign them to keyboard commander commands (a VO thing), call them from the script menu, whatever, but there would be no installation of any extra packages.

In this case, if I were me, I'd skip the library idea and just pull the handlers into your scripts. Libraries are great in a controlled environment, but not for distributing to others.

Regards,
Stan C.
--
"Software and cathedrals are much the same. First we build them, then we pray." -- Sam Redwine, Jr.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: "script does not understand the [handler] message" appears randomly
      • From: Alex Hall <email@hidden>
References: 
 >"script does not understand the [handler] message" appears randomly (From: Alex Hall <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Stan Cleveland <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Alex Hall <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Stan Cleveland <email@hidden>)
 >Re: "script does not understand the [handler] message" appears randomly (From: Alex Hall <email@hidden>)

  • Prev by Date: Re: "script does not understand the [handler] message" appears randomly
  • Next by Date: Re: AppleScript-Users Digest, Vol 10, Issue 192
  • Previous by thread: Re: "script does not understand the [handler] message" appears randomly
  • Next by thread: Re: "script does not understand the [handler] message" appears randomly
  • Index(es):
    • Date
    • Thread