- Posted on
Mon Dec 29, 2014 1:50 pm
-
achterberg
offline
-
- Posts: 93
- Joined: Feb 22, 2005
- Location: Texas
Sorry, it does kind of ramble doesn't it, it made sense to me when I sent it. I'll do a list:
1. Received a freeze alert and the script seems to work with a real world "true". (this is good!)
2. I'm still not sure why it didn't (doesn't) return with "false". (I'm waiting until the alerts expire and the plugin returns "false" to check this again)
3. In the Alert1.py file that is called by the trigger (code in previous message), I was keying to the alertMessage1 value in the plugin that sets a variable for pauseandsay to speak. Doing this creates an error "speak string too long" in the log file, because the value of alertMessage1 is too long. Deleted the message variable because it wasn't necessary anyway and the script works fine (no error). It is not a matter of it not working; it seems to be doing what it should. I was just curious, for reference, what the limitation is in Indigo (or whatever is causing the error message) to cause/not cause an error of "speak string too long"?
I'll add 4. This is a proof of concept and a learning python exercise (trying to convert all applescripts to python to the extent possible); this will probably be modified for other things besides getting the weather alerts every time the temperature changes. So #2 above is a mystery (probably some coding error on my part), #3 is a curious question, and other than an erroneous date (which is not the plugin or Indigo, just bad data apparently), all is good.