3 Replies Latest reply on Sep 23, 2008 8:04 AM by Loic.Aigon

    [JS CS3] ScriptUI button wants to be clicked twice

    Loic.Aigon Adobe Community Professional
      Hi I created a sample scriptUI dlg with three buttons:
      res =
      ]"dialog { \
      ]s: StaticText { text:'Chosissez une période:' }\
      ]]period: DropDownList { alignment:'center' }, \
      ]]s: StaticText { text:'Chosissez un fichier:' }\
      ]]files: DropDownList { alignment:'center' }, \
      ]]buttons: Group { orientation: 'row', alignment: 'center', \
      ]]] revealBtn: Button { text:'Ouvrir le dossier'}, \
      ]]] okBtn: Button { text:'Ouvrir le fichier'}, \
      ]]] cancelBtn: Button { text:'Annuler', properties:{name:'cancel'} } \
      ]]} \
      ]}";
      win = new Window (res);
      win.buttons.okBtn.onClick = function ()
      {
      ]win.close(1);
      }
      win.buttons.revealBtn.onClick = function ()
      {
      ]win.close(45);
      }
      if(win.show()==1)
      {
      ]clickButton("file","Le fichier ne se trouve plus ici :");
      }
      else if(win.show()==45)
      {
      ]clickButton("folder","Le dossier n'a pas été trouvé.");
      }

      b The cancel button works fine and actually all the buttons too. Except that for the two open buttons, I need to click twice to make them run.
      Any idea ?
      TIA Loic