I need a programming trick...

George Handley ghandley at kc.rr.com
Fri Aug 4 11:39:34 EDT 2017


XTensioneers,

I have a script I’m working on that has a set of quote marks within a line of text I’m testing.

The value of the var  CurrentFailedSensorsEmail is initially holding the correct value which should be: 
"<font color="#000000">FAILED SENSORS:<br><br>,” but when I compile, because of the extra quote marks, AppleScript or XTension adds the word “Then” to the line because it thinks its an equation instead of a line of text in a property.

How can I stop it from doing this? I’ve tried parenthesis, brackets and curly brackets, but that’s not the trick. What addition char is needed to make XTension or AppleScript stop adding “Then?”

Thanks,

George


write log "Origin = " & origin
		write log "The value of CurrentFailedSensorsEmail is: " & CurrentFailedSensorsEmail
		if origin = "email" then 
			if CurrentFailedSensorsEmail = "<font color=" then #000000">FAILED SENSORS:<br><br>"} then --If that's the correct value, there are no failed sensors

Here is the log:

8/4/17 9:43:47 AM  Origin = email
8/4/17 9:43:47 AM  The value of CurrentFailedSensorsEmail is: <font color="#000000">FAILED SENSORS:<br><br> --This is correct, but the next test has put a “Then” in the sentence
8/4/17 9:43:47 AM  yuck 3
8/4/17 9:43:47 AM  speach phrase buffered because system is already speaking "yuck 3"
8/4/17 9:43:47 AM  At this point the EmailResponse equals: <font color="#000000">CURRENT HOME STATUS<br>Friday, August 4, 2017, 9:43 AM<br>
8/4/17 9:43:47 AM  At this point CurrentFailedSensorsEmail equals: <font color="#000000">FAILED SENSORS:<br><br>
8/4/17 9:43:47 AM  At this point CurrentGoodSensorsEmail equals: <font color="#000000">WORKING SENSORS:<br><br><br><font color="#000000">CABLE INTERNET SERVICE: <br><font color="#00FF00">Connected to the internet<br><br>
8/4/17 9:43:47 AM  <font color="#00FF00">The Burgler/Fire Alarm is NOT in alarm.<br><br><font color="#00FF00">There Is Communication.<br>
8/4/17 9:43:47 AM  At this point CurrentFailedSensorsVoice equals:
8/4/17 9:43:47 AM  At this point CurrentGoodSensorsVoice equals: [[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]][[slnc 200]]SPECTRUM ISP SERVICE: [[slnc 200]] Connected[[slnc 200]]
8/4/17 9:43:47 AM  yuck 5
8/4/17 9:43:47 AM  speach phrase buffered because system is already speaking "yuck 5"
8/4/17 9:43:47 AM  email queued
	
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20170804/14e9b8ae/attachment.html>


More information about the XTensionList mailing list