Need help with first applescript@Quicktime- can't figure out a few lines...

Ok guys I need help, here is what I want to happen. I want the script to just shorten a movie file. It should be so simple!!
lengthofmovie = film length
set time range from 0 to (lengthofmovie-1)
save the movie as a new file
That is all I want done, I am ripping my hair out of my head trying to do this. Please help me!!
Here is my code so far:
with timeout of 86400 seconds
display dialog "Before beginning batch processing, make sure QuickTime Player is set to the desired export settings, and all videos to be processed are in a folder named ‘Input’ on the desktop." with icon note
tell application "Finder"
set the startup_disk to the name of the startup disk
end tell
set user to do shell script "whoami"
set inputfoldername to "Input"
set input_folder to startup_disk & ":Users:" & user & ":Desktop:" & inputfoldername & ":"
set user_desktop to startup_disk & ":Users:" & user & ":Desktop:"
set output_folder to startup_disk & ":Users:" & user & ":Desktop:Output:"
set file_extension to "_export.mp4"
try
tell application "Finder"
make new folder at user_desktop with properties {name:"Output"}
end tell
end try
try
set thefolderlist to list folder input_folder without invisibles
repeat with x from 1 to count of thefolderlist
set the_file to input_folder & item x of thefolderlist
set output_file to output_folder & item x of thefolderlist & file_extension
tell application "QuickTime Player"
activate
open the_file
//change timeline, trim NEED HELP HERE
export front document to output_file as MPEG4 using most recent settings with replacing
close front document
end tell
end repeat
on error
display dialog "This script requires a folder named ‘" & inputfoldername & "‘ located on the desktop." with icon stop
end try
beep
end timeout

Hi plashd,
First, I must confess that I don't know much about QuickTime. Nevertheless, while trying to understand your problem, I discovered that the AppleScript dictionaries of QuickTime Player and QuickTime 7 were very different from one another, and was unable to use the “export” command of QuickTime Player. However, I finally was able, with the following script, to use AppleScript to shorten a QuickTime movie and save it under another name:
*set the_file to POSIX file "/Users/pierre/Desktop/MVI_0503.MOV"*
*set output_file to "/Users/pierre/Desktop/NewMVI0503.MOV"*
*tell application "QuickTime Player"*
activate
*open the_file*
*tell front document*
*trim from 1 to (duration - 5)*
*save in output_file with replacing*
*close without saving*
*end tell*
*end tell*
Hope it can help.

