Re: "script does not understand the [handler] message" appears randomly
Re: "script does not understand the [handler] message" appears randomly
- Subject: Re: "script does not understand the [handler] message" appears randomly
- From: Alex Hall <email@hidden>
- Date: Thu, 23 May 2013 14:47:52 -0400
Oh right, sorry. I'm on a Mac Mini 2011, running the latest version of Mountain Lion (10.8.3). So far I have only tested things on this machine, but I do have a 2013 Macbook Air which will eventually be used to verify that the scripts work on more than just this Mac.
On May 23, 2013, at 2:43 PM, Emmanuel LEVY <email@hidden> wrote:
> Any version info?
>
> Emmanuel
>
> On May 23, 2013, at 8:33 PM, Alex Hall wrote:
>
>> Hello all,
>> I am not new to programming - I have a computer science degree and am most comfortable in Python, but know other languages as well. Recently I decided to dive into Applescript, and my first "real" project is a series of system monitor scripts. I am blind, so rely on Apple's Voiceover screen reader to access my Mac. One advantage of Voiceover is that it can speak text given to it by scripts, so I want to have scripts speak things like CPU load, free ram, wifi strength, and the like. Sighted people would use the Dashboard or a menu bar display for that kind of information, but that is not convenient for a Voiceover user - instead, one-key access to having the information spoken aloud is the better option, and I want to provide that to other Voiceover users.
>>
>> I have the scripts to get those details written and working perfectly, mostly relying on top and awk to get the details I need. I then made a series of scripts, one each for ram, processor, and wifi information so I can assign each to its own keystroke. All of these import both the getResourceInfo script (which has the handlers for grabbing system information) and the utilities script (with handlers for speaking, rounding, string substitution, and so on).
>>
>> Therein lies the problem, though: sometimes these imported scripts work, and sometimes they don't. For instance, this morning I ran my wifi script several times and Voiceover told me my network name and SSID flawlessly. I then ran it a few minutes later, having done nothing to any scripts, and got the error: "script does not understand the getWifiInfo message". (That "getWifiInfo" is the handler that returns the record holding all wifi information and is stored in my getResourceInfo script). More recently, I was running that same script and the getWifiInfo handler worked fine, but my script choked on calling a handler in the utilities script with exactly the same error. Again, I had changed nothing when the getResourceInfo script suddenly began to behave and the utilities script went crazy.
>>
>> Basically, it seems that my imported scripts randomly fail or work, and I can find no pattern or explanation. If I were getting these errors all the time I would not even bother you all, but the apparently arbitrary appearance of them is what has me so confused. If anyone has any ideas, I would greatly appreciate any help. I know programming email lists always want code samples, but where my work is spread across a bunch of scripts, I am not sure what code you all will need to see. If this list supports attachments, let me know and I'll just attach everything. Thank you in advance for any hints you may be able to provide.
>>
>>
>> Have a great day,
>> Alex (msg sent from Mac Mini)
>> email@hidden
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
Have a great day,
Alex (msg sent from Mac Mini)
email@hidden
_______________________________________________
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