Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

clear pasteboard with alert (yes or no)

$
0
0

Hi All,

 

I am trying to clear pasteboard with yes or no alert, script running without error but not functioning

What my error, any help ?

 

//Pasteboard Clean
confirm("Do you want to Clean PasteBoard?");
if (confirm.window==true) function removePasteboardItems() {

removePasteboardItems(app.documents.length && app.activeDocument); 
function removePasteboardItems(/*?Document*/doc) {     if( !doc ) return;     var items = doc.pageItems.everyItem().getElements(),         t = null;     while( t=items.pop() ) t.parentPage || removeItem(t);     t = items = null; 
}
function removeItem(/*PageItem*/item) 
{     try {         item.locked = false;         item.remove();         }     catch(_){} 
} 
}else  {    exit();    }

 

Thanks in advance

Steve


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>