i do know it s super simple but i did not succed in getting what i want,i ve got an an apple script ,and i d like to perform the script if the clipboard contains some word.
here s what a tried:
if currentURL contains {"*youtube*","*sondcloud*"} then
do stuff
i d like the condition to be an “OR” not both word in same url
thank you very much for the help
set theURL to "https://www.youtube.com" --> match
set theURL to "https://www.sondcloud.com" --> match
set theURL to "https://www.amazon.com" --> no match
if theURL contains "youtube" or theURL contains "sondcloud" then
display dialog "A Match"
else
display dialog "No Match"
end if
If more than two items are being tested, a repeat loop can be used:
repeat with anItem in {"youtube", "sondcloud"}
if theURL contains anItem then
display dialog "A Match"
exit repeat
end if
end repeat