(curl -s 'https://wayfair.com' | grep -q "Sale") && osascript SendMessage.scpt 5555551234 https://wayfair.com
The above works in conjuction with the script below to send a text message if Wayfair have the word sale on their main page. Wayfair is just an example.
on run {targetBuddyPhone, targetMessage}
tell application “Messages”
set targetService to 1st account whose service type = iMessage
set targetBuddy to participant targetBuddyPhone of targetService
send targetMessage to targetBuddy
end tell
end run
Is there a way to run the same command, but negate the information? For example, read through Wayfair's homepage and if Wayfair.com DOES NOT have the word "Sale" on their site, it would then send me a text?
I'm writing this in applescript and I am super new.....