function onSample() { var clipboard = shell.clipboard; if (clipboard) { var count = clipboard.count; if (count) { shell.print(count); } } }