in my dreaded Applescripts. I have no idea how to convert a script like this to Python so for the moment
if someone might have a fix I'd sure appreciate it.
Thanks,
Carl
The error is:
Mail got an error: Can’t make {address:{"ckeyes@cxxxx.net"}, subject:"Alert! Motion Detected From Bunkhouse Camera.", content:"Hey Carl,....
- Code: Select all
tell application "SecuritySpy"
capture image camera number 2 as "/Users/TV/Sites/ss/2.jpg" with overwrite
end tell
tell application "IndigoServer"
set theInsert to "This attached image was taken at " & value of variable "ClockTimeAmPm" & " with your bunkhouse camera." & return & return & "Have a terrific " & value of variable "TimeOfDayShort" & "!"
set PrintDateTimeName to value of variable "DayDate"
end tell
set theSenderTemp to "info@whitefishhomesolutions.com"
set the_mailto to {"ckeyes@xxxxx.net"}
set nameList to {"Carl"}
set TheName to "Bunkhouse Webcam"
set the_subject to "Alert! Motion Detected From Bunkhouse Camera."
set the_content to ("Hey Carl," & return & return & "This is an automated message from your Indigo Security System." & return & return & theInsert & return & return & "To report a problem with your system contact " & theSenderTemp & "." & return & return & "Your image from, " & TheName as text) & ", from the folder " & PrintDateTimeName & " has been backed up into the folder Security Cameras." & return & return
tell application "Mail"
activate
set attachmentVar to "/Users/TV/Sites/ss/2.jpg"
set newMessage to make new outgoing message with properties {address:the_mailto, subject:the_subject, content:the_content}
tell newMessage
set x to offset of "Indigo Security System." in the_content
repeat with y from 0 to count of "Indigo Security System."
set font of character (x + y) of content to "Helvetica Bold"
set color of character (x + y) of content to {48632, 1630, 1102}
end repeat
set x to offset of TheName in the_content
repeat with y from 0 to count of TheName
set font of character (x + y) of content to "Helvetica Bold"
end repeat
set x to offset of PrintDateTimeName in the_content
repeat with y from 0 to count of PrintDateTimeName
set font of character (x + y) of content to "Helvetica Bold"
end repeat
set x to offset of "Security Cameras." in the_content
repeat with y from 0 to count of "Security Cameras."
set font of character (x + y) of content to "Helvetica Bold"
set size of content to (17)
end repeat
make new attachment with properties {file name:attachmentVar}
repeat with i from 1 to count nameList
make new to recipient at end of to recipients with properties {name:item i of nameList, address:item i of the_mailto}
end repeat
send
end tell
end tell