How to Undo Multiple Actions in ActionScript [CS5]

I am wwriting an InDesign extension for CS5 using ActionScript. I want to be able to undo a group of actions as a sungle transaction. In JS, I would use doScript() for this purpose.
How do I do it in ActionScript?
TIA,
mlavie

Harbs,
I read all the material on the subject (thanks for the reference), however I seem not to be able to pass parameters to the JavaScript (even primitive types), which is essential for what I want to do.
In fact, the example from the JS Scripting Guide doesn't work:
var myParameters:String = ["Hello from DoScript", "Your message here."];
var myJavaScript:String = "alert(\"First argument: \" + arguments[0] + \"\\rSecond argument:\" + arguments[1]);";
InDesign.app.doScript(myJavaScript, ScriptLanguage.javascript, myParameters);
Any ideas?
mlavie

Similar Messages

  • How to apply multiple actions on a single file in one go to generate multiple watermarked pdfs?

    usually i need to create many watermarked datasheets for different customers using a single base pdf. currently i run individual actions for individual customers on the same file which means i have to runs 10s of individual actions every time i have  new source file. can i make a single action or a script which will take a single source file, run multiple actions(~15-20) for watermarks and save these files separately? basically what i need is instead of running many individual actions i run a single action/script to make it automatic. if yes, how to do so?

    Hi Monte,
    You can achieve this by assigning a secondary extension to another button, but this might not be what you want, so if you can elaborate a little further as to what you want exactly I can help you with putting together a solution
    Cheers,
    David Trad.
    **When you rate a persons post, you are indicating a thank you or that it helped, but at the same time you are also helping to maintain the community spirit - You don't have to rate posts and you wont be looked down upon :) **

  • How to handle multiple actions in the webservice ?

    Hi Guys,
    I have multiple operations in the webservcie and under soap action in the receiver soap adapter, i dont know how to handle multiple soap operations.
    can anybody guide me, how to acheive this ?
    Thanks,
    srini

    Hi Srini !
    This weblog shows the general design of a scenario with BPM
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
    This link:
    http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
    show how to insert a predefined BPM pattern. You could use one of the BpmPatternSerialize.... patterns to see how you BPM should look like...
    Basically it should be:
    1) Receive Step (async/sync, as you need) to trigger the BPM
    2) Send step (sync) for first webservice
    3) Send step (sync) for second webservice
    N) Send step (sync) for N webservice
    N+1) if the whole communication is sync, here you need to use a send step to return back the answer to sender.
    Regards,
    Matias.

  • Setting up multiple actions in PS CS5.5 Mac

    I cannot remember how to do this correctly, heres the steps. I know how to assign actions to one photo but how do I assign the same action to multiple photos as I can only get the actions to work on one opened photo at a time. I tried opening 2 or three photos in the same folder, hitting play and the acation is done for ONE photo only.
    any help?

    Basically it involves the batch command.  Here is a link on how to do it.  http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CFMQFjAC&url=http%3A%2 F%2Fwww.michaelfurtman.com%2Fphotoshop_batch.htm&ei=5ScHT5mEMcawiQLVxv2kCQ&usg=AFQjCNE0PCc UTvBGMdnTO4t1KX0hdCV-Ew

  • How to have multiple images on the same screen? like in the movies where you see several actions at

    how to have multiple images on the same screen? like in the movies where you see several actions at the same time ....
    i don't find  a tutorial in adobe tv....
    thanks !!

    The short answer is that you'll put the source clip(s) for each inset on a different video track, all stacked up. Then use the Scale and Position effects (under "Motion" on the Effect Controls panel) to reduce their size and place them where you want.
    If the content of an inset will involve edited content (where you're cutting among various clips or just trimming out unwanted content from a single clip), then you'll probably find it easier to do all those edits in one sequence, then nest that sequence in the master sequence, where you apply the Scale and Positioning effects. That will save the step of applying the scale and position effects to each edited track item.

  • In Settings Contacts My Info - I tapped on a name in the contact list in error. I wanted to undo that action to have no name there, but all I am able to do is change the contact name. How do I delete the name and return

    In Settings>Mail, Contacts, Calendars>Contacts - I tapped on My Info and mistakenly tapped on a name in my contacts list. I did not wish to make any changes, but cannot undo this action. All I can do, apparently, is change to a different name. How do I undo this action? Thanks.

    In Settings>Mail, Contacts, Calendars>Contacts - I tapped on My Info and mistakenly tapped on a name in my contacts list. I did not wish to make any changes, but cannot undo this action. All I can do, apparently, is change to a different name. How do I undo this action? Thanks.

  • How can I include in my VI actions like "Undo last action/redo last action"?

    I built a Vi and I want to include functions like Undo (last action) and Redo (last action).
    Any suggestion wellcome.
    Thank you

    Hi
    If you have the Menu Bar visible when your VI runs - this Forms your Default VI run-time Menu. You will discover a built in Undo and Redo Functions under "Edit" Menu. This fuction can be added to your custom Menus or .rtm files.
    However, this undo fuctionality is limited to data change only, which means it will erase the last control change. This Undo will not reverse any data propagated as a result of your last control change. Here is an example.
    Say you are taking a continuously polled value of a String control and building a Path using this, and you have a Button that says "Process Path" which ends the polling and brings you out of the While Loop. In this example if you change the value of String Control and Say Undo you will be reverted to Previo
    us Value. However If after changing the Value you Clicked the "Process Path" Button, you will be Out of your While Loop with the Path being built with the Last value of String Control before "ProcessPath" was clicked. Now Clicking Undo tries to Reverse the Last Control Which was "Process Path" This has no effect on Path Value. The Undo Function will not reverse the Data which has Propagated and take you backwards in the diagram. It will simply reverse the Data Changed on the last Control.
    Therefore if you want a robust "Undo" and "Redo" you will have to program this functionality, Basically you will have to trap values of all controls and on data change remember these values. On Undo you can then Change the values of Controls back to Previous Value and Also take your Diagram back to Where the Last action had impacted any data propagation.
    All this - mind you - is for a single level undo. It will get complex to do Multiple Level Undo.
    Good Luck! Dont you wish, you could Just
    Undo the Computer Age?!!
    Mache
    Good Luck!
    Mache

  • How do I undo an action in iMovie 11

    I have made a movie and tried to add some background music to it, now I cannot play back the movie at all. I get a message saying 'source clip is missing' ? I've spent hours on this and cannot figure out how to get it back. I can see all the clips in the project box but it just won't play. Please help.

    To undo an action is usually COMMAND+Z
    If the format has changed you mat want to check File in the menu bar, and check Project Properties (COMMAND+J)

  • ITunes organized my library under one artiest.  My library on my PC is correctly listed.  How do I undo this action?

    iTunes organized my library under one artiest.  Now all my music is gone (actually not listed as seperate albums and artiests).  My library on my PC is correctly listed.  How do I undo this action?

    in iTunes, access your purchase history via your account in the iTunes store,   find the file in question, and click on the report a problem button. report the problem. more info in this support article. 
    clicking here  should take you directly to your iTunes store log-in window.

  • AIS CC: how undoing the actions of a JS run via app.doScript

    Hello,
    AIS CC (9.0)
    I wrote a JavaScript, which I can properly run through app.doScript(UndoModes.fastEntireScript, etc.).
    Now, at a given time, I would like to programmatically undo the actions of my own script.
    The various resources I have got here (InDesign_ScriptingGuide_JS (CS6), InDesign_ScriptingTutorial, the ExtendScript Toolkit Object Model browser) suggest things (app.undo(), app.documents.item(0).undo(), etc.) which fail, when executed on my AIS CC.
    Any idea or tip, on how to undo actions submitted via doScript on AIS CC?
    Thanks in advance!
    Kind regards,
    GB
    Snippet:
    var main = function()
         // something
    app.doScript(
         main,
         ScriptLanguage.javascript,
         undefined,
         UndoModes.fastEntireScript
         ); // << this works perfectly: the actions in the "main" function are executed
    app.undo(); // << this will fail with "app.undo is not a function"

    Thanks for your fast reply.
    you're undoing the entire script, which is probably not what you want.
    Undoing everything embedded in my "main" function is really what I want to achieve.
    Whether it's a bunch of complex code, or nothing at all (as in my snippet, where "main" contains only a comment line ), it's what I want.
    the recommendation is to us entireScript
    I changed my "UndoModes.fastEntireScript" into "UndoModes.entireScript", as you suggested; with no avail so far: I still get the same "is not a function" error.
    Actually, I have the feeling that I do not understand/master the InDesign DOM here, and am simply trying to make a call to a method (undo) which does not exist in this class (app) - despite the Adobe Reference Manual says it does...
    It sounds an inefficient way to write a script
    My script makes some changes in an InDesign document ("main" function), then exports it to PDF (out of the "main" function).
    Then, the environment I work with (XMPie) will inject variable information in the InDesign document for the next recipient.
    At this time, I need the document to be reset to its original design.
    That's why I need to undo all the changes applied by the "main" function.

  • How to call multiple strus actions froma single jsp

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

  • I accidentally copied the contents of my iPhoto to my desktop (6,000  photos). How do I undo this action?

    I accidentally copied the contents of my iPhoto to my desktop (6,000+ photos). How do I undo this action?

    Open a finder window, go to 'Macintosh HD/Users/<user folder>/Desktop'.  You can delete all the items from there.  If you had other stuff on your desktop you need to keep, then you could either sort the files by type, or copy the contents of the folder to another location, delete the desktop folder contents, then move back into it what you want to save.

  • [AS][CS5] Multiple action folder scripts only 1 Indesign app

    Hi,
    With this post, I would like to ask a question.
    If you use multiple action folder scripts that processes multiple files using only 1 Indesign application, can problems occure when multiple files are submitted at the same time?
    How does applescript/indesign handles multiple use of the same application? Will an error be trown? Or do I have to build a check mechanisme to know if the app is "in use"?
    Has the Indesign application a property "busy" or "In use"?
    Kind regards
    John

    Hi Mark,
    Thanks for your feedback.
    If build a lock/unlock mechanisme in my folder action script to prevent simultaneous use of Indesign. In my script I write the current application state into a textfile.
    John

  • How to share one action to multiple UUT test?

    Hi,
    In fact, I don't know how to define the topic exactly.
    My request is like the following :
    For example, I have a signal generator and four UUTs.
    Signal Pattern 1 ON -> batch(4 UUT test...) -> Signal Pattern 1 OFF, Signal Pattern 2 ON -> Batch(4 UUT test...) ...so on...
    I got stuck how to put the action into the teststand and do once instead of 4 times.
    Something similar to the callback of  ProcessSetup, PreBatch, and PreUUTLoop,
    but I wonder if there is a way to call an action once within multiple UUTs in the MainSequence.
    Could someone give me some suggestion? Thanks a lot!
    Solved!
    Go to Solution.

    Hey William,
    You're probably going to want to use the "One Thread Only" option of a batch synchronization section to do this. It sounds like you're already using the Batch process model, so this should be fairly easy to implement. If it's a single step, you can go to the Synchronization tab of the step settings and change the Batch Synchronization setting. If it's multiple steps in a row, you could use the Enter Synchronized Section and Exit Synchronized Section modes of the Batch Synchronization step type.
    Also, we have an example that demonstrates this functionality. You can find it at <TestStand>\Examples\MultiUUT\BatchUUT.seq. If you look at the Set Chamber Temperature step, you will see that it is configured in this way.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • How to check which action is completed in a Process having Multiple Actions

    Hi,
         In a GP that we designed, a Process contains multiple actions, so what we want to achieve is after 1st Action is completed i.e once 1st Approver approves the request, next action is executed wherein a Notification Workitem in his/her UWL is sent to initiator to notify the approvers action whether it rejected or approved.
         My question is when a Initiator starts a process, then he/she is not able to start the same process again, unless & until the process is finished, but now the requirement is, if 1st Level Approver i.e 1st Action, is completed, we need to allow the Initiator to start a new process of same name in-spite of 2nd Action & previously started process is not completed.
         Please let me know if I can find whether in a Process a particular Action is completed or not.
      Thanks.
    Regards
    Tushar

    Hi,
         Any possible inputs for my query......
        do let me know for your suggestions.
    Thanks
    Best Regards
    Tushar.S

Maybe you are looking for

  • Satellite M45-S165 New Battery won't charge past 25%

    Hello, This is a Satellite M45-S165 running Windows XP SP2. I just put in a new battery from Technuity sold at Circuit City. Followed the instructions and let it charge for 10 hours before using it. The laptop was turned off while charging. Turned on

  • Daily Sales Total Comparison Query

    Hi Experts, I'm trying to make a query to get daily sales total for week and wish to make a graph. However, if there is no figures in credit note or Down payment invoice or invoice then query seems not showing any figures for particular date. I would

  • Copying Text Between Illustrator Files

    Hello, I am creating a new document layout in Illustrator CC based on content from an existing document.  I need to paste text from the original document into the new document and reformat it into the style of the new doc.  Is there a way that I can

  • The Firefox homepages won't appear on my screen

    I can see Firefox in the top left hand side of my Apple Mac but I cannot view my Firefox homepage or access any wesbites

  • Display thumbnails

    is there any way to get around the system of iPhoto displaying a date in the finder rather than a thumbnail. while I understand the i Photo filing system, I would rather see thumbnails than a year, then month, then day to find a photo. Invariably I n