Why the alert massage return twice on the screen?

Hi, everyone
I got this script:
var
  mySelected = Number( app.extractLabel("mDialog") ),
  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)
    main();
myDialog.destroy();
function main(){
      colse_file();
function colse_file(){
    if (mySelection.selectedIndex == 0){
var docs = 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){
    var docs = app.documents;
    for (var i = docs.length-1; i >= 0; i--) {
        docs[i].close(SaveOptions.NO);
alert("Done.\rAll files are closed without save.");
   if (mySelection.selectedIndex == 2){
var docs = app.documents;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
app.documents.everyItem().revert();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
alert("Done.\rAll files are reversed.");
Why the alert massage return twice on the screen?
VK

Hi, Chinna
I changed it into this:
var
  mySelected = Number( app.extractLabel("mDialog") ),
  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)
    main();
myDialog.destroy();
function main(){
      colse_file();
function colse_file(){
    if (mySelection.selectedIndex == 0){
var docs = 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){
    var docs = app.documents;
    for (var i = docs.length-1; i >= 0; i--) {
        docs[i].close(SaveOptions.NO);
alert("Done.\rAll files are closed without save.");
   if (mySelection.selectedIndex == 2){
var docs = app.documents;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
app.documents.everyItem().revert();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
alert("Done.\rAll files are reversed.");
but I still got twice
VK

Similar Messages

  • Why my money were taken twice for the same program why my money were taken twice for the same program

    why my money were taken twice for the same program?

    contact expresslane via email or chat, they will refund you as long as this is the first time

  • In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    The application auto-saves your input when you close the document.  If you left the document, as you state, the notes/comments should have been saved and should have been visible the next time you opened the document with the Mobile Reader (note that if you are opening the document with another app such as Apple's built in PDF Viewer, things like notes/comments may not be visible).  Also note that if you are doing an Open In... from another app (like Dropbox), the version of the document in Dropbox does not update; only the version of the document in the Mobile Reader is updated.
    Would it be possible to send a video of the problem you are encountering to [email protected] so that we can try to help?

  • The operating system returned error 170(The requested resource is in use)

    Hello Experts,
    We have a Sharepoint farm where we are receiving OS Error 170 for many days. It results in database shutdown/Start because required transaction file is not available.
    The operating system returned error 170(The requested resource is in use.) to SQL Server during a write at offset 0x0000029495e000 in file 'F:\MSSQL10_50.INST1\MSSQL\DATA\****.***. Additional messages in the SQL
    Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately
    Write error during log flush.
    Error: 9001, Severity: 21, State: 4.
    The log for database 'DBNAME' is not available
    We have checked the Anti Virus but all data files are excluded. We have also disabled the anti virus for some time but still issue persist.
    This is a Virtual Machine and no VM snapshot backup is running during the time window.
    Please help!
    Thanks in advance.
    Regards,
    Divesh Mathur

    Hello Experts,
    We have a Sharepoint farm where we are receiving OS Error 170 for many days. It results in database shutdown/Start because required transaction file is not available.
    The operating system returned error 170(The requested resource is in use.) to SQL Server during a write at offset 0x0000029495e000 in file 'F:\MSSQL10_50.INST1\MSSQL\DATA\****.***. Additional messages in the SQL
    Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately
    Write error during log flush.
    Error: 9001, Severity: 21, State: 4.
    The log for database 'DBNAME' is not available
    Hello,
    I sense a disk issue here( I am not sure).Log for database is not available seems when data needs to be written on log file it was not avaialble.Can you check with storage team that disk on which SQL server files reside is OK
    Secondly did you run DBCC CHECKDB for your database in picture can you paste result of it.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • The Operating System returned Error 27(The drive cannot find the sector requested.)

    On a Windows 2008 R2 server running SQL 2008 Standard on a Raid 5, when performing a backup on the databases via copy to another local drive I receive and The operating system returned error 27(The drive cannot find the sector requested.) to SQL Server during
    a write at offset 0x0000002fd204000 in the file F:\SQLDATA\Email_Images.mdf.   The server is a HP DL380p Gen8.  I've contacted HP thinking this was a Hardware issue but HP ensure me its not and to contract Microsoft support.

    Hi,
    Unfortunately, the available information is not enough to have a clear view of the occurred behavior. Please offer us what backup method you are using, did you want to backup
    the data to the CSV, the origional error you have got.
    1. The best method would be to have separate disk drive for each cluster SQL instance and add the disk to the specific SQL group and add it to the dependency of the SQL resource.
    There would be less overhead with this process other than having to create two disks, one of each instance
    2. You could consider creating a file sharing resource on cluster and add the backup disk to this resource group and use it to back up the databases of both the instances
    to single disk. The down side of this method would be, all the databases backups will fail if the fileshare resource goes down. You cannot use GUI to take the backup, need additional setup/maintenance for the fileshare resource group
    http://support.microsoft.com/kb/224967
    I’m glad to be of help to you!
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to make the wdDoIniiit() function executived twice in the view of WebDy

    Hi Guyes, How can i make the  wdDoIniiit() function executived twice in the view of WebDynpro? Thank you

    Hi
    WdDoInit() :- This is called only once when the View is loaded freshly.
    WdDoModifyView:- Called every time an action is performed on the View.
    It is called by webdynnpro runtime environment for modification of the view layout.
    For all the views,this takes place at a time immediately before the closing response renders.
    check for
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm">Modifyview</a>
    also you can know about <a href="http://help.sap.com/saphelp_nw04/helpdata/en/86/7fcf3d4f902d10e10000000a114084/frameset.htm">Supply function</a>
    Regards
    Abhijith YS

  • Find an iphone 5 in the club and i want you to help me find the owner and return it to the user.  its been erased and no sim card in it .when i try to configure , it says i should enter an apple  and a password.

    find an iphone 5 in the club and i want you to help me find the owner and return it to the user.
    its been erased and no sim card in it .when i try to configure , it says i should enter an apple
    and a password.

    Since it was erased and no sim card the owner probably got rid of it of some reason.

  • Why report section is appearing twice in the output of report designer

    Hi Gurus,
    I have created a report in the report designer and my report contains 5 sections.
    each report section is one query view.
    i inserted all the query views and done some formatting .
    but when i executed the report , one of the report section is appearing twice in the output.
    ex: i need the output like this
    section1
    section2
    section3
    section4
    section5
    But the output i am getting is as follows.
    section1
    section2
    section3
    section3
    section4
    section5
    report designer experts can please let me know why this problem is coming and also please provide possible solution for this.
    Thanks in advance.
    Raj.

    Hi Gurus,
    I have created a report in the report designer and my report contains 5 sections.
    each report section is one query view.
    i inserted all the query views and done some formatting .
    but when i executed the report , one of the report section is appearing twice in the output.
    ex: i need the output like this
    section1
    section2
    section3
    section4
    section5
    But the output i am getting is as follows.
    section1
    section2
    section3
    section3
    section4
    section5
    report designer experts can please let me know why this problem is coming and also please provide possible solution for this.
    Thanks in advance.
    Raj.

  • Why am I getting billed twice for the same thing

    I ordered 9 songs off of Itunes on 12/29/12 and my visa was billed $10.50 an email was sent to me confirming this.
    today (1/2/13) I was sent another email billing my visa for $7.32 for 6 of the same songs I ordered on 12/29/12.
    Why am I getting billed twice for these songs.

    This a user to user forum. We don't know why you where billed twice. Please navigate to the Contact Us link at the bottom of this page and contact Apple. They will be better suited to answer your question.
    Regards

  • HT204088 Why have I been billed twice for the same movie? Please amend my account

    Yesterday I was billed twice for the same movie Women on the Sixth Floor.
    Can you amend this please?

    These are user-to-user forums, you are not talking to Apple here. If you have a billing issue then you can contact iTunes support here : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, BIlling & Redemption

  • What is the Collection that returns and removes the Object simultaneously

    Hi Java Experts,
    I believe I'm looking for a Collection that will allow me to (a.) return an object and (b.) remove the object from the collection simultaneously (c) without having to specify the index location of the object. Very similar to what you can do when you enumerate through a Properties Object.
    Here is a description of why I think this is the solution that I want. - Perhaps some Design Pattern Experts can help.
    I am making an application that is supposed to loop continuously through a collection while adding more information to the collection (example: in a while(collection.size()>0){ take some action })
    The action taken inside the while loop would add more items to the collection. I'm hoping that fact would be picked up by collection.size()>0 and cause the iteration to continue.
    I am doing this solution within one thread and class. But I'm also going to let this thread feed another Class (A controller thread) with different items which are added to It's collection for it's own loop. That solution will have to handle multiple threads feeding information to it's solution.
    Here is example code below of how i'm proposing this would work in a single threaded class.
    thanks for all the help
    * DESCRIPTION: I want to loop through a collection infinitely by
    * making the thread continually add to the collection.
    import java.util.*;
    public class TESTSOLUTION implements Runnable{
         public static void main(String[] arg){
              TESTSOLUTION tv = new TESTSOLUTION();
              Thread t = new Thread(tv);
              t.start();
              System.out.println("Finished Main");
         public TESTSOLUTION(){
              ACollectionType = new TreeSet();
              ACollectionType.add("BAT");
              ACollectionType.add("BALL");
              ACollectionType.add("MIT");
         public void run(){
              while(ACollectionType.size()>0){
                   //THIS IS WHERE I WANT TO BE ABLE TO REMOVE AN ITEM FROM THIS COLLECTION
                   //WITHOUT SPECIFYING THE index
                   //I just want to call a method and return the object and simultaneously
                   //remove to the object
                   outputString((String)ACollectionType.first());
                   counter++;
         private void outputString(String s ){
              try{
                   Thread.sleep(400);
              }catch(InterruptedException e){
                   System.out.println("interrupted");
                   System.out.println("s = " + s );
                   //I AM TRYING to add to the object and have the result picked up
                   // by (perhaps) the ACollectionType.size()>0 method and run the while
                   // loop infinitly
                   ACollectionType.add("TOY#"+counter);          
         private TreeSet ACollectionType = null;
         private int counter = 0 ;
    }

    woops here is what i mean --- i got this code to work -- you can run it for yourself .
    * DESCRIPTION: I want to loop through a collection infinitely by
    * making the thread continually add to the collection.
    import java.util.*;
    public class TESTSOLUTION implements Runnable{
         public static void main(String[] arg){
              TESTSOLUTION tv = new TESTSOLUTION();
              Thread t = new Thread(tv);
              t.start();
              System.out.println("Finished Main");
         public TESTSOLUTION(){
              ACollectionType = new TreeSet();
              ACollectionType.add("BAT");
              ACollectionType.add("BALL");
              ACollectionType.add("MIT");
         public void run(){
              while(ACollectionType.size()>0){
                   //THIS IS WHERE I WANT TO BE ABLE TO REMOVE AN ITEM FROM THIS COLLECTION
                   //WITHOUT SPECIFYING THE index
                   //I just want to call a method and return the object and simultaneously
                   //remove to the object
                   Object ss = ACollectionType.first();
                   outputString((String)ss);
                   ACollectionType.remove(ss);
                   counter++;
         private void outputString(String s ){
              try{
                   Thread.sleep(400);
              }catch(InterruptedException e){
                   System.out.println("interrupted");
                   System.out.println("s = " + s );
                   //I AM TRYING to add to the object and have the result picked up
                   // by (perhaps) the ACollectionType.size()>0 method and run the while
                   // loop infinitly
                   ACollectionType.add("TOY#"+counter);          
         private TreeSet ACollectionType = null;
         private int counter = 0 ;
    }

  • Issue in triggering central alert server- (Unable to subscribe the alert which was configured in the system)

    Hello Team,
    I'm facing an issue with the alert.
    Created alert classification and alert category in the transaction "ALRTCATDEF".
    Created container for alert category and maintained the short and long text for alert.
    Assigned the particular role "SAP_BC_ALM_ALERT_USER" in the authorization subscription and the same role has been added to user in SU01 transaction.
    Setting up Action:
    In processing method the alert category has been assigned as initial value.
    I have made all the configuration to subscribe the alert.
    Issue:
    In WEB UI under the servicepro business role, The navigation bar "Work list" there is an option to "personalize alert". Once we click on that then we will be able to subscribe the alerts. But in my case the alert category is not appearing in the subscription list. It is completely empty.
    System should show the configured alert category to subscribe. But now it is completely empty row.
    Thank in advance for your help!!!!
    Thiru.P

    Hi Ravi,
    Thanks for the suggestion. Actually the server and domain all are running well. I can start and stop from the startup menus and command scripts.
    The only issue is in the Eclipse (OEPE) when I try to connect the server. However I found the solution that I need comment the localhost entry in hosts file as below.
    # 127.0.0.1 localhost
    Now the server is connecting well. However I have another issue, that I am not able to shutdown the server from startup menus. I suspect the t3 protocal and HTTP protocal related. If you have any suggestions please help me.
    Note: if still have issues then try by removing the LAN connection, or install the Microsoft Loopback Adapter.
    But I am still looking for options without commenting the localhost in the hosts entry.
    --Khaleel
    Edited by: Khaleel Shaik on Dec 8, 2010 2:58 PM

  • How to apply warp stabilization to the same clip used twice in the same timeline

    If I use the same source clip in a timeline (say 3 or 4 different sections of the clip by dropping the same clip on the timeline and just trimming it differently) and want to stabilize them all, how do I do that?  The first instance of the clip lets me use warp stabilization, but then when I try to apply it to later instances of the same clip in the timeline, it says I can't do that.   How do I apply the stabilization to later instances of the same clip in the timeline?
    Thanks

    After trimming the clip just apply the warp stabiliser to it without copying and pasting. You can't copy and paste the warp stabiliser because it needs to analyse the pixels of each clip everytime its applied.

  • How to put the SQL-statement returned value into the field (as a default)

    Hi,
    I am using Developer/2000 (Forms Designer) under windows 98.
    Please tell me how to put the SQL-statement value (as a default value) into the field before enter-query mode. Noted that I have tried the following ways but still some problems:-
    1) Place the SQL-statement into PRE_QUERY trigger in the form/block level.
    There is a message box which ask 'Do you want to save the changes?'.
    2) Place the SQL-statement before execute enter_query. There is still a
    message box which ask 'Do you want to save the changes?'.
    Any hints? Thanks. Urgent.

    solved it!
    1) Suppress DEFAULT save message
    if form_failure then
    raise form_trigger_failure;
    end if;
    2) Place the default value before enter-query.
    Ref: Title='Default value in query field in ENTER_QUERY mode' in designer forum by CVZ
    form level trigger
    ============
    WHEN-NEW-ITEM-INSTANCE
    =======================
    if :system.mode = 'ENTER-QUERY' then
    :block.item := 'default waarde';
    end if;
    3) Suppress the changes whenever leaving the default field.
    if :block.item is null then
    -- assign statement
    end if;

  • HT201272 want to know why my account was charged twice for the same app on 2 different dates

    im trying to find out y my account was charged twice on two sepprate dates 4 the same thing?

    Did you re-download them on the second date from the main part of the store instead of the Purchased tab ?  You can contact iTunes support via this page and ask them what happened (these are user-to-user forums, we won't know) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

Maybe you are looking for