// create a variable for the current doc var doc = app.activeDocument; ///////////////////////// // MAIN ///////////////////////// // suspendHistory method. Creates one history step named "Delete All Channels" from all steps inside the function named main(); doc.suspendHistory("Delete All Channels", "main()"); ///////////////////////// // FUNCTIONS ///////////////////////// // a container function for all the steps we want to collapse down into one history step using suspendHistory function main(){ // Remove all Alpha Channels doc.channels.removeAll(); }