Looping through collection of symbols and populating a drop down on a form EXTENDSCRIPT

Hello everyone-
I got a question.  Would it be possible to run a script that would loop through a collection of symbols in a defined library and populate a drop down with the available symbols. My goal is to be able to open Illustrator, and when I run the script the dropdown is populated with all available symbols(text is fine) in a defined library that I can then select and place on the artboard. Any help would be appreciated.
thanks in advance!

So...
Dim appref As New Illustrator.Application
Dim docRef As Illustrator.Document                                                                         'The work document
Dim docToAdd As Illustrator.Document                                                                   'The document which contain the symbol's library 
Dim pathArt As Object
Dim ItemSymbol As Object
Dim itemSymbolref As Illustrator.Symbol
Dim artObject As Variant
appref.Open ("C:\..... workDoc.ai")
Set docRef = appref.ActiveDocument                                                                         'Assign docRef to your work document
appref.Open ("C:\......symbolDoc.ai")
Set docToAdd = appref.ActiveDocument                                                                    'Assign docToAdd to your symbol document
Set symbolref = appref.ActiveDocument.Symbols(Symbol_Name)                               'Assign symbol ref the symbol you're looking for
Set itemref = appref.ActiveDocument.SymbolItems.Add(symbolref)                              'Copy it on the current active page
itemref.Selected = True                                                                                              'select it
docToAdd.Copy                                                                                                         'add it to your clibboard
docToAdd.close (aiDoNotSaveChanges)                                                                     'Close the library, without changing anything
appref.ActiveDocument.Paste                                                                                     'Paste the clipboard on your work document
                         'As soon as you paste the symbol, it will be added in the document symbol library
Clipboard_Clear                                                                                                         'See below why...
SelectedObjects =appref.ActiveDocuments.selection                                                   ' Select the symbol you past
                         ' The loop is not necessary if you have only one thing selected
For Each artObject In selectedObjects
    artObject.Delete
Next
                         ' Cleanup your pointers
Set artObject = Nothing
Set pathArt = Nothing
Set docToAdd = Nothing
[....] Continue your script on your working document
Set docRef = Nothing               'after closing your working doc...
Remark on clipboard_clear : If you don't do it, the risk is to accumulate plenty other things you don't want...
Public Function ClipBoard_Clear()
  Call OpenClipboard(0&)
  Call EmptyClipboard
  Call CloseClipboard
End Function
With
Public Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Public Declare PtrSafe Function CloseClipboard Lib "user32" () As Long
Public Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long
be careful I use the PtrSafe pointer due to the fact I'm working in x64 architecture
in x86 it will be
Public Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long
Regards to all
Michel

