simple JavaScript with the .onClick function does not. I have the following little script and does not know why it does not work through. any ideas?

#target illustrator

main #targetengine

Function

function count_selected_objects() {}

Alert ('start of the function'); works well!

myDocument var = app.activeDocument;

var items = selection.

var totalSelected = items.length;

for (var i = 0; i < totalSelected; i ++) {}

var my_elementy = app.activeDocument.selection [i];

Alert ("no" + i);

}

}

Palette window

var win = new window ("palette", 'Éléments Count');

win.alignChildren = "fill".

Win.My_Button = win.add ("button", undefined, "Run");

Win.My_Button.onclick = function() {}

count_selected_objects();

}

Win.Show ();

You can reference below:

Calling functions from the palette of the user interface

Ten

Tags: Illustrator

Similar Questions

  • Hello world. I have a problem with crossfade video. In my calendar, I have my blocks. These are Mxf files, but I can't ' apply the fade between them. Crossfade will not work. Any idea? Thank you very much

    Hello world. I have a problem with crossfade video. In my calendar, I have my blocks. These are Mxf files, but I can't ' apply the fade between them. Crossfade will not work. Any idea? Thank you very much

    May be you have not all handles:

    Adobe Premiere Pro help. Overview of the transition: application of transitions

    If this isn't the above post a screenshot of the blocks.

  • I have the one year subscription and I ran more money on my debit card. If adobe stopped the cloud creative until I put a new card debit that has money, but it still does not work? any ideas.

    I have the one year subscription and I ran more money on my debit card. If adobe stopped the cloud creative until I put a new card debit that has money, but it still does not work? any ideas.

    The CC has expired, please make a new purchase.

    Technically, you will need to disconnect & reconnect the CC desktop application.

    Concerning

    Stéphane

  • I just moved from windows to mac and changed my photoshop and lightroom, but now continues photoshop and lightroom stopping self on the mac, mostly photoshop and lightroom, anyone know why?

    I just moved from windows to mac and changed my photoshop and lightroom, but now continues photoshop and lightroom stopping self on the mac, mostly photoshop and lightroom, anyone know why?

    Yes, never make it.  I think Mac Yosemite by default active Standby Mode.

    Nancy O.

  • My Pavilion g does not start. The switch does not work. Any ideas how to start the computer?

    My laptop series HP Pavilion G7-1135sd will not start. I get no response from the switch. Some lights come but the display does not illuminate. I tried holding down the power switch for long periods - without success. I tried to take out the battery - also without success. Any ideas?

    Hi @DutchyH,

    Welcome to the Forum.  Sorry to hear of your problem power button on your HP Pavilion g7-1135sd.

    In a situation like this.  You have removed the battery and tried to push the power button with out.

    Have you tried while he was not powered as well.  So basically, remove the battery and hold the power button for 40 seconds with the power cord not plugged in.  Then replace the battery followed by power cord.  Then press the power button again.  If it does not at this stage I would contact HP support by phone.

    Please contact our technical support at the 800-474-6836. If you do not live in the United States / Canada region, please click the link below to get help from your region number.

    Telephone support for other regions.

    I hope this has helped you.

    Thanks again for posting and have a great day.

  • Upgrade to Windows 7, Vista, and my Lexmark X 5470 printer was not and could not print. Site gave a download for Win 7 compatibility with which I tried to do, but it still does not work. Any ideas?

    With the help of a Media Center PC HP Pavilion.

    solution uninstall the lexmark program
    Download this file: http://support.lexmark.com/index?page=content&id=DR7353&actp=search&viewlocale=en_US&userlocale=EN_US+&segment=DOWNLOAD&productCode=LEXMARK_X5470&searchid=1257910229479
    Right-click on it (after downloading) and click on properties, then click on compatibility, then choose run this program in compatibility mode for windows vista service pack 2 and click ok
    now run the program and follow the directions.
    print the test page and "walla".

  • abbreviation for Application/sequence/ZoomOut (=) does not work. Any idea?

    The ZoomIn '-' works perfectly. The "=" change Panel above "Composite" for "multi-camera". I'm not changing the shortcut settings (they are still "Adobe Premiere Pro Default").

    I use a keyboard German mac on a mac in a first English version. When I type '=' for example in the title editor in first, he writes a '='...

    Any idea anyone?

    I have it!

    I deleted the current shortcut in the "Keyboard shortcuts" menu for ZoomIn and spruced up there (=) that is located on a German keyboard (shift + 0)...

    Leave the confusion, Adobe does not care for international keyboards... I can never type a plain (=) on a German keyboard... He will always be with a shift...

  • FB 4.6 focusManager.setFocus does not work. Any ideas?

    FB 4.6 running in IE 8.0

    I try to make them work together focus. He places the cursor in the input text field, but the field does not allow you to enter text until the user has clicked on, even if the cursor is there?

    Simple code

    focusManager.setFocus (valueTi);

    valueTi.setFocus ();

    I found the solution from an old project. I had to add the following line to the index.template.html file

    onLoad = "window.document. ${application} () .focus '> '"

  • Windows 7 reports as "Not true" after replacement drive. Windows Update does not work. Any idea?

    I got a report that my drive was in imminent danger of failure.   Bought and made a direct disc-copy of the old disk cloning.    Everything seems to work fine, but now I'm getting the pop up that says Windows is "not true."    Windows shows as active, and nothing I've tried will stop the pop-up.  Worse, Windows Update does NOT work, and without running a few updates, I'm dead in the water for the use of new devices.

    I ran MGADiag.   Here is that content.   Any help is greatly apprectiated!

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

    Diagnostic report (1.9.0027.0):
    -----------------------------------------
    Validation of Windows data-->

    Validation code: 0x8004FE21
    Validation caching Code online: n/a, hr = 0xc004f012
    Windows product key: *-* - QCPVQ - KHRB8-RMV82
    Windows product key hash: + Rj3N34NLM2JqoBO/OzgzTZXgbY =
    Windows product ID: 00359-OEM-8992687-00095
    Windows product ID type: 2
    Windows license Type: OEM SLP
    The Windows OS version: 6.1.7601.2.00010300.1.0.003
    ID: {F8417B78-D747-4A8A-9ED2-D65405A9DA4E} (1)
    Admin: Yes
    TestCab: 0x0
    LegitcheckControl ActiveX: N/a, hr = 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Product name: Windows 7 Home Premium
    Architecture: 0 x 00000009
    Build lab: 7601.win7sp1_gdr.140303 - 2144
    TTS error:
    Validation of diagnosis:
    Resolution state: n/a

    Given Vista WgaER-->
    ThreatID (s): n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002

    Windows XP Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    File: No.
    Version: N/a, hr = 0 x 80070002
    WgaTray.exe signed by: n/a, hr = 0 x 80070002
    WgaLogon.dll signed by: n/a, hr = 0 x 80070002

    OGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002
    OGAExec.exe signed by: n/a, hr = 0 x 80070002
    OGAAddin.dll signed by: n/a, hr = 0 x 80070002

    OGA data-->
    Office status: 100 authentic
    Microsoft Office Enterprise 2007 - 100 authentic
    Microsoft Office Home and Student 2007-100 authentic
    OGA Version: N/a, 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Office Diagnostics: 77F760FE-153-80070002_7E90FEE8-175-80070002_025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3_E2AD56EA-765-d003_E2AD56EA-766-0_E2AD56EA-134-80004005_E2AD56EA-765-b01a_E2AD56EA-766-0_E2AD56EA-148-80004005_16E0B333-89-80004005_B4D0AA8B-1029-80004005_B4D0AA8B-920-80070057

    Data browser-->
    Proxy settings: N/A
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
    Default browser: C:\Program Files (x 86) \Mozilla Firefox\firefox.exe
    Download signed ActiveX controls: fast
    Download unsigned ActiveX controls: disabled
    Run ActiveX controls and plug-ins: allowed
    Initialize and script ActiveX controls not marked as safe: disabled
    Allow the Internet Explorer Webbrowser control scripts: disabled
    Active scripting: allowed
    Recognized ActiveX controls safe for scripting: allowed

    Analysis of file data-->
    [File mismatch: C:\Windows\system32\wat\watadminsvc.exe[7.1.7600.16395], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\wat\watux.exe[7.1.7600.16395], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\sppobjs.dll[6.1.7601.17514], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\sppc.dll[6.1.7601.17514], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\sppcext.dll[6.1.7600.16385], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\sppwinob.dll[6.1.7601.17514], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\slc.dll[6.1.7600.16385], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\slcext.dll[6.1.7600.16385], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\sppuinotify.dll[6.1.7600.16385], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\slui.exe[6.1.7601.17514], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\sppcomapi.dll[6.1.7601.17514], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\sppcommdlg.dll[6.1.7600.16385], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\sppsvc.exe[6.1.7601.17514], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\drivers\spsys.sys[6.1.7127.0], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\drivers\spldr.sys[6.1.7127.0], Hr = 0 x 80092003
    [File mismatch: C:\Windows\system32\systemcpl.dll[6.1.7601.17514], Hr = 0x800b0100
    [File mismatch: C:\Windows\system32\user32.dll[6.1.7601.17514], Hr = 0x800b0100

    Other data-->
    Office details: {F8417B78-D747-4A8A-9ED2-D65405A9DA4E}1.9.0027.06.1.7601.2.00010300.1.0.003x 64*-*-*-*-RMV8200359-OEM-8992687-000952S-1-5-21-3615725035-2700926363-1652036055Dell Inc.. Inspiron 1545 Dell Inc.. A11 20090827000000.000000 + 00070FD3607018400F804090409Central Standard Time(GMT-06:00)03DELL WN09 100100Microsoft Office Enterprise 20071264BC76978749586GW6PzcEVEDTVKeO5Ym5UUm41dBk =89388-707-0441865-6559414100Microsoft Office home and Student 20071219

    Content Spsys.log: 0 x 80070002

    License data-->
    The software licensing service version: 6.1.7601.17514

    Name: Windows 7 HomePremium edition
    Description: operating system Windows - Windows (r) 7, channel OEM_SLP
    Activation ID: d2c04e90-c3dd-4260-b0f3-f845f5d27d64
    ID of the application: 55c92734-d682-4d71-983e-d6ec3f16059f
    Extended PID: 00359-00178-926-800095-02-1033-7600.0000-3312009
    Installation ID: 004293808462381663381400261494038926624675101980836995
    Processor certificate URL: http://go.microsoft.com/fwlink/?LinkID=88338
    The machine certificate URL: http://go.microsoft.com/fwlink/?LinkID=88339
    Use license URL: http://go.microsoft.com/fwlink/?LinkID=88341
    Product key certificate URL: http://go.microsoft.com/fwlink/?LinkID=88340
    Partial product key: RMV82
    License status: licensed
    Remaining Windows rearm count: 3
    Trust time: 22/06/2015-13:55:06

    Windows Activation Technologies-->
    HrOffline: 0x8004FE21
    HrOnline: n/a
    Beyond: 0x000000000001EFF0
    Event timestamp: 6:22:2015 11:15
    ActiveX: Registered, Version: 7.1.7600.16395
    The admin service: recorded, Version: 7.1.7600.16395
    Output beyond bitmask:
    Altered the file: %systemroot%\system32\sppobjs.dll
    Altered the file: %systemroot%\system32\sppc.dll|sppc.dll.mui
    Altered the file: %systemroot%\system32\sppcext.dll|sppcext.dll.mui
    Altered the file: %systemroot%\system32\sppwinob.dll
    Altered the file: %systemroot%\system32\slc.dll|slc.dll.mui
    Altered the file: %systemroot%\system32\slcext.dll|slcext.dll.mui
    Altered the file: %systemroot%\system32\sppuinotify.dll|sppuinotify.dll.mui
    Tampered files: Check %systemroot%\system32\slui.exe|slui.exe.mui|COM
    Altered the file: %systemroot%\system32\sppcomapi.dll|sppcomapi.dll.mui
    Altered the file: %systemroot%\system32\sppcommdlg.dll|sppcommdlg.dll.mui
    Altered the file: %systemroot%\system32\sppsvc.exe|sppsvc.exe.mui
    Altered the file: %systemroot%\system32\drivers\spsys.sys

    --> HWID data
    Current Hash HWID: LgAAAAEAAQABAAIAAAABAAAAAgABAAEAeqj + MrAO2jOkW3YOKB9UbRq90qZGyg ==

    Activation 1.0 data OEM-->
    N/A

    Activation 2.0 data OEM-->
    BIOS valid for OA 2.0: Yes
    Windows marker version: 0 x 20001
    OEMID and OEMTableID consistent: Yes
    BIOS information:
    ACPI Table name OEMID value OEMTableID value
    APIC DELL WN09
    FACP DELL WN09
    HPET DELL WN09
    MCFG DELL WN09
    WN09 DELL SLIC
    SSDT PmRef CpuPm

    This may simply be caused by a bad set of drivers of technology Intel Rapid Storage Technology-

    Intel rapid storage driver installation

    try to download and install them from here - https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2101&DwnldID=22194

    (you want the download of iata_enu.exe)

    Once complete, please restart twice, then after another MGADiag report.

  • Samsung laptop computer with Windows 7 Home Premium. Scrolling touchpad stopped working with Firefox (but still works with Internet Explorer). I tried to 'restore' to several previous dates, but still does not work. Any ideas?

    Do not use this laptop very often. I had done several updates at once (including the Windows updates and the latest edition of Firefox).

    Check if there is a PDF file open in another tab. My Samsung R580 scrolls the PDF (which was open on another tab) instead of the tab that is currently open.

  • My scanner does not work. Any ideas as to why?

    I left my workspace for about a month. Now that I'm back from that my scanner does not scan. It has the power and the paper feeder works, but there is no copy or it scans.
    Thank you

    Hello

    1 are your drivers scanner updated?

    I would recommend you perform the System Restore to the point that your scanner was working normally.

  • Updated to v24; now Adobe Flash does not work. Any ideas?

    I am running Windows 7 64 bit. I've recently updated to Firefox v24, and now won't play Adobe Flash files (window/screen is just blank - no error message). First of all, I realized it when you try to play a file in Flash on YouTube. I have the latest version of Adobe Flash (11.8.800.168) installed. I reinstalled Adobe Flash, and after installation, the little graphic that appears in general, never did. just the small screen has remained empty. I went back to Firefox v23, and now Flash on YouTube files play very well.

    Hello, you can try to reproduce this behavior when you start firefox in safe mode 24, once? If not, perhaps an addon intrudes here...

    Troubleshoot extensions, themes, and issues of hardware acceleration to resolve common problems of Firefox

  • I get this message 0 x 80070006 when I try to use windows defender, and my fire wall will not work? Any ideas why this is?

    Some sites say it is a virus, some say it's because McAfee is worthless. What is a solid antivirus program that will fix this problem if it is a virus?

    To avoid any software McAfee in conflict and other antivirus programs turn off Windows Defender on Vista spy software.

    McAfee should have its own firewall as part of their suite.

    If you are having problems with McAfee you contacted McAfee Support?

    Or better still just delete McAfee and install a good free program like AVG, Avira, Microsoft Security Essentials or Avast.

  • Service Pack does not have changes to restore it then shuts off and restarts with the same message over and over again.

    Help!  I have an apple mac with windows alongside mac system.  I the have not used for a while and when I logged in the windows system advised me to update to IE 9.  To do this, I had to install Service Pack 2 I did.  He then restarted but cannot install and came up with the following: Service Pack does not have changes to restore it then shuts off and restarts with the same message over and over again.  I don't know what to do to reopen and to reinstall the Service Pack.

    Hello

    This article explains how to troubleshoot problems when you install a service pack for Windows Vista or Windows Server 2008.

    http://support.Microsoft.com/kb/947366

    Use this forum link for all questions related to Windows Vista SP1, Windows Vista SP2 and Windows Server 2008 SP2 below.

    http://social.technet.Microsoft.com/forums/en/itprovistasp/threads

    or repost in the Windows Update forum link below

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_update?page=1&tab=all

  • I installed the 12 elements, it does not open, a screen will appear with the options e-12 and 4 other languages

    I installed the 12 elements, it does not open, a screen will appear with the options e-12 and 4 other languages.  When I click on 12 items, a screen will appear with a red install icon, I click and it askes for the serial number. It won't let me type in letters digits only. Already, I have the serial number once. How to make this work? I don't want to be a programmer!

    attach a screenshot of what appears after clicking PES 12, http://forums.adobe.com/thread/963429

Maybe you are looking for