Now that I am back in Sierra I may post on the list.
The problem striking upon Robert's script is not related to Sierra. It's due to the fact that he waited until Sierra delivery to drop ASObjC Runner which is deprecated since about one year. To be sure I switched back to El Capitan and ran a short subset of the offending code.
use AppleScript version "2.4" -- Yosemite (10.10) or later use framework "Foundation" use framework "AppKit" use scripting additions
set soundVolume to 44 as integer # integer as stated in the dictionary delay 2
set volume output volume (soundVolume as integer)
the events log was :
tell current application set volume «class ocid» id «data optr000000006026020080610000» output volume 44 Résultat : error "Impossible de convertir «class ocid» id «data optr000000006026020080610000» en type small real." number -1700 from «class ocid» id «data optr000000006026020080610000» to small real
exactly as it is under Sierra.
If we drop the instruction : use scripting additions the script no longer compile. If we drop the instructions : use framework "Foundation" use framework "AppKit" it compiles but the handler checkModifiers will be unable to run.
There is a clear conflict with the frameworks and the instruction : set volume output volume (soundVolume as integer)
I am unable to give a workaround. I asked Shane Stanley about that but he is a busy man which post when he has spare time. I guess that Robert will have to be patient.
Yvan KOENIG running Sierra 10.12.0 in French (VALLAURIS, France) samedi 24 septembre 2016 21:12:18
|