How to add buttons in the script, and then click on run different codes?

If we run the script, then it should display ok, cancel button 6 button. If we click on button1 coding with button1 dangerousness must be running and so on.

Button1

Button2

Button3

Button4

button5

Button6

OK Cancel.

Marie rosine

// DialogSimpleButton.jsx
// http://forums.adobe.com/thread/1327372?tstart=0
// how to add buttons in script, which on click run different codes?

// regards pixxxelschubser

function SimpleDialog() {

var w = new Window('dialog', '');
this.windowRef = w;
w.orientation = "column";

btn1 = w.add('button',undefined,'Button 1');
btn2 = w.add('button',undefined,'Button 2');
btn3 = w.add('button',undefined,'Button 3');
btn4 = w.add('button',undefined,'Button 4');
btnOK = w.add('button',undefined,'OK');
btnCancel = w.add('button',undefined,'Cancel');

btn1.onClick = function() {alert("Button 1");};
btn2.onClick = function() {alert("Button 2");};
btn3.onClick = function() {alert("Button 3");};
btn4.onClick = function() {alert("Button 4");};

defaultElement = btnOK;
cancelElement = btnCancel;
btnOK.active = true;

btnOK.onClick = function() {
    stuff = "your stuff";
    w.close();
    }

w.show();
}

var stuff = null;
SimpleDialog ();
if (stuff) alert(stuff);

Tags: Illustrator

