Is it possible to start timeline playback from a script?

I'm looking for a way to incorporate the timeline's "play command" (space when using keyboard shortcuts) in my script.
If it is possible to do so I'm able to create a rudimentary flicking/flipping function to aid users in their animation process.
(The scriptListener plugin wont leave any traces btw)
Any help or advice is highly appreciated.
Thanks in advance.
Kind regards
Patrick Deen

It seems a work-around might be possible but I also do not know a direct approach for this.
http://ps-scripts.com/bb/viewtopic.php?f=9&t=5923&p=27909&hilit=timeline+play&sid=84762a21 ace9fee707c80cab4b119093#p27909

Similar Messages

  • Is it possible to start a recording from source code?

    Hi everybody!
    I'm currently using JProfiler in combination with JUnit tests to collect resource consumption metrics of features in our product.
    A homemade JUnit runner starts and stops the JProfiler recording and parses the recorded data. It then compares the recorded values to predefined limits and fails the test if they are exceeded.
    Now I want to change this to use the flight recorder instead. I found a nice article explaining how to parse .jfr files here: Using the Flight Recorder Parsers | Marcus Hirt
    Unfortunately I can't figure out how to start and stop a flight recording from a JUnit runner besides using the jcmd tool.
    Can anybody help me out?
    Thanks a lot
    Tobias

    Answering myself once more since other people might stumble upon the same problem.
    In the end I created a TestRule which I can add to the JUnit Test Class.
    The interesting parts of the code are:
    public class ProfilerTest implements TestRule {
        @Override
        public Statement apply(Statement base, Description description) {
            return new PerformanceLimitsStatement(base, description);
        class PerformanceLimitsStatement extends Statement {
            private PublicFlightRecorderRunner runner;
            private final Description description;
            private final Statement base;
            public PerformanceLimitsStatement(Statement baseParam, Description descriptionParam) {
                description = descriptionParam;
                base = baseParam;
            @Override
            public void evaluate() throws Throwable {
                runner = new FlightRecorderRunner(description.getTestClass());
              // start profiling
                runner.startupProfiling("jfr/"+description.getTestClass().getSimpleName()+"."+description.getMethodName()+".jfr", annotation.cpuRecording(), annotation.allocRecording(), annotation.methodStatsRecording(), annotation.monitorRecording(),
                        annotation.threadProfiling());
                // run a test method including its before and after methods inside a simple time measurement
                base.evaluate();
                // shutdown profiling
                final File performanceSnapshot = runner.shutdownProfiling(description);
    This uses a PublicFlightRecorderRunner - code:
    import java.io.File;
    import java.io.IOException;
    import java.lang.management.ManagementFactory;
    import java.nio.file.Files;
    import java.util.List;
    import javax.management.Attribute;
    import javax.management.MBeanServer;
    import javax.management.MalformedObjectNameException;
    import javax.management.NotCompliantMBeanException;
    import javax.management.ObjectName;
    import javax.management.openmbean.CompositeData;
    import javax.management.openmbean.CompositeDataSupport;
    import org.junit.internal.runners.statements.InvokeMethod;
    import org.junit.runner.Description;
    import org.junit.runners.BlockJUnit4ClassRunner;
    import org.junit.runners.model.FrameworkMethod;
    import org.junit.runners.model.InitializationError;
    import org.junit.runners.model.Statement;
    * <p>
    * (c) Copyright Vector Informatik GmbH. All Rights Reserved.
    * </p>
    * @since 1.0
    @SuppressWarnings({ "restriction"})
    public class PublicFlightRecorderRunner extends BlockJUnit4ClassRunner implements
            IProfilerRunner {
          private static MBeanServer ms = null;
          private File file;
          private static final String REGISTER_MBEANS_OPERATION = "registerMBeans"; //$NON-NLS-1$
          private static final String JFR_CREATE_RECORDING_OPERATION = "createRecording"; //$NON-NLS-1$
          private static final String START_RECORDING_OPERATION = "start"; //$NON-NLS-1$
          private static final String STOP_RECORDING_OPERATION = "stop"; //$NON-NLS-1$
          private static final String CLOSE_RECORDING_OPERATION = "close"; //$NON-NLS-1$
          private static final String SET_EVENT_ENABLED_OPERATION = "setEventEnabled"; //$NON-NLS-1$
          private static final String SET_STACKTRACE_ENABLED_OPERATION = "setStackTraceEnabled"; //$NON-NLS-1$
          private static final String SET_THRESHOLD_OPERATION = "setThreshold"; //$NON-NLS-1$
          private static final String SET_PERIOD_OPERATION = "setPeriod"; //$NON-NLS-1$
          private static final String MC_CLASS_NAME = "com.sun.management.MissionControl"; //$NON-NLS-1$
          private static final String MC_MBEAN_NAME = "com.sun.management:type=MissionControl"; //$NON-NLS-1$
          private static final ObjectName MC_OBJECT_NAME = createObjectName(MC_MBEAN_NAME);
          private static final String FRC_CLASS_NAME = "oracle.jrockit.jfr.FlightRecorder"; //$NON-NLS-1$
          private static final String FRC_MBEAN_NAME = "com.oracle.jrockit:type=FlightRecorder";
          private static final ObjectName FRC_OBJECT_NAME = createObjectName(FRC_MBEAN_NAME);
          private static ObjectName recordingObjectName;
          private static CompositeDataSupport recording;
          private static ObjectName createObjectName(String beanName) {
              try {
                  return new ObjectName(beanName);
              } catch (MalformedObjectNameException e) {
                  throw new Error("Should not be possible: Could not make a new ObjectName " + beanName); //$NON-NLS-1$
         * Constructor for FlightRecorderRunner.
         * @param klass
         * @throws InitializationError
        public PublicFlightRecorderRunner(final Class<?> klass)
                throws InitializationError {
            super(klass);
        @Override
        protected Statement methodInvoker(final FrameworkMethod method,
                final Object test) {
            return new InvokeMethod(method, test) {
                @Override
                public void evaluate() throws Throwable {
                    final String targetFile = "jfr/" + method.getClass().getSimpleName()
                            + "." + method.getMethod().getName() + ".jfr";
                    startupProfiling(targetFile);
                    for (int i = 0; i < 10; i++) {
                        super.evaluate();
                    shutdownProfiling(method, test);
        public void startupProfiling(final String targetFile) {
            file = new File(targetFile);
            try {
                createFlightRecordingClient(file.getName());
                startFlightRecording(file);
            } catch (Exception e) {
                e.printStackTrace();
        public File shutdownProfiling(final FrameworkMethod method,
                final Object test) {
            try {
                stopFlightRecording();
            } catch (Exception e) {
                e.printStackTrace();
            return file;
        public static void createFlightRecordingClient(
                final String recordingName) throws Exception  {
            // register Flight Recorder Bean
            ms = ManagementFactory.getPlatformMBeanServer();
            // Create MissonControl Bean
            if (!ms.isRegistered(MC_OBJECT_NAME)) {
                ms.createMBean(MC_CLASS_NAME, MC_OBJECT_NAME);
                ms.invoke(MC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0],    new String[0]);
            // Create FlightRecorder Bean
            try{
                if(!ms.isRegistered(FRC_OBJECT_NAME))
                    ms.createMBean(FRC_CLASS_NAME, FRC_OBJECT_NAME);
                    ms.invoke(FRC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0], new String[0]);
            catch (NotCompliantMBeanException e) {
                @SuppressWarnings("unused")
                boolean wedontcare = true;
            // create recording
            ms.invoke(FRC_OBJECT_NAME, JFR_CREATE_RECORDING_OPERATION, new Object[] {recordingName}, new String[] {String.class.getName()});
        public static void startFlightRecording(File file)
                throws Exception {
            // Check that only one recording exists and that it's not already running
            @SuppressWarnings("unchecked")
            List<CompositeDataSupport> recordings = (List<CompositeDataSupport>) ms.getAttribute(FRC_OBJECT_NAME, "Recordings");
            if(recordings.size() > 1) {
                throw new Error("More than one recording available");
            recording = recordings.get(0);
            if( (boolean) recording.get("running")) {
                throw new Error("Recording is already running");
            // store the recording name for later us
            recordingObjectName = (ObjectName) recording.get("objectName");
            // set duration for the recording
            final long duration = 10 * 60 * 1000; // 10 minutes in milliseconds - this number was determined by looking at the slowest test on jenkins
            final Attribute durationAttribute = new Attribute("Duration", duration);
            ms.setAttribute(recordingObjectName, durationAttribute);
            // set destination for the recording
            try {
                Files.createDirectories(file.getParentFile().toPath());
                final Attribute destinationAttribute = new Attribute("Destination", file.getAbsolutePath());
                ms.setAttribute(recordingObjectName, destinationAttribute);
            } catch (IOException e) {
                e.printStackTrace();
            // read event settings
            @SuppressWarnings("unchecked")
            List<CompositeDataSupport> eventSettings = (List<CompositeDataSupport>) ms.getAttribute(recordingObjectName, "EventSettings");
            final long period = 0;
            final long threshold = 100 * 1000 * 1000; // 100 ms - given in ns
            // enable all events, set threshold to 100ms and stacktrace to false (because we only parse this in code)
            for(CompositeData eventSetting: eventSettings) {
                final Integer eventid = (Integer) eventSetting.get("id");
                ms.invoke(recordingObjectName, SET_EVENT_ENABLED_OPERATION, new Object[] {eventid, true}, new String[] {int.class.getName(), boolean.class.getName()});
                ms.invoke(recordingObjectName, SET_STACKTRACE_ENABLED_OPERATION, new Object[] {eventid, false}, new String[] {int.class.getName(), boolean.class.getName()});
                ms.invoke(recordingObjectName, SET_PERIOD_OPERATION, new Object[] {eventid, period}, new String[] {int.class.getName(), long.class.getName()});
                ms.invoke(recordingObjectName, SET_THRESHOLD_OPERATION, new Object[] {eventid, threshold}, new String[] {int.class.getName(), long.class.getName()});
            // start the recording
            ms.invoke(recordingObjectName, START_RECORDING_OPERATION, new Object[0], new String[0]);
        public static void stopFlightRecording() throws Exception {
            // make sure the recording is stopped
            if ((boolean) ms.getAttribute(recordingObjectName, "Stopped")) {
                throw new Error("The FlightRecording has already stopped in current thread. Consider increasing the duration!");
            } else {
                ms.invoke(recordingObjectName, STOP_RECORDING_OPERATION, new Object[0], new String[0]);
            // close the recording to remove it from the flightrecorder
            ms.invoke(recordingObjectName, CLOSE_RECORDING_OPERATION, new Object[0], new String[0]);
    This creates a .jfr file which can be used later.
    I parse it in the TestRule to determine if the test violated memory or time limits, in which case the test is failed. (see the link in my first post for information about parsing .jfr files)
    The code may not be the prettiest but so far it's working well.
    Message was edited by: the_qa_guy
    Changed the code to use the JFR bean

  • Sony DSR-45A? Possible for NTSC Monitor Playback from Quicktime?

    Title says it all.
    We have a new Mac Pro with two 22" monitors using both of the graphic car DVI ports.
    However with have this beatiful 60 inch monitor next to us that we would like to hook it up to.
    The monitor has BNC Component connections, VGA connections, A/V Connections, and more.
    We have a Sony DSR-45A deck hook up to our computer via firewire.
    We hooked up the deck using the component BNC cables.
    I know in Final Cut Pro we can run footage back and forth from the deck to the computer and back into the monitor for playback.
    What I would like to know is if Quicktime could also read the DSR-45A and play stuff on the NTSC monitor or if there is any other program that can playback footage on the monitor through the DSR45A.
    Or am I out of luck and should just suck it up and get 2nd graphics card.
    Please note I just spent $20,000 If i can save $600 by getting around not buying a graphics card I would love to.
    Please not computer info on bottom is my home comp not my work.

    Title says it all.
    We have a new Mac Pro with two 22" monitors using both of the graphic car DVI ports.
    However with have this beatiful 60 inch monitor next to us that we would like to hook it up to.
    The monitor has BNC Component connections, VGA connections, A/V Connections, and more.
    We have a Sony DSR-45A deck hook up to our computer via firewire.
    We hooked up the deck using the component BNC cables.
    I know in Final Cut Pro we can run footage back and forth from the deck to the computer and back into the monitor for playback.
    What I would like to know is if Quicktime could also read the DSR-45A and play stuff on the NTSC monitor or if there is any other program that can playback footage on the monitor through the DSR45A.
    Or am I out of luck and should just suck it up and get 2nd graphics card.
    Please note I just spent $20,000 If i can save $600 by getting around not buying a graphics card I would love to.
    Please not computer info on bottom is my home comp not my work.

  • Late and variable playback from chapter markers

    With my guidance, my video editor inserted chapter markers in a DVD she is creating for me. When I play the DVD on my DVD player and start the playback from a chapter, it seems that the playback is always later than where we placed the markers. On a second DVD player the playback starting from chapter markers is even later, and when I play the DVD on my computer with Apple's DVD Player the playback from chapters starts at yet another place later than where we placed the markers. This confirms what I've heard that standard for DVD players with regard to start-up is not so stringent as it is with CDs. So how do I know where to place chapter markers? How late might the playback start? Are there any DVD players for which it would start early?
    null

    You will always get variation in performance in regards to markers on different dvd players. Unfortunately it's the nature of the beast. You need to test your disks on a variety of players and adjust markers till you're happy with them. Don't think you will ever see an "early" start, but anything's possible. There are a lot of very cheap dvd players out there and the implementation of the dvd standards is inconsistent at best.
    When I have room on a dvd, I will sometimes have two versions of my show, one meant to play from beginning to end and another which consists of individual tracks for each chapter for access from a menu. This is the only way I can really control this behavior.

  • Start Snow Leopard from USB on a mac mini early 2009

    Hi.
    It is possible to start Snow Leopard from a USB drive (Pendrive, USB disk, etc)??????
    The DVD drive of my mac mini doesn't work properly and I have some problems with my HDD.
    Thanks in advance.
    BR

    Get at least a 16GB USB thumb drive and use this tecnique to make a bootable USB drive:
    Borrowed from Kappy,
    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your external hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    7. After formatting is complete quit DU and return to the installer. Install Snow Leopard being sure to select the external drive as the target.
    Note that you will need a Snow Leopard DVD. The above will only work for you if you can boot your computer from a Snow Leopard DVD. If you have a new model that came with Lion pre-installed then the above will not work because a Snow Leopard retail DVD cannot boot your model.

  • Audio playback from within a state machine without halting execution

    I have created a state machine that acquires and analyzes an input signal and transitions states based on triggers detected within that signal.  In one particular state I need to play back a prerecorded file (right now I am just using a .wav file for testing purposes).  I understand that due to the data flow model the state machine hangs up during the playback state until the playback is finished, but I need to find someway around this.  Obviously, whenever the machine hangs up it cannot continue acquiring and analyzing the signal.  How can I start the playback from within the state machine without halting its execution?
    Solved!
    Go to Solution.

    Do you use the sound output VIs? If you do, try this. On the "Play Sound File VI" set the timeout value=0
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Video playback from PB17 to Sony TV firewire port ?

    I'm wondering if it's possible to get video playback from my PowerBook 17 to a Sony HDTV firewire port ? I can't see in prefs where you can do this. Is there some software that enables this? I tried to select firewire playback from Final Cut Pro even and that didn't work either. The TV recognises the Powerbook. I don't think it's possible but why not try?
    Powerbook G4 1.33GHz   Mac OS X (10.4.7)   2 GB RAM + I want Seagate Momentus 5400.3 160GB HD

    This is what abrody has to say on the subject.
    Yes, but only at 720 x 480 resolution. Some TVs offer higher resolutions and DVI ports where you can do a DVI to DVI connection. And actually there was a dongle which came with your Powerbook which supports S-Video via its S-Video port.
    Cheers Don

  • Start an iView from a WAD?

    Hello to you all,
    I have a question.
    Is it possible to start an IView from a WAD Application by pressing a button?
    Regards
    Jörg

    Hi Jörg,
    You can call a VIEW, pressing a button. However, this is not a standard SAP functionality.
    Well, you have to create a HTML code.
    I'm creating an example:
    Put this on your WAD code after
    Of course, on the parenthesis ( ), you have to remove and put the value required. Remove the parenthesis, as well.
    This will create a button on the top of your template.
    Click on this button and the VIEW selected on ACTION url will be called.
    This is the only way I know. I've tested on my system and works.
    I hope you find this information useful...
    Best Regards,
    Edward John

  • Starting notepad.exe from within Java app?

    Is it possible to start notepad.exe from within a java app to display a log file (for instance)?

    search the forum for Runtime.getRuntime()

  • Better external playback from Viewer than Timeline

    I notice that I get higher quality playback from the same clip played back to an external HD monitor from the Viewer than when it is placed on the Timeline. Playback is using AJA Lhi video card set properly. Media is optimized ProRes 422, Better Quality set, Both Fields checked. Video is softer from the timeline, and has jaggies on thin diagonal lines. Anyone else notice anything like this or have a possible solution?

    I notice that I get higher quality playback from the same clip played back to an external HD monitor from the Viewer than when it is placed on the Timeline. Playback is using AJA Lhi video card set properly. Media is optimized ProRes 422, Better Quality set, Both Fields checked. Video is softer from the timeline, and has jaggies on thin diagonal lines. Anyone else notice anything like this or have a possible solution?

  • TS4088 I have a MacBook pro that has power issues and will not start but the hardrive is fine.  I do not want to lose all of my files so I was wondering if it's possible to transfer my hardrive from a older Macbook pro to a new one if I were to purchase o

    I have a MacBook pro that has power issues and will not start but the hardrive is fine.  I do not want to lose all of my files so I was wondering if it's possible to transfer my hardrive from a older Macbook pro to a new one if I were to purchase a new one?  Also, the software is not updated as the computer hasn't worked for about 2 months. 
    Also, if it is possible to transfer the hardrive, would my iTunes music transfer as well?  It is not saved in the cloud.
    Thanks for your help, it is much appreciated.

    You computer is probably perfectly repairable, but if you want a new one anyway, it is perfectly possible to transfer the data from the faulty one.
    But it would be a mistake to simply put the old HD in the new computer.
    These are the steps:
    Remove Hard drive from faulty computer. (very easy on Unibody MBPs, do-able but not so easy on older MBPs)
    Put it in a cheap enclosure
    Connect it the new computer
    Boot up new computer.
    If the new computer has never been run before the Setup Assistant will ask if you want to import your apps, data, settings etc from either another mac, another HD connected to the Mac or a Time Machine back up.
    Obviously chose the second option (another HD connected to this Mac) and follow prompts.
    If the new computer has already been run (so Setup Assistant doesn't run when you boot it up), you will need to use Migration Assistant...or run the installer again so that Setup Assistant runs again.
    Message was edited by: Mike Boreham...added sec on line

  • Portege P3500: It's possible to start from USB-stick?

    Is it possible to start from usb-stick? i have tried to make a bootable usb-stick , and it really worked on my pc at home , but not on the laptop ..bios settings are ok , as far i know (usb-fdd legacy enable , first boot device fdd)
    where is the problem ?

    Try to update bios. Even though it has that option does not mean that it will. Make sure in BIOS that legacy emulation is enabled as well. Then connect your USB and turn on the computer. Go into bios and check to see if your USB keystick is located under boot devices, which it should be. Other then that, you might have installed the boot program wrong. CD's etc have a boot.ini file. Basically an ini means initiate. So boot.ini initiates boot process. If this is configured wrong, or doesnt exist on the boot device you are using, it will not boot from the device even if configured in BIOS.

  • Is it possible to start a web browser from with xterm (X11)?

    Hello,
    Would it be possible to start a web browser from xterm? I am able to use for example, dbca or netca. But I want to know if I could start a web brower in my xterm. Thank you.

    Thank you. Firefox was not found on this redhat linux, I am guessing it was not installed. I did a find / -name firefox but not finding it. I don't think the SA installed GUI on this box. Is there a browser I can use even though GUI was not installed? That is why I am attempting to use xterm hoping to be able to access a brower in xterm. I am using Xming for xterm. Is there something in Xming I can use so I can access the Oracle Database Control Console? I can use firefox from my desktop but the port is block at the firewall and the SA would not open the port due to security reasons. Thank you.

  • Is it possible to start intel mac in target mode from ppc mac ?

    Hello all,
    Is it possible to start intel mac in target mode from ppc mac ? If so does using target mode make ANY change at all to the target disk if user doesn't voluntariliy write stuff to target disk ?
    Thanks in advance !

    Yes, you can, but with some notes. Braby sent some data, I add some other.
    Target Mode has two basic roles:
    1. to turn a mac into an external drive and/or external optical drive (if it has one, until Air era, all had); you may use this way if your internal optical drive is damaged and you wish to use the optical unit of the other mac; or use it as a simple external disk for backup purposes or else.
    2. to boot from a such-booted mac.
    #1 is usable with any two macs disregarding whether they are both PPC, both intel, or combination PPC-intel, as the behavior is like any external disk drive or external optical drive.
    #2 is impossible if you want to boot the other mac, they must be both intel or PPC, as you cannot use an intel-based mac as a boot mac for the other ppc-mac, and vice-versa.
    So said and clarified, you may use, but not if you intend to boot the other one if you wish to use it for various purposes implying boot.

  • Is it possible to start a remote server from the IDE?

    I would want to know if it is possible to start a domain that makes reference to a remote server (from the IDE). On this way I could start and stop the server without loading so much the machine that I use to develop my portal applications. If it is possible how I can do it?

    There is no personal Information on a crash Report unless you put something personally identifiable in the comment field. For example, here is a crash report I had on my machine awhile back: https://crash-stats.mozilla.com/report/index/bp-1de8924f-7068-4702-a410-89c492121220.
    You can go to about:crashes in your address bar, and click on the report to view the info there to satisfy yourself that there is nothing in the report. But submitting crash reports is very useful because it gives us the ability to view what crashes are plaguing our users and what we need to fix.

Maybe you are looking for