Committing changes within a script

I've noticed that changes made in a script all go into a single action if the user chooses to manually 'undo' the last change.
Also, an event like setting document.selection to null doesn't clear out the selected flags for all selected objects until after the current script ends.
So, if a group is selected and document.selection is set to null then selection.length will be zero but every pageItem in the group will still have selected = true. If I select the same group item again using the script the selected.length won't be 1, it'll be the total number of objects in the selected group. If I start the script with no selection then the selected.length will be 1.
Is there any method to "commit" changes mid-script or do I have to execute commands I want committed as individual actions as separate scripts or separate doJavaScript actions?
Thanks!

I too have noticed with scripts that a single comm+z to undo will undo the whole script. I have not tested with any of you other cases but if you have the app redraw then this undo's OK.
#target illustrator
var docRef = app.activeDocument;
with (docRef) {
     pathItems[0].fillColor = swatches.getByName('CMYK Green').color;
     redraw();
     pathItems[0].fillColor = swatches.getByName('CMYK Cyan').color;
     redraw();
     pathItems[0].fillColor = swatches.getByName('C=15 M=100 Y=90 K=10').color;
     redraw();
You will need those named swatches available to test…

Similar Messages

  • SimpleText voice changes within the script, is this possible?

    I have just wet myself laughing at the "voice" reading my written text in SimpleText - Bruce and Fred etc. Now would like to have two different voices reading my text as if there were actors. Is it possible to change the voices with the text?
    example:
    [Fred voice] hello I'm the fred voice
    [Bruce] and I'm the sound fo bruce
    [Fred] yes and now back to me
    I'm running and old PPC 4400 and OS9
    I would imagine it is, either by using a particular app or by adding some script. Any suggestions?

    Thanks for the details.
    I debugged the process and can see this line is providing the text on the tab. However, the method is making a low-level call to get the details from some message class/table, but I can't identify what this message class/table is.
    But it looks like it's the sotr_edit transaction, as you mentioned, that controls this. I'm not that familiar with this OTR process though and the transaction is not that intuitive. I assume that I just need to somehow add new entry, with my own Z package.
    Many thanks for the advice though, I knew nothing about that transaction. I also have to create another Online factsheet as well, and it looks like I can control it this way as well.
    I had already modified table CRMV_PRN_CONTROL via sm30 and had changed the values for the Fom name and class/interface from CRM_ACC_ACCOUNT_OVERVIEW_PRN to ZCRM_ACC_ACCOUNT_OVERVIEW_PRN for the form name and from CL_UIU_PRN_ACCOUNT to ZCL_UIU_PRN_ACCOUNT for the class/interface against all the roles.
    However, I know want to add another form name and class/interface as I have TWO user PDF Factsheets to use, depending on which item the user chooses from the Tab.
    Any idea how I can control this?.
    Best regards
    Jason

  • [svn] 978: More changes to Ant scripts.

    Revision: 978<br />Author:   [email protected]<br />Date:     2008-03-27 17:54:17 -0700 (Thu, 27 Mar 2008)<br /><br />Log Message:<br />-----------<br />More changes to Ant scripts.<br /><br />1. They now use the <mxmlc> task (rather than <java>) to compile SWFs such as checkinapp.swf.<br /><br />2. I added comments to explain why the <taskdef> that loads <compc> and <mxmlc> from flexTasks.jar needs to be inside the <target> rather than simply in the <project>. (The reason is that our build process builds flexTasks.jar, so we can't load it until after certain targets have executed.)<br /><br />3. All build.xml files within the 'frameworks' directory are now consistent about the following:<br /><br />a. They define FLEX_HOME.<br />b. They load FLEX_HOME's build.properties file.<br />c. They refer to all files and directories as either ${basedir}/foo/bar (for things inside the subdirectory where the script lives) or ${FLEX_HOME}/foo/bar (for things outside that subdirectory).<br /><br />Modified Paths:<br />--------------<br />    flex/sdk/trunk/build.properties<br />    flex/sdk/trunk/build.xml<br />    flex/sdk/trunk/frameworks/build.xml<br />    flex/sdk/trunk/frameworks/projects/airframework/build.xml<br />    flex/sdk/trunk/frameworks/projects/flash-integration/build.xml<br />    flex/sdk/trunk/frameworks/projects/flex/build.xml<br />    flex/sdk/trunk/frameworks/projects/framework/build.xml<br />    flex/sdk/trunk/frameworks/projects/haloclassic/build.xml<br />    flex/sdk/trunk/frameworks/projects/rpc/build.xml<br />    flex/sdk/trunk/frameworks/projects/utilities/build.xml<br />    flex/sdk/trunk/frameworks/tests/checkinapp/build.xml

    I just found the AppleScript documentation in /Applications/Adobe Photoshop CS5/Scripting/Documents/. But I don't think it's even accurate. Here's a very simple sample they give:
    tell application "Adobe Photoshop CS5"
         filter current layer of the current document using lens blur with options {class:lens blur, radius:13}
    end tell
    If I enter this in AppleScript Editor and try to compile it, it selects the word "current" and tells me "Expected end of line but found identifier." It doesn't even recognize "filter" as a command. If I just change that 5 to a 4, it works fine in CS4.
    Here's one way to run a JavaScript file from AppleScript:
    tell application "Adobe Photoshop CS5" to open file "Path:to:file.jsx"
    Of course there's no way to pass any arguments this way, so that greatly limits its usefulness. But perhaps this will be helpful to some people. I'm assuming the JavaScript stuff all works fine, as that seems to be their focus these days.
    The really strange thing is that certain things seem to work fine in AppleScripts that are already compiled (using CS4). But if I try to re-save those scripts with CS5 installed, I get errors.

  • How can i check for posted but not yet commited changes in a form

    Dears
    I make changes programmatically in a form then i post it using (Post built in).
    If the user exits the form, i make check for any changes in the form to commit it using the system variable :system.form_status
    Unfortunately the value of this system variable is 'Query' not 'Changed' because of using the post built in.
    Is ther another system variable ( or any another way ) that check for posted but not yet commited changes in the form ?
    Thanks a lot
    Mostafa Abolaynain

    I had faced similar situation. Using of package variable which identifies, what is the user's latest action.
    This is just a workaround.
    Capture what the user has performed into a variable say, PKG_VAR.ACTION,
    This will be assigned values like List L, and Create C, Update U and Saved S.
    If commit is executed,assing the status S to the variable.
    So while closing,
    IF :system.form_status = 'CHANGED' or PKG_VAR.ACTION in ('C','U') THEN     
    -- validate the data, n perform commit.
    else
    -- just close the form.
    end if;
    Regards
    Deepz : )

  • How to change maintenance powershell script via GPO?

    Per suggestion reposted from here: http://social.technet.microsoft.com/Forums/windowsserver/en-US/6eece9d6-a524-48aa-8e64-7554f0ec9b31/how-to-change-maintenance-powershell-script-via-gpo?forum=winserverGP
    Posted at http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/desktop-shortcuts-to-items-on-network-drives/94eddb27-342b-40fc-9ad4-677ff4ee8ebe?page=9&tm=1403700614489 originally.
    There is a very annoying "feature" in Windows 7 called BrokenShortcuts.ps1 which is being called out weekly via maintenance task and if it finds more than 4 "broken" network shortcuts it removes them all. So it means if a user at this
    moment is disconnected from the network he will lose all links to shares, network applications sitting on his desktop. Funny that there was no such script on Vista and i don't see this on Win8. On the post i have attached one user suggested to edit this script
    and change 4 to 500 or whatever high number. That's fine for one time fix. But i need to do this for 200+ users. This file cannot be simply replaced by a script, so i'm wondering is there any way to do it via GPO?
    I have already tried various startup scripts, but i'm not sure which user to put into commands.
    I need to run this on startup:
    takeown /F C:\Windows\diagnostics\scheduled\Maintenance\TS_BrokenShortcuts.ps1
    icacls c:\windows\diagnostics\scheduled\maintenance\TS_BrokenShortcuts.ps1 /grant "some user":F
    copy \\share\folder$\TS_BrokenShortcuts.ps1 C:\Windows\diagnostics\scheduled\Maintenance\ /Y

    You need to take time to study how Windows does these things.  You can control them with GP which is what you asked.  The article shows you how to disable elements of the tasks.  Each task controls a script.  If you disable the task the
    script that deletes shortcuts will be stopped. Other maintenance tasks will continue to run.
    Most of your problem is that you seem to want someone to provide a magical solution.  In technology it is necessary to fully research your issues until you understand all aspects.  After fully studying the issue you should understand the possible
    solutions if they exist.
    You claim to have deployed the patch that Microsoft released to fix the issue.  You claim it didn't work.  If that is the case then you need to call MS and \p[en a support incident.  If  Microsoft determines that you are right about the
    patch not working you will not be charged for the call.
    I know that learning how to support technology is hard and frustrating for newcomers.  In time, by using these incidents to learn, you will become a seasoned technician and all of this will seem trivial.  Until then we can only suggest that you
    do things that most of us are familiar with.  We cannot fix your network for you.
    I think you haven't really posted in the GP forum but posted a question about GP in the server forum.  Try posting in the GP forum.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
    Here is one answer from the GP forum:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/600ca14f-8b1b-400c-b27f-a7f5733407ac/windows-scheduled-maintenance-task?forum=winserverGP
    ¯\_(ツ)_/¯

  • How to listen for cell selection changes within a JTable

    Problem: my table has 8 columns, with 4 of them containing very large text (up to 1000 chars). Solution is to set the initial size these columns so that the 1st 20 chars are visible, and if one of these columns gains focus/selection via mouse-clicking/tabbing/arrow keys, the entire text is shown in a JTextArea below the table.
    I added a ListSelectionListener to the table, but this only informs me when the row selection has changed.
    I added a FocusListener to the table, but this only informs me when the table gains/loses focus, not when it's been changed within.
    I added a TableColumnModelListener to the TableColumnModel, but this only informs me when the column selection has changed.
    I didn't bother with MouseListener as this won't handle change of selection via tabbing.
    The LSL got me half way there, and the TCML got me the other half. Any ideas on how to combine?
    Or is there something obvious that I'm missing?

    Walter Laan wrote:
    Use both and call the same method which updates the text area based on the current selected (or focused == lead selection index) cell.Yeah - that's what I figured. I just didn't know if there was a magic bullet (i.e., a single listener) out there that I was missing.
    While you are at it, also add a table model listener which calls the same method if the selected cell is updated.I'll keep that in mind, but it's not necessary in this particular case. The table cells in question will be uneditable. The text area will have supporting Edit/Save/Cancel buttons.

  • Editing timelapses in Lightroom- looks very different if there´s a small change within the frame

    Hi
    We´re having some serious issues with editing timelapses in Lightroom (5.6). What seems to happen over and over again, is that if there´s a small change within the frame (such as a bird flying past, people walking), the editing result varies greatly compared to the previoius frame. It´s easiest to understand what I mean by viewing the examples below.
    Here there´s one picture without a boat in the frame, and a few seconds later there´s a boat in a small part of the frame. The camera is set to full manual, and the two JPGs which show the unedited pictures shows that the background and sky in both pictures look exactly the same. However, after pasting the same editing setting on both pictures, the picture with the boat looks vastly different (shadow areas are much darker). It´s the same result weather it is a white boat, a black bird or a person walking in/out of the frame. The picture gets much darker, and leads to some serious flicker in the timelapse which can be impossible to get rid of.
    I assume that as there´s a small change in the histogram when the boat enters the frame, this change affects what Lightroom thinks of as shadows/highlights on so on? The example below has some heavy editing applied (shadows up, highlights down, clarity). You can see the settings that have been adjusted in the screenshots below. Does LR change what it considers shadows/highlights based on the histogram, or are there standard settings? If this is the case, it would be much better for timelapsers if Lightroom had standard values for what is considered shadows/highlights, so that two pictures where the only difference is a person walking on the street or not, would look the same with the same editing settings applied. What I find strange if LR works like I´m asking here, why does the picture get darker whether it is a white boat or a black bird changing the histogram slightly. Shouldn´t they then have the opposite effect of each other?
    Any ideas what is causing the difference, and what I can do about it? Thanks!

    In these forums you are only talking to other users like yourself, not Apple. Be sure to repost your info in the channel Apple has set up for it:
    http://www.apple.com/feedback/imovie_iOS.html

  • An error prevents the Change Management Upgrade script from executing

    I have Warehouse Builder 10g on a database 10g R1.
    On a server linux I have the repository, and on other server (Sun 5.9) I have runtimes for production.
    I want execute an upgrade deploy action on one object but I get this error:
    An error prevents the Change Management Upgrade script from executing successfully. We strongly advise that this Upgrade is UNDONE and the problem is investigated. Data loss may occur if you accept this Upgrade
    Any idea?
    Thanks,
    Fernando.

    I review the installation, it was made with a diferent user that database, I get same permission, restart runtimes service and problem was resolved.
    Fernando.

  • When will the commited Changes progate to Datafiles ?

    Hi Experts,
    I have gone through the bellow link .
    In other words, you are absolutely correct to say that the data is already
    in the data files. But DBWR flushes regardless of whether something is committed
    or not. Therefore the data files during normal operation of the datafiles will contain
    BOTH committed and uncommitted data. It's the redo stream that allows us to work
    out which is which. So you still end up needing the redo logs to make sense of what's in the datafiles Source : Re: Commit/Rollback and Redo Log files.... HJR sir's post.
    So we have all the committed changes only in Redo logs and data files contains both committed and un-committed data (Because of DBWR flushes all modified data in buffer cache during checkpoint (regard less of commit) .
    When we did the clean instance shut down : either everything is committed (all committed data in redo applied to data files and redo logs are no more required to do the instance recovery . ITS IN CASE OF CLEAN SHUTDOWN.
    But if the shutdown did not happen  how the changes in redo log files propagated to data files. What are the responsible back ground processes and what are the steps in this case ?
    Waiting for your replies
    Thanks in Advance.
    Vijay
    Edited by: Vijay.Cherukuri on Jul 3, 2012 8:56 PM
    Edited by: Vijay.Cherukuri on Jul 3, 2012 9:05 PM

    No - there is no parameter that controls how
    often you shutdown and restart your database.You mean to say instance recovery happens instance crash only.? ( this is my assumption in this case)
    My question is how the changes in redo propagated to data files (assume instance never brought down in last 1 month) ?
    And Single node instance. I think in this case bellow points are applicable
    Oracle Database performs this recovery automatically on two occasions:
    At the first database open after the failure of a single-instance
    database or all instances of an Oracle RAC database (crash recovery).
    When some but not all instances of an Oracle RAC configuration fail (instance recovery).
    The recovery is performed automatically by a surviving instance in the configuration.Please correct me If i did any false statements ?
    -thanks
    Vijay

  • Could not save changes to this script because of a program error. -2706

    OK, this is very odd! Please try the following and let me know your results:
    1) Create a new script with the following example code:
    set testList to {}
    repeat with i from 1 to 8145
    copy i to end of testList
    end repeat
    2) Save the script as an Application (name it whatever you like).
    3) Launch the newly created Application and see if you get the same error message I am getting...
        *Could not save changes to this script because of a program error.*
        -2706
    If you replace the number 8145 with 8144 (or any number less than 8145) the script runs without error. Any number greater than 8144 returns the error message shown above. Maybe there's a reason for this that I'm overlooking or is this another bug?
    I looked up error code -2706 ([HERE|http://developer.apple.com/Mac/library/documentation/AppleScript/Concept ual/AppleScriptLangGuide/reference/ASLRerrorcodes.html]) which says it is a "*Stack overflow.*"
    Thanx in advance for any insight on this!!
    NOTE:
    The only workaround I've found for this is to make sure the script resets the variable before it quits. Like this:
    set testList to {}
    repeat with i from 1 to 8145
    copy i to end of testList
    end repeat
    set testList to ""

    Hey Pierre, thanx for taking the time to scratch your head with me!
    Very odd indeed.
    Glad it's not just me that thinks this!
    I've also noticed that the problem occurs even when you try to save the script as a compiled script. That's possible as long as you haven't run the script. Once you have run it, trying to save it seems impossible. You get the message: *“The document “Document title” could not be saved.”*
    I've noticed the same thing as you and have experienced this extra error several times while trouble shooting this problem!
    On the other hand, is there any good reason for which you would want to save such a big list? Are there any drawbacks to the workaround you've found?
    I don't want to save ANY variable EVER unless I explicitly tell my script to do so! This variable is not a property, so why would my script want to save it? I haven't noticed any drawbacks to the workaround. Setting the list variable to "" or {} (or ANYthing with under 8145 items) seems to work fine. I just find it weird that my script can't "*save changes to itself*"?! What is there to save? It's just a variable that should release after my script has run ...unless I'm completely misunderstanding how variables work after ALL these years of scripting.
    Btw, the following version of the script (as you probably already know) is much faster, although it doesn't change anything to the result:
    *set testList to {}*
    *set testListRef to a reference to testList*
    *repeat with i from 1 to 8144*
    *copy i to end of testListRef*
    *end repeat*
    Yeah, it definitely runs much faster this way! I just posted a quick example that would illustrate the 8144 list count limit. My script sets a variable to a list of numbers contained in a text file. This list is almost always rather large! Right now there are over 20,000 items in this list of numbers.
    Again, thanx for your time my friend!!

  • Change the SAP Script Package

    Hi,
    How to change the SAP Script Package..when i use option copy from client option, it ask for a package but after copied it shows in the $TMP package...
    how can i change it.
    Regards,

    Hi,
    Goto SE80 --> select LOCAL OBJECTS from the drop down and hit enter.
    You will be displayed a list of all local objects.
    Locate your SAP SCRIPT --> right click on this script name --> click More Functions --> click Change Package Assignment and you will be prompted for a package name.
    Give new package name and click done.
    Your script is now assigned into the specified package.
    Regards,
    Tarun

  • Tell which Script (or Action) you are running from within that script

    Is there a way within a script to tell the name of the javascript file you are running?
    For example, if I'm running "My Actions/clipOut.jsx" can I set a variable to return "My Actions/clipOut.jsx"?
    (or if I'm running action "Clip Out" of Action Set "My Actions", is there a way to return that info in a script?)
    thanks!!

    dgoldberg
    I'm sorry I wasn't clear in my question:
    As I work on a javascript file I keep my test version on my local machine and push out a final version to a server when my updates are complete.  Then other people access the version on the server to run their actions.  The problem is that I'd like my action to behave differently depending on whether it's the test version or the server version.  If I could get the name/path of the script I'm running (while running the script), I could build out different behaviors whether the version of the script was local or on the server.
    For example, my actions work in unison with many other actions.  It would be nice if my local actions only access other local actions, and server actions only accessed other server actions.
    Does that make sense?

  • Can we change the test scripts in TCK (JavaCard tests for compatibility)

    Hi everyone,
    I would appreciate if anyone can tell me if we can change the test scripts when testing JavaCards using TCK. Lets say we want to introduce few more APDU's to the test script which already is present in a precompiled format. Can we somehow add to the script and then compile it again.
    Any help would be highly appreciated.
    Thanks,
    AQ

    Read the JC-TCK documentation:
    JC2 Some Conformance Tests may have properties that may be changed.Properties that
    can be changed are identified in the TCK configuration interview. Apart from
    changing such properties and other allowed modifications described in this User’s
    Guide (if any), no source or binary code for a Conformance Test may be altered in
    any way without prior written permission. Any such allowed alterations to the
    Conformance Tests would be posted to the Java Licensee Engineering web site and
    apply to all licensees.

  • Securely deploying and using credentials within a script (not running the script under the credentials)

    Here is my scenario - I have SCOM 2007 R2 and on certain agents I want to execute a script. One of the actions of that script is to access a secured web page using a username and password via integrated authentication (IE pop-up for auth).
    The username and password that I need to use are unrelated to the Windows domain that the servers run in, meaning you can think of the website as if it were a public site (it isn't, but it has no security sharing with the domain where the agents run - no trust,
    no nothing).
    I can easily accomplish this by hard-coding the username and password within the script (powershell), however, I don't want to do this for security reasons. Here's a rough example of the relevant code:
    $targetURL = "https://somehost.somewhere.something/filename.zip"
    $path = "c:\downloads\filname.zip"
    $wclient = New-Object System.Net.WebClient
    $wclient.Credentials = New-Object System.Net.Networkcredential($uname, $pword)
    $wclient.DownloadFile( $url, $path )
    What I want is a way to pass the $uname and $pword variables to this script securely, with the script running on a schedule under SCOM. The SCOM agents run as localsystem and need to remain that way.
    I currently use Run-As accounts and profiles for other functions where the entire script runs under the run-as profile, but I can't figure out how to extract the username and passwords, and doubt it's even possible.
    To be clear, I cannot run the script under the given credentials as a Run-As account as those credentials are not known to the local server. I need to somehow pass the credentials to the script (other than hardcoding) or extract them from the run-as accounts.
    I've looked at the get-runasaccount cmdlet and can see some of the info there, but don't see a way to re-use, pass-through, or extract the password for use in my scenario.
    Any guidance? Can I get there from here?

    Hi, check this
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ebfc706d-93be-4ca0-83e0-33d9e072fb97/powershell-script-monitor-with-encrypted-password?forum=operationsmanagerauthoring
    But you should not specify runas account for your workflow, just reference Runas Username and Password from Profile and use simple authentication. (The same way as in article above)
    So in the end your script will be executed by default action account but you'll pass username and password securely to your script.

  • HR ABAP Report: Display employee details changes within a time period!!

    Dear Friends,
    I need urgent help with the below HR-ABAP report.
    Thanks in Advance!
    Joy
    I have to create a report which would display in ALV
    A table containing details of all changes to fields specified iby the user within the selected period
    Details :: ~
    When executing the report, the user will be given the opportunity to select which fields will be displayed in the output of the employee changes table. They will also be given the choice to display the previous value for each field and the date the change becomes effective.
    Please Help !!!

    First of all ensure that the fields that you need to audit have been configured.
    refer to the  documentation of report RPUAUD00.
    You will need to create a report that extracts data fromPCL4.
    If your audit data has been configure as Lond documents then look at using FM HR_INFOTYPE_LOG_GET_LIST  &
    HR_INFOTYPE_LOG_GET_DETAIL
    If not you will to extract the header info & then the BELEGE info - beware of the differnt operas inuse.
    J

Maybe you are looking for