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

How the ratiobutton call function?

$
0
0

Hi everyone

 

I got this script

 

  var d=app.dialogs.add({name:”Define Empty Pages”});

  var radioBtns = d.dialogColumns.add().radiobuttonGroups.add();

  radioBtns.radiobuttonControls.add({staticLabel:”Save”,checkedState:true});

  radioBtns.radiobuttonControls.add({staticLabel:”No Save”});

  radioBtns.radiobuttonControls.add({staticLabel:“Exit”});

  if(!d.show()){d.destroy();}

  var saveOption = radioBtns.selectedButton;

            d.destroy();

 

            var docs = app.documents; 

            for (var i = docs.length-1; i >= 0; i--) { 

                if (docs[i].saved == false) { 

                    docs[i].save(new File(“~/Desktop/myTestDocument” + (i+1) + “.indd”)); 

                    docs[i].close(); 

                } 

                else { 

                    docs[i].close(SaveOptions.NO); 

                } 

            }

 

for close docs without save, but

I want to remain choice for those unsaved files, so I add open dialog in case for me to decide if I save those unsaved files.

 

Now, the problem is I don’t know how to let the ratiobutton call function

 

My aim:

1) If choose “Save” means save unsaved files, but not others

2) If choose “No save” means all files no save

2) If choose “Exit” means unsaved files Exit (remain open) but close others

 

Thanks

Regard

 

Teetan


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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