我会自信地说这 无法完成。我的意思是,AppleScript中没有方法或实现可以有效,安全,明智地或以任何实用,有用或可用的方式来完成这种事情。
这包括:
,
如果Chrome或Safari的前选项卡位于包含单词“ youtube”的URL上,这将发出恼人的声音。
**编辑**以使其在自动化器中起作用:
(在输入框中替换 all 代码)
on run
set check to "youtube"
repeat
try
tell application "Safari"
set theURLs to URL of current tab of window 1
end tell
end try
try
tell application "Google Chrome"
set theURLc to URL of active tab of front window
end tell
end try
if check is in theURLs then
tell application "System Events"
beep
end tell
end if
if check is in theURLc then
tell application "System Events"
beep
end tell
end if
end repeat
end run
本文链接:https://www.f2er.com/3147805.html