Why alert massage back twice on the screen?

Hello world

I had this script:

var

mySelected = number (app.extractLabel ("mDialog")),

myDialog = app.dialogs.add ({name: "record Colse \"Yes\"ou \"No\"",canCancel files:true}); "})

{with (MyDialog)}

{with (dialogColumns.Add ())}

{with (dialogRows.Add ())}

var

mySelection = dropdowns.add ({stringList: ["01 Yes", "No 02", "03 inversion"], selectedIndex: 0});

}

}

}

If (myDialog.show () is true)

main();

myDialog.destroy ();

main() {} function

colse_file();

}

function colse_file() {}

If (mySelection.selectedIndex == 0) {}

docs var = app.documents.

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

docs [i]. Close (SaveOptions.Yes);

}

Alert ("done. \rAll files are saved.");

}

If (mySelection.selectedIndex == 1) {}

docs var = app.documents.

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

docs [i]. Close (SaveOptions.no);

}

Alert ("done. \rAll files are closed without saving.");

}

If (mySelection.selectedIndex == 2) {}

docs var = app.documents.

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;

app.documents.everyItem (.revert ());

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

}

Alert ("done. \rAll files are reversed.");

}

Why alert massage back twice on the screen?


VK

Hmmh?

Same problem as your last thread - the logic of your script is not really good!

Why you use not the structure that I showed you it: unfunction third part of script you can fix it?

Here's the script I posted here (extended now with alerts)

//---------------------------------------------------------------------------------------- ------------------------------------------------------------------------------- 

//var mySelected = Number( app.extractLabel("mDialog") ),
  var myDialog = app.dialogs.add({name:"Colse files save \"Yes\" or \"No\"",canCancel:true});
  with(myDialog){
       with(dialogColumns.add()){
            with(dialogRows.add()){
                 var mySelection = dropdowns.add({stringList:["01   Yes", "02   No", "03   Reverse"], selectedIndex: 0});
            }
       }
  } 

if (myDialog.show() == true) {
    var docs = app.documents;
    main();
    myDialog.destroy();
    } 

function main(){
if (mySelection.selectedIndex == 0){
      //colse_file();
      save_file();
        // for save function
        //alert("saved")
      return;
      }
if (mySelection.selectedIndex == 1){
      close_file();
        // for close function
        //alert("saved")
      return;
      }
if (mySelection.selectedIndex == 2){
      revert_file();
        // for reverse function
        //alert("saved")
      return;
      }
} 

function save_file(){ // colse_file()
    for (var i = docs.length-1; i >= 0; i--) {
        docs[i].close(SaveOptions.YES);
        // for every file
        //alert("saved")

        } return; // sorry, the return was on the wrong place before
} 

function close_file(){
    for (var i = docs.length-1; i >= 0; i--) {
        docs[i].close(SaveOptions.NO);
        // for every file
        //alert("closed")

        } return; // sorry, the return was on the wrong place before
} 

function revert_file(){
       app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
       app.documents.everyItem().revert();
       app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
       // this is not a loop
       //alert("reversed")
       return;
} 

//---------------------------------------------------------------------------------------- -------------------------------------------------------------------------------

Activate alerts should easily solve your problem.

Have fun

Tags: InDesign