Similar Questions

  • Cannot view XML input using XSL style sheet. Fix the error and then click the Refresh button, or try again later.

    This is the message I got when my backup stopped and said cannot complete backup. Need answers?
    Cannot view XML input using XSL style sheet. Fix the error and then click the Refresh button, or try again later.

    --------------------------------------------------------------------------------

    A name was started with an invalid character. Error during processing of the resources ' file:///E:/WindowsImageBackup/ray-PC/Backup 2011-0...

    Hi lrl1of5,

    (1) do you use Windows Backup and Restore?

    (2) if it works well before?

    (3) remember to make changes?

    It is sufficient to indicate the complete error message you receive.

    Method 1: Run the fixit available in the links below and check if that makes a difference-Worth to try
    Difficulty of broken desktop shortcuts and common system maintenance tasks

    Note: FixIt would attempt to recover bad sectors on the hard disk, in the course of this process there are chances of DATA loss from that particular area.

    Method 2:  Clean boot the computer, then try to backup again

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • I can't import photos into lightroom free trial cc/6 2015. Lightroom can see all my pictures from my SDHC card and allows me to implement the import, and then clicking import it says that all the selected files (245) has not can be imported as they could

    I can't import photos into lightroom free trial cc/6 2015. Lightroom can see all my pictures from my SDHC card and allows me to select and configure the import, and then clicking import it says that all the selected files (245) has not can be imported because they could not be read. I use MacBook Pro 2015 OS X Yosemite 10.10.3, photos taken with Canon G1 X Mark II. Any ideas?

    This message indicates that you have not permission in writing to the destination directory.

    So:

    1. Determine the destination directory... go in the Lightroom import dialog box and note the location of this directory specified on the right side under "Destination".
    2. Go to your operating system and change the permissions on this exact directory have WRITE permission.
  • How to add buttons to the toolbar in the drive?

    In Adobe Reader, how I can add botones has the bar of tools? Ago that mucho tiempo utilizando el boton derecho del mause pierdo y buscar los botones in las ventanas emerging.

    MUCHAS gracias

    Hi richarddaniel1111,

    To add buttons to the toolbar, follow these steps:

    1. Choose View > show/hide > Toolbar elements.
    2. Choose an option from the submenu (file, editing, comment and so on).
    3. Select the tool you want to add to the toolbar.

    Hope that helps!

    Best,

    Sara

  • How to add text on the video and still images?

    CS 5.5. I want to add text credits at the end of a clip on top a fixed image, but I don't know how to do it. I don't want to do some exploring, text just above the .jpg image. I tried to use the title of"to do, but for some reason any title using part of the video for do not return, it comes with a yellow instead of red like the rest of the video in the timeline. I searched the FAQ and google for help and all that shows is how to make a title using text.

    Thank you

    For some info on the red, yellow and green bars go look here http://blogs.adobe.com/premiereprotraining/2011/02/red-yellow-and-green-render-bars.html

  • How to add buttons to the Quick Launch toolbar

    I can't find the buttons for the "switch between windows" Flip 3D previews and the 'show desk top' on the Quick Launch toolbar.  They used to be there.  Where can I find them so I can put them on the quick launch area?  I have Vista Home Premium.

    Try this:

    1. click on start
    2. in the search field, type the following (you can copy and paste for accuracy):
     
    %SystemDrive%\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
     
    3. Windows Explorer should open the phonebook.
    4. you should now see the missing shortcuts in the left pane.
    5. left click shortcuts and drag them one at a time to the Quick Launch bar. If you want to reposition shortcuts, just left click and drag them to the position.

  • Click to open the menu, and then click to close?

    Hi, I'm sure it's quite basic but I am pulling my hair on it.

    I have a menu drop-down. I want to click a tab to bring down then, if it is open, click on it again to close.

    I tried 1 million variations on the script below:

    var btn_grp1:String

    function main1Down(event:MouseEvent):void {}

    If (btn_grp1! = 'dwn') {}

    gotoAndPlay ("down1");

    btn_grp1 == 'dwn '.

    }

    else {}

    btn_grp1 is nothing

    }

    }

    mainBtn1.addEventListener (MouseEvent.CLICK, main1Down);

    The above is part 1

    Time very well the first time through knowledge you click and the other buttons drop-down.

    Now, at the end of down1 (to the frame 9) I've got:

    function rollUp(event:MouseEvent):void {}

    gotoAndStop (1); hide the drop-down list button again

    }

    mainBtn1.addEventListener (MouseEvent.CLICK, rollUp);

    Stop();

    This works also (once). If the drop down menu buttons all disappear once again, but it will not reset.

    The drop stand then.

    BTW, I am not attached to this method, it was the most obvious i.e. If menu hidden, then show it, set a variable to the bottom (display), otherwise hide the menu, set var to (hidden). Does not well.

    What I am doing wrong?

    Steve

    Sheesh, I feel like a fool, literally did this for hours.

    I just changed the mouse 2nd mouse_Up, and now this event works

    Sorry all

  • change the image, and then click

    How can I do this: bearing the image must change own photo, click on make another my event

    I can't click on the rollover image

    the button cannot change the button image State

    Sorry for my English

    Hello

    It's totally different from what I understand first.

    A button in the first Grade has only 3 States: up, over and down, you can have different images (have a look in the Gallery\Buttons)

    But having a different image button after hovering over him? Is that what you want? Hovering over something, it's not an event can trigger something, out of the box in Captivate. If you are ready to buy the Eventhandler's InfoSemantics widget, then you may achieve this because you will have many more events to trigger a tip action. This action will be similar to the one I described, hide and display (not necessarily a button, just an image on the button would do well). Here is the link:

    http://www.Infosemantics.com.au/catalog/widgets/interactive/wdgt_event_handler_01

    Maybe I could find a solution without this widget, but it is really the simplest way.

    Lilybiri

  • With regard to creating a desktop shortcut to a Web site. When I drag and drop the icon on the desktop, and then click to open, I get a box 'print' on the site.

    When I double click on the Firefox icon, it brings me to the "print area". What is the problem and how can it be solved?
    Thanks, Jeff

    Thanks for your suggestion. II ended up adding an element of the registry which fixed the problem.

  • How to add items to the Windows Explorer right-click menu drop-down?

    Sometimes it would be nice to be able to add a shortcut to a program that shows when you right click on a file in Windows Explorer.  Is it possible manually?  And can we remove others that we never use as well by the same method?

    You can, to a limited extent.  And it's the registry changes, so I would recommend caution.  There are also a few small programs that change the menu.

    http://vlaurie.com/right-click/Customize-context-menu.html

    A simple way, I used is to create shortcuts custom in the SendTo context menu folder.  With which you can perform most any function, such as send a text file to open with MS Word or send any type of image to open it with any number of image viewers.

    You can access the SendTo file by entering shell: sendto in the navigation bar of the Explorer, or simply run and the shell: sendto

  • How to disable permanently her remember passwords? When I click to uncheck the box, and then click OK, the box remains enabled.

    I use the latest version of Firefox on Windows 7.

    Do you have any management "password" or "login" installed add-ons, like maybe part of an external security application?

    Similar problem published earlier today - https://support.mozilla.com/en-US/questions/835049

    I think that was the problem for this user.

    An add-on to DELL for facial recognition.

    Maybe this extension it was on the list?

    FastAccess Web Login 1.12 [email protected]

  • 33.0 slow Firefox to the slider, and then click reply - well that 'encouraged' by other events

    It's the same question that
    https://support.Mozilla.org/en-us/questions/1026328
    But I needed to create a new issue in order to meet.

    Then disabling fixed the problem for you, as well hardware acceleration?

    Note that your system details list shows several Flash plugins.

    • Shockwave Flash 15.0 r0
    • Shockwave Flash 11.5 r502
    • Shockwave Flash 11.4 r402

    You can find the installation path of the plugins on the topic: plugins page.

    You can view the installation folder of Flash player for multiple Flash player plugins and delete older versions of the plugin (NPSWF32) and possibly (re) install the latest Flash Player.

    • (32-bit Windows) C:\Windows\System32\Macromed\Flash\
    • (Windows 64 bit) C:\Windows\SysWOW64\Macromed\Flash\
  • I tryied to open the CC, it asked me to install the update and then gave me an error code: desktop application 50 CC could not be updated. What can I do?

    Error update.jpg

    Thank you. I already solved the problem by using the Adobe support chat.

  • How to add text to the gif format

    Hello, I am a beginner in photoshop.

    I want to add text to my gif as part of the animation, but somehow the text transparent look, even though I already use black color for the text.

    Could someone give me tutorial how to add text to the gif and then do some sort of subtitle?

    Thank you...

    The text layer is 2 layers under the real background layer in your file. Check your layers panel. Click, drag and drop the text layer currently selected in your layers 2 screenshot above or the visible layers, especially to see if your text will appear - it should ideally.

    Settings - when save you for Web & devices, you can customize options preset for GIF on the top right of your dialog "save for Web & devices".

  • How fix crashing when exceed the PDF and the terms of reference?

    I use Frame 8.  When I try my book to PDF, Frame crashes.  I tried PDFing the individual chapters, but that did not work.

    Also, I'm creating a cross reference or hyperlink.  I have a paragraph that says "For more information, see the configuration section in Chapter 1" the section of the configuration in Chapter 1 is a heading 4.  I tried following the instructions using Frame, but I'm not and I don't know if I need a hyperlink or a cross-reference.  I can't more simple explanation and instructions?

    Thank you!

    Several things could be the cause of the crash during the PDF creation process.

    1. have you applied the MS fix mentioned here?

    http://blogs.Adobe.com/TECHCOMM/2009/07/repost_hotfix_for_framemaker.html

    2. in the configuration of your PDF, make sure that you have PDF containing the tag off and in the links Panel, select "Create named Destinations for all paragraphs".

    Try again and also make sure that you have applied all the FM8 patches in sequence.

    You can use either references or hyperlinks to create jumps, although cross-references are easier to make and maintain.

    1. to insert a cross-reference to the Configuration section of Chapter 1, you first need to open Chapter 1 as well as the document on which you are currently working.

    2. in the location where you want to insert the cross-reference, select the special > cross menu option.

    3. for the first time that you use a cross-reference, you create a format for it. In your case the "for more information, see the" and "article in" are constant strings and the name of the section "Configuration" and "Chapter 1" variables are. ".

    (a) click on the button "Edit the Format" in the reference section to the bottom of the window. This will open a new dialogue window allowing you to create a format to use.

    (b) in this window, name the format so that you can identify it easily, such as 'More info in the section of chapter'.

    (c) then you need to enter the line of 'Definition' of what you want the cross-reference to say, that could be (without the quotes) "For more information, see the section of <$paratext>in <$paranum[Chapter]>." Items in brackets are building blocks used by FM to pick up the content of the destination that is specified when you perform the cross reference. The first a <$paratext>States to retrieve the content of the paragraph which you point to (in this case it should be "Setup" title. The <$paranum[Chapter}>item will enter the value tag chapter AutoNumber (or whichever one you have for numbering at the beginning of each chapter of the chapters).

    (d) once you are satisfied with your format, click Add, and then made some buttons. This will save thgis format in the catalog of cross-references.

    4. to actually insert the cross-reference, select the target document (for example chapter 1) in the drop down menu to "document:

    5. then in the Source Type (arrow downwards below the Document), make sure that you have selected paragraphs.

    6. in the left column, you will see the paratags available in the document of the chapter 1.

    7. Select the paratag type that contains the configuration section title (heading 4?).

    8. in the right hand column you should see all the tags heading 4 Chapter 1.

    9. Select the configuration of this column.

    10. check the Format line indicates that you created earlier ("chapter details in the Section"), and then click the Insert button.

    You are finished.

    If you don't like the formatting or he takes the wrong content, then reopen dialogue cross references and change the format to get what you want.

Maybe you are looking for

  • Qosmio G10: Need a recovery disk

    My HDD main, implemented at the point of hardware failure and has just been repaired under warranty on my G10 I need to restore the system and cannot locate my recovery disks. Someone at - it a copy, or can be downloaded?

  • No snapshot on the RN104

    Hi, I have the latest OS on my NAS and active for daily snapshots of several actions. None of them work; I deactivated and activated snapshots again but with the same result. Trying to create a manual snapshot I received the message: snapshot has fai

  • [Personal information deleted]: Support HP support hangs when starting the

    On HP Support Assistance to start up, I get this message. Whenever I click on 'OK', it is on this same screen. I had this problem until I upgraded to Windows 10 (upgrade to Windows 10 July 30, 2015) and I guess it's never resolved. I thought he would

  • to-do bar, do not change base on the savermode power in laptops running on battery

    Hello in windows 7 ultimate task bar and all others must be changed in mode of basic windows 7 everything when operating on battery power saving mode and must pass to aero while plugged in, previously it happened to me, but it does not work for me it

  • Hard to download

    Hello, yesterday I bought the first cc pro app and went on the page creative cloud app to download. I pressed the button download and on screen, he began by saying that it is download but there is no sign of it elsewhere on my computer. I have left i