Comment 1 for bug 1469962

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.0] Mac: App.getClipboard(): java.io.IOException: system clipboard data unavailable --- should be handled internally

according to some bug posts in the net, this seems to be a special Mac/Java problem, where there is no solution.
Nothing special with SikuliX.

The recommendation is, to catch the exception and try again or ignore.

so you might do this:

isUnavailable = "#UNAVAILABLE#"
try:
    text = App.getClipboard()
catch:
    text = isUnavailable
if text == isUnavailable:
    # do corrective actions