Applescript causa la registrazione di lunghi messaggi di errore in system.log

0

Ho questo script molto semplice ...

tell application "System Events"
    set activeApp to short name of first process whose frontmost is true
end tell

tell application activeApp
    repeat 5 times
        display dialog "Hello world" giving up after 2
        delay 2
    end repeat
end tell

e funziona bene, ma ogni volta che viene visualizzata la finestra di dialogo vengono registrati i seguenti errori,

27/07/15 8:32:48 PM AppleScript Editor[43002] -[NSCarbonWindowFrame aspectRatio]: unrecognized selector sent to instance 0x116411470

27/07/15 8:32:48 PM AppleScript Editor[43002] HIToolbox: ignoring exception '-[NSCarbonWindowFrame aspectRatio]: unrecognized selector sent to instance 0x116411470' that raised inside Carbon event dispatch ( .... trace .... )

che sta inondando il mio registro di sistema. Questo succede indipendentemente dall'applicazione attiva.

Qualche idea sul perché e su come fermare gli errori?

    
posta Vic 27.07.2015 - 20:10
fonte

1 risposta

0

Ho appena scoperto che un% co_de nidificato interromperà gli errori, cioè

tell application "System Events"
    set activeApp to short name of first process whose frontmost is true
    tell application activeApp
        repeat 5 times
            display dialog "Hello world" giving up after 2
            delay 2
        end repeat
    end tell
end tell

Ancora non so perché però ...

    
risposta data 27.07.2015 - 20:22
fonte

Leggi altre domande sui tag