Similar Questions

  • I recently used a dvd + rw disk to back up my photos. Now when I put a dvd in my pc, why it will not display on the screen that's all there is, or how to give me access to it?

    I recently used a dvd + rw disk to back up my photos. Now when I put a dvd in my pc, why it will not display on the screen that's all there is, or how to give me access to it?

    Depends on what you used for the backup.

    If you used the windows backup or another backup software will contain the entire disk will be a backup file, and view/use this file, you use the same software that allows you to save.

  • Vista, why my cursor jumps around on the screen without reason?

    Vista, why my cursor jumps around on the screen without reason?

    You are using a laptop with a touchscreen?  Chances are good that you accidentally touch the touchpad while typing, and that moves the cursor.  Go to start / Control Panel / mouse and see if there are controls for adjusting the sensitivity of the touchpad or to disable the touchpad while typing.  Go to the web site of the manufacturer of your and download the latest device drivers, firmware, and software for touchpad you and your mouse (if you also have a mouse - you may have to go the manufacturer of the mouse for these drivers, if she did not come with the system).  New updates can offer options that did not exist before like the ones I mentioned.

    This happened to me also and I bought a separate mouse and disabled the touchpad and the problem disappeared - but he had me past for awhile until I finally figured it out by typing differently (with my hands up higher so the Palms do not touch and had no problem).  Even if this isn't the problem, update the drivers, firmware or software can solve the problem on its own.

    If none of the works above, we will need either to run a complete troubleshooting procedures (post back and I'll meet with them) or the touchpad or mouse is defective and must be replaced.  You can discuss these last with the computer manufacturer when you talk to them (if you talk to them).

    I hope this helps.  If you have any questions along the way, come back and I'll do my best to answer.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How to have a batch file executed without the BACK popup on the screen?

    original title: running tape recorder in a minimized batch file or out of sight?

    Hi, I'm wanting to play a sound every 30 minutes.

    I wrote a batch file for use of Windows sound recorder to play the sound, and then close.  I will use the Task Scheduler to run and the calendar.  The sound seems to play fine, but every time it works I see a popup box BACK and then heard play recorder app.  These two things quickly disappear automatically, but ideally, I want the sound to play and can't see the window BACK or recorder popup of sounds on the screen.  Is there a way to minimize or hide these things automatically?  As it is run in the background, but still play the sound?  My batch file is below:

    Sndrec32.exe "C:\WINDOWS\Media\chimes.wav" /PLAY / CLOSE

    This could help you.
    http://zoombody.com/articles/run-a-batch-script-minimized

  • Why my mouse pointer scrolls off the screen to the right

    Installed a wireless network adapter by using what I think was the wrong driver. Cannot remove properly. At the time my mouse and Window Media Player begins to act. The mouse pointer goes way off the screen to the right and no other borders. Window Media Player opens wider than my screen. That is what it is?

    Hello

    · What is the number and the model of the computer?

    · Have you installed the drivers on the manufacturer's Web site?

    · Do you receive an error message or error code when you try to uninstall the drivers?

    Use the back to roll on the computer that will replace the network to the previous state driver and check if the problem persists: how to use Roll Back Driver Windows XP: http://support.microsoft.com/kb/283657

    I suggest contacting the manufacturer and then install the wireless network card drivers.

  • Why look type badly spaced on the screen but prints perfectly?

    I create a text block, say 13 pt or pt 12 ITC Bookman Light on one or two points of the leader.

    On-screen, it looks good, but not good enough. Some combinations of letters are tighter than they should be. This is true the original 5.5 ID file and a PDF file directly from him.

    But when I print, it looks perfect, in other words, it seems as it should without this strange letter spacing.

    Is it just the nature of mathematical pixel distortions to be on screen?

    Why does this happen?

    How can I "fix" it?

    It would be different if I specced the type not the points, but with pixels? (I even do that?)

    And if I want to send this unit of the type to display on the screen, how can they see how it should look like, without the odd letter and incorrect spacing on the screen?

    Thank you.

    Larry,

    Please delete the calculation when replying by e-mail. Thank you.

    I think you are looking at a screen display issue, and I doubt there is anything you can do to ensure that it is correct on the other end. You can't control the screens of other users or settings.

  • Why firefox takes up half of the screen when I go on a website

    my homepage takes up half the screen when I go to any Web site, the site is located on the left side of the screen. I want an entire page of the site hope someone can help

    The 'left side' is probably the sidebar, and I'm assuming you open these sites to bookmark that you saved.

    Right-click on the bookmark and select Properties, then turn off the preference for the load this bookmark in the sidebar, and then click Save.

    Buttons using JavaScript on web pages for "Bookmark this Page" causes this preference to select saving the bookmark in this way. Therefore, do not use these buttons, use the function 'Bookmark this Page' which is integrated with Firefox instead.

  • Why my document never disappears from the screen as I type?

    As I type, the document disappears from the screen until I have pass my mouse or use the touch pad so he could reappear.  It's still there - just not visible.  This happens several times as I type.  I removed the "enable transparency" for display in your office customization settings.  How to stop?  I have tried several things and nothing works.  This happens with Windows 7 and any laptop that I use.  I used laptops Acer and HP.

    Its aero effect, you can disable

    http://www.howtogeek.com/66549/stupid-geek-tricks-disable-Windows-7-Aero-peek-in-two-clicks/

    And

    http://Windows.Microsoft.com/en-GB/Windows7/products/features/Aero

  • Why should I back up before the upgrade

    Apple gives to think that I have back up before upgrading. Why should I do?

    In this digital world, the better to protect your data is backup, backup and backup.

    Between 0 and 1, a lot of things can happen, once gone, he disappeared.

    In any case, it is your duty & responsible for your own data and not Apple.

    You have been warned. Answer to yourself.

  • Unable to connect to MSN mail. He keeps asking me to change my password by e-mail. After I change it, it brings back me to the screen to change to email.

    Sign in to MSN Email problem

    When I tried to log on my MSN e-mail account he prompted me to change my password. I filled in the 'Change password' form and clicked on submit, and it took me back to the password screen change time and time again. I was never able to change the password. Any help?

    Hi DanWardKS,

    1. what web browser do you use?
    2. what operating system is installed on the computer?

    If you use Internet Explorer to access MSN mail, then I suggest you to try the steps from the following link:

    The problems of access to webmail using Internet Explorer
    http://support.Microsoft.com/kb/2483955

    If the steps above fail, then I suggest you post in the forums, MSN.
    http://support.Microsoft.com/kb/940784

  • Netflix continues to go back to install the screen in windows media center

    I try to install netflix in windows media center (Vista Edition home premium), but whenever I install it... it just keeps going back to the installation screen when I click on the tab of netflix.  I have uninstall and reinstalled the plugin from netflix and Sliverlight with it still do the same thing.  No idea how to solve this problem?

    Hello Kyle McKinney,.

    In addition to the response of Irfan H, we can see the thread below that includes the following steps to resolve the problem:

    http://social.answers.Microsoft.com/forums/en-us/vistamedia/thread/811f3761-92DC-4416-8a1a-ccf0116432c6

    Please let us know if you need more assistance.

    Thank you

    Mary
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Why emails don't appear on the screen?

    e-mail messages are not displayed to the top when I open computer.

    Well, what is?

  • Why Firefox garble my text on the screen. When I use my zoom to a larger text windows stops. Other browsers don't do that.

    The text becomes garbled (fuzzy) to the smallest font size. When I increase the font size in Windows help zoom feature that confused blurreness goes.
    I am running Windows 7 Home Premium with a PLANAR PXL 2430 MW monitor with an ATI Radeon HD 2600 XT graphics card.

    This problem does not occur in Internet Explorer or Google Chrome.

    Please notify

    Some problems rendering of fonts are caused by the graphics driver incompatibilities. Could you try disabling the use of Firefox graphics acceleration hardware?

    You need to restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    the button Firefox orange (or the Tools menu) > Options > advanced

    In the mini ' General' tab, uncheck the box for "use hardware acceleration when available.

    If you restart Firefox, display is improved?

  • Why my cursor shift place on the screen

    Sometimes when I type, the cursor will suddenly change position and the words I had been typing will end up in another location on the page, usually inserted in the text that I wrote earlier.

    Sometimes when I type, the cursor will suddenly change position and the words I had been typing will end up in another location on the page, usually inserted in the text that I wrote earlier.

    Using a laptop?

    If so, no doubt you are accidentally brush your hand against the touchpad while typing.

  • Why my picture will appear on the screen when I click the print module in Lightroom?

    I have had no problem printing in Lightroom until this weekend.  Now when I select an image in the library module, then click the print module at the top right, I get the general page for the print module with right and left selection committees - but no picture.  Just an empty space with the grid lines, etc.

    A possible problem, is that I figured out how to contact sheets last Friday (which worked fine).  My problem started next time I open Lightroom, then maybe I clicked on something wrong by mistake when I was doing the contact sheet.  I've been through to get to its previous state, but something still does not work.

    Suggestions welcome!

    Thank you

    Kathryn

    For the record, I understand the problem.  When I created a Board-contact, I used "select flagged photos" to indicate the pictures you want to include.  When I went to print single images, I forgot to turn off this feature and return to "selected picture" for printing.  Where the problem.  Now, it seems to work very well!

Maybe you are looking for

  • T - bird very slow, freezes frequently. Cause: McAfee analysis in real time

    Earlier today, T-bird was ok but would not send (I could send no problem my phone and my webmail, so I know that the problem was with the T-bird, or its interface with my server, but not with the server itself). I restarted my computer a couple of ti

  • Bad speakers on Satellite C70D-B-10UM

    My girlfriend bought me a new laptop of Toshiba C70D-B-10U (my second Toshiba), it's a good laptop outside speakers, they are terrible. I didn't want my first post to be a complaint but, Toshiba cut corners when he put the speakers in this series of

  • 4540 proBook s does not start after stopping

    Brand new Probook s 4540, B7A48EA #BED, of the box. Memory 4 GB DDR3, 500 GB, processor i3, SUSE Linux disk. I have install the battery, connect the power supply and turn on laptop. Linux installation started, got the message 'creating recovery root

  • Microsoft mouse 3500 battery may not last long and keep the LAG

    I bought a mouse Microsoft 3500 Feb 2011, when the battery is finished, I replace it with the same brand new even one, with the previous battery that come with the mouse, after I have change the battery it only last for 5-6 days. The Dungeon of the p

  • AC 1900 disconnects

    Hello I am having trouble with my wifi to router Linksys EA6900 AC 1900. I bought one two weeks ago and it worked fine for about a week and a half, I say, but then he started to drop me the WiFi at random. The network is still presented but when I tr