閱讀149 返回首頁    go iPhone_iPad_Mac_apple


Applescript works on Lion, not Sierra

Hi.

 

I have a couple of applescripts that I created some years ago without knowing much about scripts. When run, they change settings for startup disk, and restart my mac.

 

They always worked perfectly, but if I try them on Sierra, there are problems:

 

They change boot disk and restart OK, but when I later boot from the sierra disk again, the script icon starts bouncing in the dock immediately after startup. I click on it - nothing happens. I right-click and select quit - nothing happens, and I have to force-quit.

 

Could someone tell me what I have to change to fix it?

 

Here it is:

 

display dialog "STARTUP DISKNAME?" buttons {"Cancel", "OK"} default button "OK"

do shell script ¬

  ¬

  "bless -mount \"/Volumes/DISKNAME\" -setBoot" user name "MY USERNAME" password "MY PASSWORD" with administrator privileges

tell application "Finder"

  restart

end tell

 

Thank you.



最後更新:2017-09-21 04:24:16

  上一篇:go World Clock widget gone in Sierra
  下一篇:go Setting iPad Wallpaper in Profile Manager