2

我正在尝试编写一个简单的 Applescript,它每 10 分钟从一组定义的数字中轮换 MAC 地址 - 我已将以下内容作为 Automator 中的工作流放在一起,并且它正在运行而不会引发任何错误,但它不会似乎在工作!

我不知道为什么不是,但这是我写的第一个 Apple 脚本,所以我确定我忽略了一些简单的东西

on run
tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:46" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:40" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:41" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:42" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:43" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:44" password "password" with administrator privileges


delay 600

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 4E:53:50:4F:4F:45" password "password" with administrator privileges

delay 100

tell application "Terminal" to do shell script "sudo ifconfig en2 ether 00:26:08:ff:85:ae" password "password" with administrator privileges


end run
4

1 回答 1

0
  • 机场-z
  • 退出系统偏好。
  • 在终端上运行 scselect -n。

-n 延迟更改系统的“位置”,直到下一次系统引导(或下一次更改系统配置首选项时)。

  • 运行 sudo ifconfig en2 ether 4E:53:50:4F:4F:46
于 2013-08-14T12:55:00.423 回答