OK, we’ve figured out what’s happening. Let’s assemble everyone in the drawing room and I’ll explain how it all went down. Number One Son, please lock the door once everyone is in.
Here’s the scenario, given Mac OS 10.7 and/or 10.8:
Script 1 has the load script commands. Script 2 and 3 are the loaded scripts. All three are open in Script Editor.
If you make changes to either Script 2 or 3, but do not save them, then compile and run Script 1, you’ll get the “no such handler” error because the script(s) got replaced with the script when Script Editor tried to autosave:
error "This script contains uncompiled changes and cannot be run."
Sending that script the WiFiInfo() message errors because it obviously doesn’t have the handler. If you’d have run the loaded script, it would have thrown an error, but trying to call a handler in it generated the confusion we encountered. If you save script 2 and 3, and don’t touch them, script 1 should work fine. However, as soon as you modify script 2 or 3 and don’t save your changes, script 1 will error again.
So, the killer is: Script Editor’s autosave.
Thank you.
Jon
Always danger where men are evil, but knowledge best weapon for protection. – Charlie Chan