Why can't I get the value of "checkedState" in ScriptUI?

I found I can't get checkedState's value recently, and anybody can help me?
The snippet script is following:
#target "InDesign-8.0"
main();
function main(){
    myInterFace();
    myTeardown();
function myInterFace(){
    //<fragment>
    var myDialog = app.dialogs.add({name:"Testing", canCancel:true});
    with(myDialog){
        //Add a dialog column.
        with(dialogColumns.add()){
            with(checkboxControls.add()){
                staticLabel = "Facing Pages";
                checkedState = true;
                minWidth = 140;
  if(myDialog.show() == true){
        var mycheckboxControl = app.dialogs.item(0).dialogColumns.item(0).checkboxControls.item(0);
        var pageMarginSetting = new Array;
        pageMarginSetting.push(mycheckboxControl.checkedState);
        alert("testing");
        formattingTemplate(pageMarginSetting);
        myDialog.destroy();
  else{
  myDialog.destroy()
function formattingTemplate(pageMarginSetting){
    var myFileNameString = "/C_Test_Template.indd"
    var myDoc = app.documents.add({name:myFileNameString});
    with(myDoc.documentPreferences){
        pageHeight = 280;
        pageWidth = 210;
        pageOrientation = PageOrientation.portrait;
        facingPages = pageMarginSetting[0];
        startPageNumber = 1;
    myDoc.save(File(Folder.desktop + myFileNameString));
function myTeardown(){

Try declaring the checkbox as a variable up in the dialog construction something like this:
//====================//
#target "InDesign-8.0"
main();
function main(){
    myInterFace();
function myInterFace(){
    var myDialog = app.dialogs.add({name:"Testing", canCancel:true});
    with(myDialog){
        //Add a dialog column.
        with(dialogColumns.add()){
            //checkbox as variable
            var myFPCheckbox =checkboxControls.add({staticLabel:"Facing Pages", checkedState:true, minWidth: 140})
            with(myFPCheckbox){
       if(myDialog.show() == true){
            var pageMarginSetting = new Array;
            pageMarginSetting.push(myFPCheckbox.checkedState);
            alert("testing checkbox result=  "+myFPCheckbox.checkedState);
            myDialog.destroy();
  else{
            myDialog.destroy()

Similar Messages

  • Why can't I get the pdf to convert to publisher?

    Why can't I get the pdf to convert to publisher?

    If you are using ExportPDF, see http://forums.adobe.com/docs/DOC-1511

  • Why can't I get the Kodak Document Print App in the UK?

    Why can't I get the Kodak Document Print App in the UK?

    "Apparently it's available in the US iTunes store but not here?"
    Because Kodak has chosen not to make it available there.
    "Can't for the life of me understand why that should be!"
    You do not have to understand it for it to be so.
    You can try asking Kodak, as they make the app.

  • Why can't I get the App "Deskconnect" on my Ipad 3.  It claims to be compatible with Ipad as well as Mac and Iphone?

    Why can't I get the App "DeskConnect" on my Ipad 3.  It claims to be compatible with Ipad, Iphone and Mac.  I was able to download onto Mac and Iphone but it is not recognized for Ipad?

    I liked the idea of this app so I went looking for it and have now installed it on my Mac, iPhone and finally my iPad.
    This app, although it will run on the iPad is actually an iPhone/iPod app, as suggested above. So the only way to get it on my iPad was to search for it as an iPhone app in the App Store app on my iPad. Then it came up as an app that I could install on the iPad.

  • Why can I not get the creative cloud to install on my MacBook Air? I keep getting an error saying I need to download a new copy

    Why can I not get the creative cloud to install on my MacBook Air? I keep getting an error saying I need to download a new copy

    Please read https://forums.adobe.com/thread/1499014
    -try some steps such as changing browsers and turning off your firewall
    -also flush your browser cache so you are starting with a fresh browser
    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Why can't I get the advanced selection available in EPUB export options in illustrator CC?  It's just not there.... Neither is the image selection available.  Only Epub reflowable and fixed layout, but not EPUB...

    Why can't I get the advanced selection available in epub export options in illustrator cc? It's not there and neither is image selection.  only epub reflowable and fixed layout but not just epub.. I don't know where it is to do some book exercises for my studies.  Very frustrating.

    This is the EPUB forum: InDesign EPUB

  • HT4667 why can't i get the download to install on my macbook pro for the air port express

    why can't i get the download to install on my macbook pro for the air port express ? 

    If you are running OS X 10.7.2 then you will be able to use AirPort Utility 5.6.
    Leopard, Snow Leopard: AirPort Utility 5.5.3.
    Tiger: AirPort Utility 5.3.2
    Panther: AirPort 4.2

  • HT1657 My download keeps freezing, and I have to buy it over and over again and it wastes money. I have now rented my movie 4 times and it still won't finish downloading. Why can't I get the rental for free if it keeps doing this?

    MY DOWNLOAD KEEPS FREEZING AND I HAVE TO KEEP BUYING IT OVER AND OVER AGAIN. IT'S WASTING MY MONEY. I HAVE NOW RENTED MY MOVIE 4 TIMES AND IT STILL WON'T FINISH DOWNLOADING. WHY CAN'T I GET THE RENTAL FOR FREE IF IT KEEPS DOING THIS? CAN YOU PLEASE HELP? THANK YOU.

    Please turn off your caps lock.  All caps indicates shouting, is considered rude and is difficult to read.  Many will not read such posts.
    If it doesn't finish downloading then just click Store>Check For Available Downloads
    There is no need to keep re-buying it.

  • Why can't I get the average function work with empty cells?

    Why can't I get the average function work with empty cells?

    The thing that I am having a problem with is that I made a different form that calculates the average no matter how may of the cells have numbers or not and I didn't use an if function.  I have tried with this other form and and it calulates as if all the cells where being used.  I am using the [*] in both instances but it only works in the one I did earlier.

  • Why can't I get the Mac to accept a dvd which it did yesterday evening?

    Why can't I get the Mac to accept a dvd to play which it did yesterday evening?

    Hi a brody,
    It's pretty well documented. Here's a Wikipedia article on the topic. Tons of other links to follow.
    The drives themselves weren't damaged (by trying to do something like write to the drive's firmware), but the rootkit was installed on any computer you put a loaded disk in.
    I had a couple of legally purchased CDs from that era, and they never played right. They would skip, stall and even spontaneously eject. And this was in various music CD players (home player, car), which the rootkit wasn't supposed to affect.

  • Why can I not get the normal firefox start page instead of the "yourall-in-one page I currently have

    why can I not get the normal firefox start page I had with my old computer (operating XP) instead of the "your all-in-one page" I have now I have moved onto windows 7

    I have looked as suggested under the Firefox tab but find the following listed as my homepage
    http://uk.foxstart.com/?rls=en:uk:zp
    Have I actually installed firefox program/start page or have installes something else?

  • Why can't anybody get the photos I send them from my Iphone 4s? I've sent it to blackberries, iPhone 3G, and other phones - nothing has been able to get them!

    Why can't anybody get the photos I send them from my Iphone 4s? I've sent it to blackberries, iPhone 3G, and other phones - nothing has been able to get them!

    Do you get a send error message or a red "!" when you send?  Do you have a data plan on your account?  Check that your carrier has you provisioned for MMS.

  • Why can't I get the slider on the right side to remain active ?

    Why can't I get the slider on the right side to remain "active" ?
    I'm using iTunes 11.4 on a Mac Pro with OS 10.9.5
    In good old iTunes 10.7  there was a slider on the right side that you can move up and down to locate songs.   That same slider is there, (but much smaller), with iTunes 11.4, but it seems to deactivate itself for reasons I do not understand.
    I have found that when I go to the lower right corner and resize the iTunes window the slider will appear briefly.   If I don't act very fast, that slider vanishes and I cannot scroll up and down.
    Thanks !!

    As Apple said in June, iOS 7 is not compatible with the 4G iPod.
    All the iOS devices compatible (iPhone 4 and later, iPad 2 and later, and 5G iPod touch) with iOS 7 have at least 512 MB of memory (RAM). The 4G iPod only has 256 MB

  • Why can't I get the free download to load for Acrobat x

    Why can't I get the free download for Adobe Acrobat X to install?   when you try to download it doesn't do a thing?

    Troubleshoot Adobe Download Assistant
    Mylenium

  • Why can't i get the offer of a yahoo sign in security seal .. and a security warning from firefox

    i have an ibook g4 running osx 10.4.11
    5mar my yahoo sign in security seal did not show from either internet cafe or dial up .. 6mar i reinstalled osx 10.4.11
    after reinstall i did not get the offer to create a sign in security seal from any internet cafe or dial up
    anyone else gets the offer on the sign in page
    when using firefox i also get the following ..
    "security warning .. you have requested an encrypted page that contains some unencrypted information .. information that you see or enter on this page could easily be seen by a third party"
    why do i not get the sign in security seal offer everyone else does
    why do i get the security warning no one else does

    Welcome to the Apple Community.
    There are reports of TV Shows missing from users screens, initially it looked like this might be an issue in the UK only, but it may well be more widespread. It appears to be an issue that can't be fixed by the user, you will need to wait until this is resolved by Apple.

Maybe you are looking for

  • Save as PDF and fonts

    When I choose "save as pdf" in the print dialogue box, are the fonts used in the document automatically embedded in the PDF? I would like to email this PDF to a Windows user, but want to ensure they see the same that I see on my Mac, wit all fonts an

  • Adding to browser Very Urgent

    Hi Expert, Is this possible in webdynpro. Say my web dynpro application having 3 view and each view have a push button to navigate to next screen. While running the application i moved to 2 view and i am adding the page to browser favorites( add to f

  • 10g database control

    hi, Working on oracle 10g is just like a mirage for me. I have installed and uninstalled it many times on my new laptop, but not been able to work on it, because of many oracle problems. my OS is windows xp prof. sp2. i have cracked my brain on acces

  • Runtime Error is coming in PA40 transaction

    Hi All, When i recorded PA40 transaction using SHDB. When i run this BDC using SHDB transaction it is working fine. when i converted this BDC into report it is giving runtime error. anybody faced this kind of problem . please help me out in this. Err

  • Generate random User Alias - Entity adapter

    Hi, I am a newbie. Can anyone please help me in telling steps for creating an Entity Adapter which generate a random User Alias. TIA. Got few threads that tell about pre-populate adapter, none for entity adapter.