Similar Messages

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • Need help with Flash CS4 buttons/can't get buttons to control anything

    Hello,
    I need help with Flash CS4. I am making a banner with an animation (Image change into movie clip "3D Spiral") and added buttons but I cannot get the buttons to control the animation. Please help I am frustrated! If someone could help I would be most appreciated.

    Thank you.
    Regards,
    Michael J. Sheehan  allelois
    Date: Mon, 17 Aug 2009 18:48:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with Flash CS4 buttons/can't get buttons to control anything
    Hi there
    I'm not sure how you wound up where you did. But you wound up in the Adobe Captivate forums. Please stand by as I move your thread to the Flash forums.
    Cheers... Rick
    >

  • I recently upgraded to iOS 8. Looks like the pics I had in my messages are no longer appearing as pictures, rather they are appearing as JPEG files (not broken jpegs). I need to get these pics. Can't figure out how to do it. I'm on an iPhone 5C.

    I recently upgraded to iOS 8. Looks like the pics I had in my messages are no longer appearing as pictures, rather they are appearing as JPEG files (not broken jpegs). I need to get these pics. Can't figure out how to do it. I'm on an iPhone 5C.
    I've tried resetting my phone, looking for the pics in the new 'deleted' folder. I tried forwarding the jpegs to sees if they'll appear in a new message (but turnout the phone won't let me forward these pics). Apple is trying to say it's the 30 day reason, but I know that is not the problem. ALl of my pics older than 30 days were viewable. It is the upgrade that screwed this up. Help! Important pics!

    Try this to learn about using keys:
    http://www.apple.com/support/macbasics/
    You can also use your PC mouse.
    As for iPhoto, it sounds like you were trying to move files around in the library. That is a bib no-no in Aperture or iPhoto.

  • My dad has dementia - does not remember his password. His hard drive has been erased. We need to reload Mountain Lion and can't figure out how to do it.

    My dad has dementia - does not remember his password. His hard drive has been erased. We need to reload Mountain Lion and can't figure out how to do it. Internet recovery asks for his Apple ID and password. He has no idea. I have an Apple ID but have never bought anything through the iTunes store so it won't accept my Apple ID. I don't know if his computer is under warranty. He does not remember if he has Applecare. I tried reinstalling Leopard -- the computer originally came with Leopard -- but the computer screen goes grey and a message comes up saying I need to restart. He wants to give this computer to me since it's useless to him. What do I do to get a system on it again?

    You will need to reformat the hard drive to go back to Snow Leopard or Leopard.
    Does he have a Snow Leopard Disk? He should, as there is no way to go from Leopard to Mountain Lion without it. If you can find the Snow Leopard Disk, I'd at least start with that.
    You will need to use Disk Utility in the installer to format the hard drive and get rid of the recovery partition.
    Boot from the installer disk by holding down the C key on restart. When it boots, Open Disk Utility (Utilities menu, at least in Snow Leopard).
    Select the Hard drive and then click the Partition tab.
    Select 1 Partition from the partition menu.
    Select Mac OS Extended (Journaled) as the format.
    Name the drive (Macintosh HD is the standard).
    Click Apply to partition the drive.
    When it is done, quit Disk Utility and install the OS.

  • I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer?

    I created a folder from my camera roll and shared with my icloud acct, can't figure out how to access it from my computer? I log onto icloud and can't find anywhere where "shared" photos are..

    You need Mountain Lion (10.8.2 or higher) and iPhoto '11 (9.4 or higher) or Aperture 3.4 to get shared photo streams on Mac.
    Another option to transfer them is to either import them to iPhoto using your usb cable, as explained here:http://support.apple.com/kb/HT4083, or to us an app like PhotoSync to transfer them to your Mac over your wifi.  (PhotoSync will also transfer albums, not just photos from the camera roll.)

  • I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    I'm having trouble buying a season pass for The Americans. I have purchased passes to Justified for the past 4 years with no problem. Can't figure out why this purchase won't work.

    What is the problem that you are having ? If you are getting an error message then what does it say ?

  • Hi i need help with my nokia e63 can someone pleas...

    i need help with my nokia e63 all the images on the web have really small when they used to be regular size and it has nothing to do with the zooming settings. someone please help.

    Cannot send or received email
    http://www.apple.com/support/ipad/mail/

  • We have two apple ID's and two libraries.  My daughter's IPOD is syncing with my library and I need to change this, but I can't figure out how.

    We have two apple ID's and two libraries.  My daughter's iPOD is syncing with my library and we really want to go to just one library--Mine for ease and we can't figure out how to do it.  Please help!!!

    Apple does not transfer content bought with one Apple ID to another Apple ID. Apple will not merge two Apple IDs.
    If most of your content was bought with the Yahoo! Apple ID but you now want the Gmail address for your Apple ID, the trick will be to change the address used for the Yahoo ID with the Gmail address. However, to do that you must first free the Gmail address from that other Apple ID. Use the instructions from Apple to substitute another address that is not used as an Apple ID for your Gmail address in the Apple ID with the Gmail address. Then, when the Gmail address is no longer used in an Apple ID, you can use the same instructions to substitute the Gmail address for the Yahoo address in the Apple ID with the Yahoo address.
    Changing the email address you use for your Apple ID -
    http://support.apple.com/kb/HT5621

  • Can't figure out block quote line after quote issue

    Hi - I'm building a block quote in DW for my site and can't figure out 2 things:
    1. How to move up the text after the first line so it's the same throughout
    2. How to move the quote author over to the right margin
    Below is the CSS and HTML for what I have so far as below that is a snap shot of what I'm seeing:
    blockquote {
      background: #F0F7FF;
      border-left: 10px solid #9D9D9D;
      margin: 1.5em 10px;
      padding: 0.5em 10px;
      quotes: "\201C""\201D""\2018""\2019";
    blockquote:before {
      color: #9D9D9D;
      content: open-quote;
      font-size: 8em;
      line-height: 0.9em;
      margin-right: 0.25em;
      vertical-align: -0.4em;
    blockquote p {
      display: inline;
      font-family: Times New Roman;
      font-size: 1.8em;
      line-height:  1.8em;
    </style>
    </head>
    <body>
    <blockquote><p><em>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo."</em></p>
    <br><br>
    <p>&mdash; Albert Einstein</p></blockquote>

    Probably need to get a bit creative to include the large quote:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    <style>
    body {
    font-family: times;
    blockquote {
    background: #F0F7FF;
    border-left: 10px solid #9D9D9D;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
    quotes: "\201C""\201D""\2018""\2019";
    .quote {
    position: absolute;
    top: 45px;
    color: #9D9D9D;
    padding: 0 0 0 2%;
    font-size: 8em;
    letter-spacing: -10px;
    blockquote p {
    text-indent: 60px;
    position: relative;
    font-family: Times New Roman;
    padding: 0 0 0 3%;
    font-size: 1.8em;
    line-height:  1.8em;
    blockquote .author {
    text-align: right;
    padding: 0 3% 0 0;
    margin: 0;
    </style>
    </head>
    <body>
    <blockquote><span class="quote">&lsquo;&lsquo;</span><p><em>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo."</em></p>
    <p class="author">&mdash; Albert Einstein</p>
    </blockquote>
    </body>
    </html>

  • I need help with Sunbird Calendar, how can I transfer it from one computer to the other and to my iphone?

    I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
    Thank you in advance,

    Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.

  • Now I've really done it.  I need help with iPhoto as I can't get into it at all.

    I sent a request earlier regarding my MacBook Pro.  I was trying to set up both computers so that I could network, mainly wanted to send my photos from the iMac (running OS X 10.6.8 and iPhoto '08).  After some trials I got the two computers so that they appeared to be networked.  I set system preferences so that PICTURES was what would be shared between the iMac and the MacBook Pro (running OS X 10.5.8 and iPhoto '11).
    I had both computers set to recognize each other, the passwords worked, and I thought that was it until I was ready to move my photos from the iMac to the MacBook Pro.  Before I knew what was going on, the MacBook got busy on its own and informed me that it was busy and that iPhotos had to do some updating because the photos (which I then assumed were the ones on the iMac) were too old as they were.  It took some time, during which I noticed that when it got to the point of updating faces there were a couple of faces I didn't think I had seen in my MacBook photos.  I let it finish what it was doing.
    HERE IS MY PROBLEM:  When it finally got finished I couldn't see any new photos on the MacBook, so I went to the iMac to see what had been done there.  Big surprise!  When I went to open iPhotos I got the message "The iPhone Library is locked, on a locked disc, or you do not have permission to make a change to it."  No matter what I tried I couldn't get into it, so I don't know whether I have photos any more or not.  
    As luck would have it, my extended warranty for technical help expired in June 2011!

    Locked disk issue:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Need help with Imovie before I throw my computer out the window!

    Ok so I got a canon fs200 for christmas and supposidly it works great with imovie. Now when I first hooked it up it kept crashing saying "IMovie quit unexpectedly while using the Sonix SN9C201 Webcam Plugin." I do not understand why its trying to use that plugin but anyways. So I messed with it some more and thought I figured out the problem and that it was plugged into my mini stack instead of directly into the computer. So when I tried that it loaded up great and worked, now today when trying to bring in videos from the camera it has gone back to crashing with same error! This makes NO sense...it is plugged directly into the computer it comes up as its own drive on my desktop yet crashes everytime I try to bring video in. Please help me with what I can do!

    Wow..I feel like a idiot..I had my webcam plugged in and totally forgot about it b/c I never use it. Unplugged that and bammo works like a charm. Thanks for makin me realize it hah

  • I need help with ISIGHT!  I can't get it to work with MSN!

    HI,
    My issue is this... I have AIM/AOL and I am able to see myself on webcam.. however noone else can unless they HAVE a webcam... My first question is- "DO you have to have a WEBCAM on both ends for both people to see you?" Does the person I am chatting with HAVE to have a webcam to see me? If so WHY? They should atleast be able to see ME if I want them to... Also if they are using windows for PC platform... can they use a pc webcam and still connect with me through my isight although I am on a mac?
    My second major ISSUE is.. WHY is the isight only compatible with AOL/AIM? I was told when I bought this it would be compatible with MSN Messenger for windows AND the MAC version... I have both and the isight does not show up on it... CAN ISIGHT be connected to msn messenger for MAC??? PLEASE help me!
    I called APPLE tech support and they couldn't even help me! They told me to call Microsoft! Anyhow- one guy did say he was able to get his ISIGHT working with the MSN messenger for MAC platform.. do you have ANY idea how to do that?? The thing is ALL my freinds are on PC's and have MSN messenger..
    ALSO- someone on mac rumors told me to look for a guy names RALPH! Said you know A LOT about mac and pc compatibility! PLEASE HELP
    Bottom line - I want to use isight with msn so my msn pc friends can share webcam... I also have virtual pc software... is it easier to just get a pc webcam and do it through there? ( i tried that and it didn't work either) i need major TECH SUPPORT!
    THANK YOU

    Microsoft's Messenger for Mac (MSN) does not support webcams at all.
    I have found the best alternative to MSN to be aMSN with macam for the webcam driver (it is a cheap usb webcam). Both are free open source projects. I guess if you use an iSight you will not need macam.
    aMSN can be found here: http://amsn.sourceforge.net/
    macam can be found here: http://webcam-osx.sourceforge.net/
    The speed is substantially faster and it is far more stable than Mercury in my experience.
    The only difficulty is the camera is often shown as being "in use by another application". To counter this I start macam, then plug in the camera (or unplug and plug back in). Then I start aMSN.

Maybe you are looking for

  • Firing sequence of Oracle forms 6.0 triggers

    Hi All, Pls tell anyone what is the sequence of trigger firing in oracle 6.0 (oracle apps). Thanks in advance

  • Mac book pro will not boot

    So i was using my macbook pro the 2008 with mountain lion the other day with a remote connection from another mac with snow leopard installed and everything worked great, no freezes no connection problems nothing, until when i was done i didnt want t

  • Upgrading from Mac Pro (2007) to Mac Pro (2009)

    I'm attempting to get a few simple questions answered before upgrading my current Mac Pro (2 x 2.66 Dual Core Intel) to a Mac Pro (8-Core 2.26Ghz). I visited the local Apple store to see if I could get my questions answered and left having concerns s

  • How to send Earphones back to Apple(Warranty)??

    Hi, i got a problem with my earphone. my left earphone was garbled so i went to this website and ordered new ones for free(I still have warranty). Everything is fine so far, I got the new earphones and they work, but I don't know how to send the brok

  • MTTR and MTBR (Breakdown analysis report mci7) in PM.

    Hi all, this is regarding pm issue. in mci7(ie MTTR and MTBR report) iam unable to get the required results for certain equipments. ie it is showing very high values. please guide me in this regard. Regards, santosh.