Similar Messages

  • Populating a Drop down menu JSP form

    How to go about populating a drop-down form from Oracle Database using JSP?
    I have the connecting to the Oracle Database running. I also can query forms, but i can't create a drop-down menu form.

    Start the dropdown box with the regular select tags "<select name=this>"
    Then open a JSP block and get a resutlset, loop through the resultset and and put the values from the resutlset into the <option> tags for the HTML.
    Example
    out.println("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) + ">");
    Then close the loop and that should populate a dropdown within the html form.

  • Loop through a csv file and return the number of rows in it?

    What would be simplest way to loop through a csv file and
    return the number of rows in it?
    <cffile action="read" file="#filename#" output="#csvstr#"
    >
    <LOOP THROUGH AND COUNT ROWS>

    ListLen(). Use chr(13) as your delimiter

  • How to loop through many XML messages and parse them ?

    Hi All
    I have been trying very hard to loop through many XML messages and process each of them. Let me first explain the problem -
    Suppose I have the following String -
    <xyz>
    <abc>happy</abc>
    </xyz>
    <xyz>
    <abc>new</abc>
    <xyz>
    <xyz>
    <abc>year</abc>
    </xyz>
    I have to process each message within the <xyz></xyz> tag and find the falue of <abc> element (happy, new and year).
    The extraction of <abc> value is very simple, I am using SAX parser's startElement() method to check every element's name and if the element's name is <abc> pick up the value. But I am not able to loop through the different messages within the <xyz></xyz> tag.
    I am thinking of using another DOM parser -
    DOMParser domParser = new DOMParser();
    StringReader rdr = new StringReader(inputXML);
    InputSource src = new InputSource(rdr);
    domParser.parse(src);
    Document doc = domParser.getDocument();
    NodeList nodeList = doc.getElementsByTagName("xyz");
    Now I can loop through this nodeList, but not able to. Is using the DOM parser and NodeList the preferable way of lopping through the messages, then how I can loop through ? Or is there any other way ?
    I have been trying on this for quite a few days, but not able to. Can you please help me out ?
    Thanking you in advance ....
    Nirmalya Sinha

    Hi,
    Try using the SAX reader from the dom4j package. The document object that you receive contains methods for getting the root elements and with that you can traverse down to the sub elements of it.
    Hope this was of some help.

  • Help! Took mac to store today as DVD stuck in drive- 3 hour round trip!!! Told it was fixed and it now won't even switch on :( I press the on button and all I get is a continuos loading symbol and then it shuts down . Worse state than it was before :( :(

    Help! Took mac to store today as DVD stuck in drive- 3 hour round trip!!! Told it was fixed and it now won't even switch on :( I press the on button and all I get is a continuos loading symbol and then it shuts down . Worse state than it was before :( :( not happy at all and not well enough to travel to get it fixed (my mum went today) anyone got any ideas please???

    Oh ok - Thankyou for that. I will be ringing them tomorrow and I will not be happy ! And I'm hoping they can suggest what I'm suppose to do about getting it back to them as I can't take it in myself. SO so angry!!! Does people getting it back in a worse state happen often? :| do read these discussion boards? I hope they do!!!

  • Populateing a drop down list in a repeating sub form

    I have been using the scripts from the Purchase Order sample that work with the Country and States/Provinces drop down lists and have modified them to fit my needs. The scripts work great. However I have a drop down list that is in a repeating sub form and the only the drop down list in the first occurance of the sub form works. The others don't.
    I put this line of code in a field called drpOrderedByTeam.
    JobsScript.getJobsOther(xfa, xfa.resolveNode("form1.TimeSheetSF.DetailsSF[*].DetailsTable.DetailsRow.ItemNumber"));
    I thought I just needed to add an "[*]" to the name of the sub form and it would work with all occurances but it doesn't seem so and I'm not sure what else to do.

    Based on your explanations, I've attempted to re-create your form and I think I've got it working the way you'd like it to.
    There are some difficulties with using fields in table headers which are replicated on subsequent pages because while new instances of the header subform and the fields it contains are created, you don't have access to these instances using the header's Instance Manager (I think this is a bug but I'm not sure). This means that you can't iterate through the instances of the header in order to populate the task lists depending on the selection in the team list. One solution for this is to make all header fields Global (select each field and, in the Object palette's Binding tab, set the
    Default Binding property to
    Global). This means that all instances of these fields will share the same value. The effect is that when you change the value of a field on an instance of a header on any page, the change will be replicated on all instances on all pages. The catch, though, is when you use lists in the header. Making list fields global doesn't mean that their item lists are global -- which causes other headaches.
    In the end, because of the problems I've described, I had to resort to cheating a little but if you think about it, it's not really cheating. What the form does is whenever the team list value changes, it removes all instances of the DetailsSF rows. This has the effect of also removing all instances of the DetailTitlesSF headers accross the current page set (and removes all pages but the first one). Then 6 new instances of the DetailsSF row are generated and the DetailTitlesSF header is re-populated using the new selection in the team list. After that, if a new page gets generated because of the number of instances of the DetailsSF rows, the new instances of the task lists in the new instances of the DetailTitlesSF header will have the correct list of items based on the current value of the team list. In the end, even though I'm cheating by removing all instances of the DetailsSF row in order to reset the lists in the DetailTitlesSF header, it's not really cheating because if you change teams, then it should be assumed that all data entered doesn't apply anymore because the tasks change as well... Convinced?
    The best way to understand this is to check-out the sample form.
    Let me know if you have any questions.
    Stefan
    Adobe Systems

  • Help needed with populating a drop-down list from an Access Database

    Topic
    data drop-down list
    Jason Murthy - 11:39am Feb 14, 2005 Pacific
    Hello,
    I am trying to use the data drop-down list from the custom library. I enter the name of my data connection and the other 2 variables in quotes when they are initialized, just like the example says to, but it still doesn't work. Anyone have any thoughts?
    Thanks,
    Jason
    Reply To This Discussion | Back to Topic List | Bookmark | Change Subscription
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages 11 messages. Displaying 10 through 11.
    First Previous Next Last Show All Messages
    Denzil White - 5:46am Jul 28, 05 PST (#10 of 11)
    Oh and before you say anything more I have also tried changing it from Javascript to the FormCalc, and no diff, maybe I am more stupid than I realised, heh,heh
    Post Reply | Bookmark
    Henk Pisuisse - 12:06am Aug 9, 05 PST (#11 of 11)
    I am having trouble (sleepless nights) with populating a drop-down list from an Access Database. The result is: I only get the first record from the data connection. So the connection works but I cannot go through the other records. Maybe there is an other way to do this.
    I am trying to selectively fill a form with data from an MS-access database.
    I hope someone can help me.
    [email protected]
    The Netherlands (small country in Europe)

    If you email the access DB and the form to [email protected], I will try to take a look at it for you.

  • I am trying to get space on an external hard drive which has some old time machine back up files that I do not need but can not eliminate, even by going into the time machine, clicking on the backup file to be eliminated and using the drop down eliminate

    I am trying to get space on an external hard drive which has some old time machine back up files that I do not need but can not eliminate, even by going into the time machine, clicking on the backup file to be eliminated and using the drop down menu with the gear box symbol to eliminate

    I cannot find this 300GB "Backup" in the Finder, only in the Storage info when I check "About This Mac".
    You are probably using Time Machine to backup your MacBook Pro, right? Then the additional 300 GB could be local Time Machine snapshots.  Time Machine will write the hourly backups to the free space on your hard disk, if the backup drive is temporarily not connected. You do not see these local backups in the Finder, and MacOS will delete them, when you make a regular backup to Time Machine, or when you need the space for other data.
    See Pondini's page for more explanation:   What are Local Snapshots?   http://pondini.org/TM/FAQ.html
    I have restarted my computer, but the information remains the same. How do I reclaim the use of the 300GB? Why is it showing up as "Backups" when it used to indicate "Photos"? Are my photos safe on the external drive?
    You have tested the library on the external drive, and so your photos are save there.  
    The local TimeMachine snapshot probably now contains a backup of the moved library.  Try, if connecting your Time Machine drive will reduce the size of your local Time Machine snapshots.

  • How to display Current Year and Month in Drop Down list

    Hi Dear friends,
    I am devloping a report. It has got 2 pages--input and output(Report) page.
    IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
    Now, my problem is:
    HOw to display current month and year by default in the dropdown list...........
    I hope my question is clear.
    Please help.
    Regards,
    ASh

    NO da,
    it is not working.
    First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
    So, i posted the question.
    I tried your code. It is giving following error.
    A Servlet Exception Has Occurred
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
    first.set(Calendar.YEAR, 2003)
    ^
    An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
    out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
    ^
    4 errors
    Pls. Help.
    Regards,
    Ashu

  • Populating selection drop downs.

    I am creating an abap report and have several fields on the selection screen.
    I would like to know if it is possible to populate one of the fields according to what I have put in another field.
    For example, I have a field for Manager Name and then another field for Employee Name.  I would like the user to be able to enter a name in Manager Name and then the possible values for Employee Name are the people that report to this person.

    Hi SImon,
    Please chekc the following.
    [Populating one Drop down based on another Dropdown|populate drop down menu based on entry in another field;
    DATA : BEGIN OF f4_tab OCCURS 0,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
        END OF f4_tab.
       CLEAR lin.
    " adjust this as per your requirement
      DATA : dynpread TYPE TABLE OF dynpread WITH HEADER LINE.
      REFRESH dynpread.
      CLEAR dynpread.
      dynpread-fieldname = 'ITAB-CARRID'.
    *  dynpread-stepl = lin. 
      APPEND dynpread.
      CLEAR dynpread.
    at selection-screen on value-request for YOUR_FIELD " Your Second Field here
      CALL FUNCTION 'DYNP_VALUES_READ'
            " This FM gives the First field value before u press Enter/ PAI is triggered
        EXPORTING
          dyname                               = sy-repid
          dynumb                               = sy-dynnr
        TABLES
          dynpfields                           = dynpread
       EXCEPTIONS
         invalid_abapworkarea                 = 1
         invalid_dynprofield                  = 2
         invalid_dynproname                   = 3
         invalid_dynpronummer                 = 4
         invalid_request                      = 5
         no_fielddescription                  = 6
         invalid_parameter                    = 7
         undefind_error                       = 8
         double_conversion                    = 9
         stepl_not_found                      = 10
         OTHERS                               = 11
      IF sy-subrc IS INITIAL.
        READ TABLE dynpread WITH KEY fieldname = 'ITAB-CARRID'.
        IF sy-subrc IS INITIAL.
          SELECT carrid connid FROM sflight
                INTO TABLE f4_tab
                 WHERE carrid = dynpread-fieldvalue.
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield               = 'CONNID'
             dynpprog               = sy-repid
             dynpnr                 = sy-dynnr
             dynprofield            = 'ITAB-CONNID'
             value_org              = 'S'
            TABLES
              value_tab              = f4_tab
        ENDIF.
      ENDIF.
    Cheer
    Ram

  • I ran Advance System Care 3 Disk Optimizer program and now my drop down menus are too fast. How do I slow them down

    I ran Advanced System Care3 disk optimizer program on my computer and now the drop down menus in Firefox open too fast. Mostly in the Bookmarks menu with nested folders. I went into the registry and changed all the "MenuShowDelay" data values back to 400(which were changed to 200 by the program. All the other windows programs drop down menus went back to the original speeds and are fine. Firefox did not change back to it's original delay speed. Where is the registry entry or configuration file for Firefox? How can I slow the menu down?
    Thanks,
    Tony

    I ran Advanced System Care3 disk optimizer program on my computer and now the drop down menus in Firefox open too fast. Mostly in the Bookmarks menu with nested folders. I went into the registry and changed all the "MenuShowDelay" data values back to 400(which were changed to 200 by the program. All the other windows programs drop down menus went back to the original speeds and are fine. Firefox did not change back to it's original delay speed. Where is the registry entry or configuration file for Firefox? How can I slow the menu down?
    Thanks,
    Tony

  • How do you find a notification for Ask to Buy for Family Sharing once it is off your screen and not in drop down Notification Center?

    How do you find a notification for Ask to Buy for Family Sharing once it is off your screen and not in drop down Notification Center?

    Welcome to the Apple Community.
    I don't believe you can.

  • Can I copy and paste a drop down list into another field?

    Can I copy and paste a drop down list into another field?

    You don't have to create a PDF, but it would be helpful to know what, exactly, you want to do with the ppt.
    You can export as a PDF which will keep vectors and text as PostScript (crisp) elements.
    You can also Save As from ppt in a variety of formats such as PNG or TIFF.
    These rasterize all the vectors and text, but are very useful if you're laying out a miniature gallery of the powerpoint presentation.
    However, if you want to make the InDesign file a replica of the ppt slides for print, PDF is probably the best way to go.

  • I have an Adobe Flash Professionals digital classroom book for CS6 and was following all steps easily until it ask me to select the text tool and change it from classic to tfl in the property inspector. I looked and all that drops down is dynamic, static,

    I have an Adobe Flash Professionals digital classroom book and was following all steps easily until it ask me to select the text tool and change it from classic to tfl in the property inspector. I looked and all that drops down is dynamic, static, and input. Where is the TFL and Classic ? I watched adobe learning center but he was using CS5. Can anyone please help?

    Hi,
    Do you use Flash CS6 to follow the instructions in the classroom book? If yes, then you can find it under text drop down for an AS3 Document as shown below
    If you follow the instruction in Flash CC or Flash CC2014 then you will not find this option as this is deprecated.
    Thanks!
    Mohan

  • FileChooser - "switch off" file name field and file type drop down choice..

    Hi there,
    I'm wondering, is there a simple way of not displaying the file name field and file type drop down choice that anyone knows of?
    Reason being; my FileChooser is embedded in an application window and does not pop up as a dialog - the users are only acessing one file type, but it could be in any folder on their machine.
    many thanks,
    Fergus.

    Moved to legacy SDK forum

Maybe you are looking for

  • Help needed in showing Order Quantity in Quantity contract

    Dear, Gurus I know it is possible to show the Target Quantity and Order Quantity both in the Display view of my quantity contract. It is said that you have to click the update document Flow which I know I have done in copying control. But no matter h

  • Flow Logic jumping to HTML Template (with SAP dialog) & back again

    Hello Overview ======== Within a HTML Template that uses flow logic, can I call a HTML Template that has SAP dialog behind it.  The SAP dialog is a function module that has a screen requesting user input and then follows on to display selection based

  • RefCursor in CLOUMN from select !?

    Hello Is it possible to access to column with CURSOR by ODP.NET ? Below is select which will be return by function, but the results have also cursors in 1 column. IS IT POSSIBLE to access to all returned data? EXAMPLE: CREATE OR REPLACE FUNCTION SDMS

  • Priemere Pro CS4 will not save , project file is very large

    I have a recent project (music videos) that was started in CS4 and upgraded to CS5. ( OS = Windows 7 x64)  Things were great but then I hit a wall, at about 8 sequences it would take 1/2 an hour to save.  I split up the project by making copies of th

  • HT1692 I cannot go online with my iPhone.

    How I cannot go online, check my email on my iphone?