(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.....
&&
to||
. – Paul_Pedant Apr 14 '23 at 19:32||
which is explained in the answer to that other question, I will close this as a duplicate. Please ask about the cron issue separately, but try reading some cron tutorial first so you can ask about any tricky part. It might make more sense to ask on [apple.se] if it's about the macOS-specific applecscript as we're unlikely to know. – terdon Apr 14 '23 at 21:53