所以我以前从没用过applescripts,也不知道怎么写代码。
我正在尝试使用我在网上找到的这个脚本,但我收到了“语法错误:预期的表达式但找到了命令名称”
任何帮助,将不胜感激
代码:
on idle
tell application "System Events"
tell current location of network preferences
set myConnection to the service "BTGuard”
if current configuration of myConnection is not connected then
try
tell application "transmission"
quit
end tell
connect myConnection
–say "Retrying connection"
end try
else
tell application "transmission"
run
end tell
end if
end tell
return 1
end tell
end idle