Please Please help with JavaScript and Actions

Is there a way to perform a saved Action from the Action Pallette using a JavaScript script? I know there is a way to do it with Visual Basic.
Is there a way to run a Visual Basic script from a JavaScript script?(which could be a potential workaround if JavaScript CANNOT call on an Action)
Is there a way to call on a JavaScript from an Action?
Here's specific information on my problem:
I am using Illustrator CS2 on a PC
I have written all of the JavaScript scripts that I need to perform various layer selection procedures and they all work perfectly. I have placed them in the Presets > Scripts folder so that they appear in my file menu.
I wrote a very long action that called on these scripts (using Insert Menu Item > then selecting the script by going File > Scripts) sequentially and did some selecting and copy-pasting and applying graphic styles in between scripts. The Action worked PERFECTLY and ran all the scripts I needed to an automated a process that usually takes me an hour in less than five minutes!
I saved the actions and saved the file.
After closing Illustrator all of the lines of the action that called on scripts disappeared! It seems this is a known bug...I currently know of no workaround.
Can anyone help with any of the following things:
1. Getting actions to SAVE the commands to run javascripts
2. Writing a JavaScript that runs an Illustrator Action
3. Writing a JavaScript that runs a Visual Basic script that runs an Illustrator Action.
I spent three days learning the basics of JavaScript (mostly by trial and error) and successfully wrote all the scripts I needed...I was overjoyed! But now that I've closed illustrator my actions to run said scripts do not work. PLEASE ADVISE!!!
Thanks in advance,

try next
1)if possible split JS-code into 2 parts (before/after action)
2)make vbs script with contents
Set appRef = CreateObject("Illustrator.Application.3")
appRef.DoScript(Action As String, From As String)
'add wait while ActionIsRunning
3) run vbs (File > Scripts or double-click).

