The beautiful thing about creating desktop apps in Adobe AIR is that I can still use my web development skills to do so.
For some reason, I am running into a slight issue with detecting what's in the clipboard, and displaying it in my App.
Here's my code:
<body>
<div id="infoDiv"></div>
<script>
function everysecond() {
setInterval("checkClipBoard()",1000);
}
function checkClipBoard(){
if(air.Clipboard.generalClipboard.hasFormat("text/plain")){
var text = air.Clipboard.generalClipboard.getData("text/plain");
}else{
var text = "nothing in clipboard";
}
$("#infoDiv").html(text);
}
everysecond();
</script>
</body>
Whether my app is in Focus or not, it doesn't seem to detect anything I Copy to the clipboard (Ctrl + C)
Anyone see my issue?
setTimeout
– SLaks