Similar Messages

  • Please, need help with a query

    Hi !
    Please need help with this query:
    Needs to show (in cases of more than 1 loan offer) the latest create_date one time.
    Meaning, In cases the USER_ID, LOAN_ID, CREATE_DATE are the same need to show only the latest, Thanks!!!
    select distinct,
    loan_Calculator b,
    bv_user_profile c,
    bv_mr_user_profile d
    where b.loanid = a.loanid
    and c.NET_USER_NO = a.resp_id
    and d.user_id = c.user_id
    and a.is_partner is null
    and a.create_date between
    TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
    TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    order by a.create_date

    Take a look on the syntax :
    max(...) keep (dense_rank last order by ...)

  • Please need help with this query

    Hi !
    Please need help with this query:
    Needs to show (in cases of more than 1 loan offer) the latest create_date one time.
    Meaning, In cases the USER_ID, LOAN_ID, CREATE_DATE are the same need to show only the latest, Thanks!!!
    select distinct,
    loan_Calculator b,
    bv_user_profile c,
    bv_mr_user_profile d
    where b.loanid = a.loanid
    and c.NET_USER_NO = a.resp_id
    and d.user_id = c.user_id
    and a.is_partner is null
    and a.create_date between
    TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
    TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    order by a.create_date

    Perhaps something like this...
    select id, create_date, loanid, rate, pays, gracetime, emailtosend, first_name, last_name, user_id
    from (
          select distinct,
                          max(create_date) over (partition by a.user_id, a.loadid) as max_create_date
          from CLAL_LOANCALC_DET a,
               loan_Calculator b,
               bv_user_profile c,
               bv_mr_user_profile d
          where b.loanid = a.loanid
          and   c.NET_USER_NO = a.resp_id
          and   d.user_id = c.user_id
          and   a.is_partner is null
          and   a.create_date between
                TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
                TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    where create_date = max_create_date
    order by create_date

  • Why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • Help with Javascript/Calculations

    Have a building use policy for school.
    Need help with checkboxes and default values.  I can get javascript/math to work when I click check box.
    Someone wants to rent a room they check the rentRoom checkbox.  Then the enter how many rooms 1,2,3 etc..  The value for the rentRoom checkbox is $25.
    I can get it when the checkbox for rentRoom is selected the rentRoom.Total computes correctly.  However, what I want is when the form opens up a default value of $0.00 to be in there.  I also want if someone goes back and unchecks the rentRoom checkbox the value goes back to $0.00 not just blank.   Right now I am getting the error the value entered does not match the value of the field.  That is if I put the default value in options.  Basically, I can't seem to figure out the javascript code to get this to work.
    Am I asking for too much, can someone guide me to javascript to help me out.
    I have tried if/then statements and switch statements.  I just can't figure out how to get it to for lack of better a word - toggle back and forth.
    If this is not possible please tell me.  If it is too complicated tell me.  I am not using livecycle for this as we had a word document and I just used the find form fields.  I am also using Adobe Acrobat 8 Professional.

    Thanks that looks good.  I am still missing something but the calc doesn't work when I put in my variables.  I will work with it more but nothing happens.
    The one thing is I have the default value of the checkbox as 15 so don't know if that messes it up.
    Right now I get the default value of $0.00 all the time.  When I click on the check box on/off it doesn't do the calcs.
    sorry, any more input, what am i missing??
    I also changed the syntax error that was posted on your origianl post.  You had == 'Off" I changed that to 'Off'

  • What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API

    The question says it all:
    What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API.?
    In the User Profile -> Permissions there is only the option for "Full Control".

    Hi Nikolay,
    Thanks for posting your issue, you need to set permissions on User Profiles = Read. Kindly find the below mentioned URLs to get the code and more details on this.
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog :

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    ON a.cost_ctr = TRIM (b.bu)
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • AIR with JavaScript and AJAX (noob design issues)

    Okay, so as the subject states, I'm a noob when it comes to designing an AIR app. My question is kind of two fold:
    First, as a matter of design, I've got a main window that has several drop-down type menus "File", "Preferences", "Help" that kind of thing. My plan was to keep reusing the main window for each of my different screens (unless a pop-up/dialog type screen was called for)
    Anyway, the application I'm writing will, in part, handle a database of patrons. So under one of the menus (File in this case) I've got a "Patron" option. Clicking on "Patron" fires a function called newPatron() which in turn calls my function ebo.displayScreen('patron.htm'). This latter function takes the filename passed in and reads that file then dumps it's contents out to the main screen.
    So, my main window consists (in part) of the following html:
    <body onload="ebo.doLoad();">
         <div id="content"></div>
    then my displayScreen function looks like this:
    function displayScreen(filename){
         var my = {};
         // get a handle on the file...
         my.file = air.File.applicationDirectory(resolvePath(filename);
         // get a handle on the stream... = new air.FileStream();
         //open the stream for read..., air.FileMode.READ);
         // read the data... =;
         // close the stream...;
         // update the screen (I'm using jQuery here)
    So anyway, this works like a champ. I click on "Patron" from my file menu and the screen changes to display the contents of patron.htm.
    Currently, patron.htm just contains the following:
    <div style="text-align:left;">
         <input type="button" value="add" onclick="ebo.add(1,2);" />
    <div id="result"><div>
    ebo.add looks like this:
    function add(a,b){
         var my = {};
         my.result = a + b;
         $("#result").empty().append(my.result + "<br />");
    So, if anyone hasn't guessed by now, the code contained in the ebo namespace gets included on the main screen when the application loads, and my problem is that despite the fact that once the patron.htm file is loaded in the content div by clicking on the menu option, my button on that screen refuses to work. I've even tried just having the button do an alert directly,
    <input type="button" value="add" onclick="alert('AIRRocks!');" />
    but even that fails!
    So, I added some code to the main page to test a button from there...
    <body onload="ebo.doLoad();">
         <input type="button" value="add" onclick="ebo.add(1,10);" />
         <div id="result"></div>
         <div id="content"></div>
    So, now when the main screen loads, I get an "add" button and when I click it the number 11 appears in the "result" div. When I click on the Patron menu option, the new html and javascript are loaded into the "content" div, but the add button in that area refuses to work!
    What gives? I'm sure I'm missing something. So I guess the two questions are: is my scheme of loading new content into the main window by reading the contents of a file, flawed in some way? Or am I just missing something about making calls from this dynamically loaded content? It *looks* like it should work fine, but if I can't make javascript calls from the resultant content, then the concept is no good.
    I realize this has been a somewhat long winded post, but hopefully it describes in enough detail the problem I'm having. I should maybe add that I've looked at what's in the DOM using the AIR HTML/JS Application Inspector and it looks like everything should work perfectly.
    I hope someone out there can help me and might have the patience to explain where I've gone wrong. I might also mention that the only book I've read (or am reading) on AIR with JavaScript and AJAX is "Adobe AIR (Adobe Integrated Runtime) with Ajax: Visual QuickPro Guide"... it really hasn't covered aspects of what makes good design (like what's the best way to reuse the main application window to hold interactive content)... but anyway, there you have it.
    Again, I hope someone can help me out.

    Thanks for responding, Andy. I don't think I'm losing my namespace. That
    thought had crossed my mind, which is why (and I thought I put this in my
    original post) I tried putting a somple alert in the onclick event of the
    button in my "patron.htm" file... but that simple alert doesn't even work.
    Do you still think it's an issue with the namespace?

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE

  • How is valid Programming in HTML5 with JavaScript and CSS3 Specialist certification

    Hi ,
    Before 2 years(2013) i take  Programming in HTML5 with JavaScript and CSS3 Specialist certification, and i want to ask you,  is still valid there this certification, or should I take the exam again to take certification.
    Thank you :)

    This certification is "permanent", you don't need to recertify.
    If you also took the additional exams needed for a MCSD, then yes, you would need to recertify every two years in order to maintain the MCSD. But the TS certification that you get by passing exam 70-480 does not require recertification.

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • Help with automator and folder actions please

    Hi all!
    I'd like to attach a folder action to a folder, so that any time i drag something in it, it'll be sent to my mobile phone.
    I just dont get it how to do it.
    Can please someone help? I'm totaly incapable of writing an applescript to do so...
    Best regards,

    So next step...
    I create a folder so and right-click "configure actions" (sorry my
    system is french so the terms are probably different on the US
    Automator launches, and I add the push to BT part to my workflow. I save
    it all, and return to the finder.
    I right click on the folder, the script appears as it should.
    I click on the created script, a window opens with the device selection.
    I click OK. and get a message saying that this kind of file (a standard
    .sis file) won't be accpted from my device (a 6680 nokia). I click "try
    anyway", the window of file transfer opens, but I get the error
    "Transfer failed, operation not handled".
    I don't get it. Where did I go wrong?
    Thanx fo your feedback!

  • Please point me to examples of fixed layout ebooks with javascript and animations

    Hi! I am a danish children's author and want to create an ebook in "Fixed layout" for the ibookstore. I want the ebook to have simple interactive and animated features triggered by javascript. I would like more knowledge about what is and isn't possible with the javascript and CSS in apples fixed layout format. I have already viewed the "Yellow Submarine" ebook and Apples sample ebook "Sonnet 18". Are there more examples available?
    Please do not point me to apps. There are great interactive book-apps for children - but for this project I am only interested in the Fixed layout format for the ibookstore.
    All replies will be greatly appreciated, thanks!

    if I can help, let me know...
    check out the new series to help create publications. just search in the iTunes Store for An iBuild Opportunity

  • Can somebody please help with Javascript. 2 small problems.

    Hi. I have created a dynamic PDF form with fields. I have 2 problems that i am sure someone can help me with. (I can email anyone this PDF upon request).
    PROBLEM 1. In this form I have a table (actually i think its a sub form) which has 3 buttons associated with it ('Add Row', 'Delete Row' and (Clear Row'). One button adds a new row. It works but it effectively duplicates the row (and all text fields/cells contained in the row) and places this new row at the bottom of any existing rows. What i require is for this button (the button gets duplicated along with the row) to place the new row immediately below the row from where it is clicked. ie, imagine you open the document, fill out the row (at this stage there is only one) and hit the 'Add Row' button. You now have 2 Rows (great), so you fill out the second Row. Now here is my problem, if you hit the 'Add Row' button on the first Row, a new 3rd Row is added to the bottom and not in between Row 1 and Row 2.
    Effectively if you have dozens of Rows filled out and you need to insert a Row for an amendment, currently it cannot be done without deleting all Rows up to the point where you want to make the addition/insertion.
    PROBLEM 2. Within this Row of text/numeric fields are two fields (called 'Rate' and 'Loading') where dollar amounts are entered. As the form is filled out (the Rows can be dynamically generated and it's fields manually filled out by the user) there can potentially be dozens of Rows in a completed form and, as each Row has many text/numeric fields, one can imagine Columns forming once there is more than 1 Row. At the end of the form, totals are automatically calculated. I have created a button to reset (erase) all amounts entered into these two specific fields (Columns) but in every Row. Unfortunately there is something wrong with my script syntax as this button does not do this. ( i want this facility as when the form, which is a budget proposal, is completed i need to send two copies - one to accountants with figures and logistics and a second copy to another department whom i do not want to give the figures, so i need the button to erase figures without having to clear each cell individually).
    Any help that someone can give would be much appreciated.
    Please email me at
    [email protected] if you would like me to send you the file.

    Send the form to
    [email protected] and I will give it a go ....include a reference back to this forum posting.

  • Please help with Javascript obejcts hierarchy

    Is following Javascript obejcts hierarchy is right?
    1. App > 2. Doc > 3. Page >
    (from Page) > 3.1 Annotation3D
    (from Page) > 3.2 Field (link)
    thank u )

    You have to have Acrobat/Reader open to open a PDF and use some or all of the Acrobat JS features.
    When Acrobat/Reader is started various folders are accessed and files within those folders read and processed to create the application. This includes dictionaries, certain global variables, various functions provided by Adobe, and user defined functions or variables. The Adobe provided functions or user provided functions or variables are accessed by their assigned name. So if you created an application folder level function in a file called 'hello.js' containing the following code:
    function HelloWorld()
    app.alert('Hello World!');
    Each time you open Acrobat an alert box with "Hello World!" will appear.  So even without any PDF open one can perform or have a task done. With application level scripts, you can add menu item, tool bar buttons, or modify menu items, etc. So when you open Acrobat you could have a menu item to create a new blank PDF or add the JS API Reference to the "Help" menu item. And if you selected "Help => JavaScript API', the JS API Reference file would open, whether there is an open PDF or not.
    PDF files are opened at the application level, as the application needs to interpret the code of the PDF file and provide the necessary resources for displaying, calculating, linking, etc for the open PDFs. If you open a PDF pragmatically, you need to provide an object name to that PDF. Especially if you are going to reference that file with JavaScript.
    Within an open PDF there are various actions. The first is the document level scripts that are used to establish the environment in which that PDF will function. This could include special functions to sum values, compute date differences, perform special key stroke and formatting. There can even be test to see if there are any necessary application level functions available for use the the document.
    Within PDF document you can can fields, links, comments, etc. And these items only exist in the PDF document and rely on the PDF document for performing the various task or communicating those task the the application.
    By the way with the "HelloWorld" function defined in the application JavaScirpt folder, and PDF opened on that computer can have a button with the 'mouse up' action JavaScript of "HelloWorld();" for the code and any time that button is pressed the alert box that appeared when Acrobat was started will appear. But if you take that PDF to another computer that does not have that file nothing will happen or an error box will appear.
    See Getting Started - Developing for PDF by Dave Wright and look around the Planet PDF site.
    You also need to realize that Acrobat JavaScript does not run synchronously, so you do not always have the individual scripts running in the same order or speed so it is possible a script will not always start and end before the next script in line is started or ends. And if you have dependencies between these scripts you need to test to see if they are all met.

Maybe you are looking for