URGENT! File will open in the new QTX no matter what done!

Hi!
The script at the bottom of the post worked perfectly on 10.5, but once I installed 10.6 it does not work anymore.
*On 10.5 it was like this:* The script consatntly checks a downloads folder. When a new file is downloaded, the script checks whether it is an .avi file and if it is true, then it checks whether the file name includes phrase "house". If the file is .avi and name contains house, then the file is moved (copied) to an external drive. Then the new file (locted on the external drive) is opened with QuickTime 7, a movie reference file is created and saved on desktop. Then the reference file is added to iTunes.
*On 10.6 it is like this:* The issue is that the newly created (copied) file on the external drive is opened not by QuickTime 7, but by the new QuickTimeX, so eventually it turns out that the file is opened in QTX and QT7 is just launched - the script fails. It is strange because specifically application id "com.apple.quicktimeplayer" (which is QT7) is asked to open the file, but it still opens in QTX.
To resolve the issue, I made a separate script to just check whether the QT7 would simply open the downloaded file (not the one that is moved to an external drive) using the same
+tell application id "com.apple.quicktimeplayer"+
+activate_
+close every document+
+open thisItem+
*and it actually did!*
So I guess that the issue lies somewhere on the fact that the file is opened from a different location or something like that (QT7 can open thisItem, but cannot open theNewFile). To sum up, if the file is not moved - everything works, once it is moved - it does not.
To conclude, the issue MUST be in this line:
*set theNewFile to (move thisItem to (POSIX file house_path))*
PLEASE, PLEASE help! Thanks in advance!
property folder_path : "/Users/reinis/Transmission/"
property family_path : "/Volumes/ALL/Family Guy/Season 8"
property family_season : "8"
on run
tell application "Finder"
set action_folder to ((POSIX file folder_path) as alias)
set droppedItems to entire contents of folder action_folder
end tell
repeat with thisItem in droppedItems
tell application "Finder"
copy name of thisItem as string to FileName
if FileName ends with ".avi" then
if FileName contains "House" then
set theNewFile to (move thisItem to (POSIX file house_path))
try
set my_location to (path to desktop) as text
tell application "iTunes"
launch
make new user playlist with properties {name:"Via"}
end tell
tell application id "com.apple.quicktimeplayer"
activate
close every document
*open theNewFile*
set movie_name to name of document 1
set save_location to my_location & movie_name & ".mov"
save document 1 in save_location
close document 1
end tell
set movie_reference to save_location
tell application "iTunes"
activate
add movie_reference to user playlist "Via" of source "Library"
delay 3
set pl to user playlist "Via" of source "Library"
set ofi to fixed indexing
set fixed indexing to true
repeat with t from 1 to (count of file tracks of pl)
set tr to file track t of pl
try
if tr's played count is 0 then
set tr's video kind to TV show
set tr's season number to house_season
set tr's show to "House"
end if
end try
end repeat
set fixed indexing to ofi
end tell
tell application "Finder"
delete file movie_reference
end tell
tell application id "com.apple.quicktimeplayer"
quit
end tell
tell application "iTunes"
activate
try
delete user playlist "Via" of source "Library"
end try
end tell
tell application "Finder"
empty the trash
delay 2
beep
end tell
end try

Hello
It seems you're caught in a typical pitfall.
It's easy to evade.
Replace the line :
set theNewFile to (move thisItem to (POSIX file house_path))
with this line :
set theNewFile to (move thisItem to (POSIX file house_path)) as alias
Brief explanation.
The original theNewFile holds an object specifier of Finder object and therefore 'open theNewFile' is handled by Finder whether or not it's in a tell block targeted to another application. It means 'open theNewFile' behaves the same as double clicking theNewFile in Finder, which will let QTX Player open it under OSX 10.6, I guess.
Meanwhile the modified theNewFile holds an alias object, which is an AppleScript's own object and not owned by any application, and therefore 'open theNewFile' is to be handled by the application to which the immediate context belongs, i.e., to which the immediate tell block is targeted.
Hope this may help,
H

Similar Messages

  • I can't import my iMovie 9.09 Movies (Files) into the new iMovie.  How can I make the 9.0.9. Files importable/openable in the new iMovie?

    I

    Well,  you can try this: right click the file, go down to encode file, and reencode it for the Mac.
    Hugh

  • I give up!! I uninstalled everything. It will not download the latest Itunes no matter what I do. Perhaps it is time to change to another device?

    After 3 hours I have to give up and get my work done.
    I have uninstalled everything. I cannot get itunes to download onto my computer. If they don't figure this all out I will probably just find a different, less complicated device to use.
    If there appears to be a solution, please email me as I won't be checking this for many hours.

    OK, for all those who say they get a message when they download itunes to Save or Cancel, after you hit Save but cannot find the file, go to the Search Programs & Files(click the window button) and type in itunes64setup.exe to be able to locate the file.
    I just got it to install now.

  • I need to install iWork 09 so I can open the many pages document files that will NOT open under the new pages 5. Mavericks will not accept an install from my iWork's 09 CD. How do I get around this?

    I need to install iWork 09 so I can open the many pages document files that will NOT open under the new pages 5. Mavericks will not accept an install from my iWork's 09 CD. How do I get around this?

    Hi, I'm helping StringSinger2 with this problem.
    The previously installed version is Pages 3.0.3 (the same as from iWork 08). This version (Pages 3.0.3/iWork 08) is incompatible with Pages 5.
    That is why it would be helpful to install iWork 09, which is the version between the two. It will open the older 08 files, and its saved files are readable by the new Pages5.
    SO...
    When I try to install iWorks 09 from my retail DVD the error message is "the installer is damaged". (I know the dvd is good, I installed iWorks09 to my laptop today.) Is the "installer" part of the system files? And - If that is damaged is there a patch for that?
    Many Thanks!

  • Some files in "DOCUMENTS" icon in dock won't open. Get msg saying You need a newer version of Pages to open this document." Have Pages 4.1 installed.  Same files will open ok from Finder, Pages App. Recently sync'd with ipad2 (Pages) after iOS5 installed.

    Some files in "DOCUMENTS" icon in dock won't open. Get msg saying "You need a newer version of Pages to open this document." Already have Pages 4.1 installed.  Same files will open ok from Finder/Pages App./selected file. Prob not noted until recently after sync'd with ipad2 (Pages) when I installed iOS5. Anyone-- please?!

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Rate/review Pages 5.2 in the App Store.
    Peter

  • How can I access files that I moved from an older MacBook Pro to a newer one via Firewire and Migration assistant.  The files show up on the new MacBook but cannot be opened.  Thanks!

    How can I access files that I moved from an older MacBook Pro to a newer one via Firewire and Migration assistant?  The files show up on the new MacBook but cannot be opened.  Thanks!

    Get info then check permissions then add your curent user name (it was probably different on old Mac) and give your username full read/write permissions.

  • I like the feature of the PDF being opened on the new tab on firefox browser windows. But the newer version (3.6 or 4.0) will automatically open PDF in a pop up adobe apps. How do I keep the PDF open on the new tab as before? thank you

    I like the feature of the PDF being opened on the new tab on firefox browser's windows. But the newer version (3.6 or 4.0) will automatically open PDF in a pop up adobe apps. How do I keep the PDF open on the new tab as before like the 3.5 ver.? I want the PDF opened in the new tab rather than in the Adobe's app's pop up window. Could you help?
    thank you

    '''I fixed mine by removing the Ask.com extension.'''
    Tools
    Add-ons
    Settings icon
    View Recent Updates
    Ask.com '''DISABLE'''
    Running FF 8.0 on Windows 7 (64-bit)

  • How can I embed a PDF in my Captivate 5.5 project that will open in a new window when the user click

    I put a glossary button in my project. When the user clicks on the button, I want the file to open in a new browser window. This works in preview mode, but not when I publish it. What am I doing wrong?

    I've tried the download three times. It reports that installation was successful, but when I use Firefox I still get only an option to download the .pdf; I still can't read it within the browser. This fix WAS for Firefox 5.0, right?

  • Is there a procedure to open keynote 09 files with videos in the new Keynote without converting videos?

    is there a procedure to open keynote 09 files with videos in the new Keynote without converting videos?
    I have a big presentation with many video mov and avi files created with Keynote 09. When trying to open the file in the new Keynote the procedured crashes and Keynote crashes abruptly. It seens that an avi file is not converted. I have no more the old Keynote 09. How can this problem be solved?

    if you right click or control click on the file, do you get an option to 'show package contents'?

  • My safari will not open with the new iphone update

    my safari will not open with the new iphone update...help

    Hi Robin,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    I would first suggest you restart your iPhone to see if the issue persists.
    iOS: Connecting to Wi-Fi
    http://support.apple.com/kb/HT5569?viewlocale=en_US
    Cheers,
    - Judy

  • Verity Credit Union site will not open with the new Firefox. How can I get the old Firefox back?

    I want old Firefox back. My credit union, Verity, will not open with the new version of Firefox I have downloaded.

    @glennhaste, the public pages I visited seem identical in IE8 and Fx10, but you may be referring to a part of the site that requires logging in (impossible for non-customers to view).
    Since the problem is so recent, can you recall any changes you made in Firefox, or are you aware of any changes your CU made on its site?
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    1. Clear Firefox's Cache
    Firefox > Preferences > Options > Advanced
    On the Network mini-tab > Offline Storage : "Clear Now"
    2. If needed, delete the site's cookies here
    While viewing a page on the site, "right-click" and choose View Page Info > Security > "View Cookies" (''Sorry, I don't know how you right-click on a Mac'')
    Then try reloading the page. Does that help?

  • Adobe Photoshop elements - the catalog will not open on the new laptop I just bought.

    I installed the Adobe software for Elements 5.0. The catalog won't open. The new laptop uses Windows 7. Could that be the problem? If so, how do I rectify the problem?

    Hi,
    Actually, I did eventually get it to open. However, the photos are no longer tagged. I recovered the photos from my external hard drive, which is where I always stored them.
    So you are saying that I would need to actually to a BACKUP from ELEMENTS itself? If I do that, the tags will still be attached to the photos? I have over 6000 photos. I do not want to have to reorganize and re tag them again.
    Thank you for any suggestions you can provide!

  • I placed my aperture library on a 1 TB external drive (the file is 300 GB) and Aperture churns and churns but will not open the file. I don't know if the file is too large or if it is the external drive or what? any ideas? Smaller files will open.

    I placed my aperture library on a 1 TB external drive (the file is 300 GB) and Aperture churns and churns but will not open the file. I don't know if the file is too large or if it is the external drive or what? any ideas? Smaller files will open. This is very annoying.

    If this is an external USB drive, you must understand that USB is really, really slow. There may be nothing wrong except for that.
    In my opinion, USB external drives are only acceptable for backups, and to get "near Hard Drive" performance, you need FireWire.

  • Please HELP! i cannot open any Adobe PDF files anymore. i DL the new version XI and since no files h

    Please HELP! i cannot open any Adobe PDF files anymore. i DL the new version XI and since no files have opened - so i recently uninstalled it and re-installed adobe reader 9 but i am having the same problem - no pdf files open and its really causing a problem as i can not open any work documents. please help

    Three things to try (Reader XI)...
    Using Windows Explorer navigate to C:\Program Files (x86)\Adobe\Reader 11.0\Reader, then double-click on Eula.exe and accept the license agreement
    Can you open Adobe Reader by itself?  If so, try disabling Protected Mode [Edit | Preferences | Security (Enhanced)].
    It could even be a malware issue; see http://helpx.adobe.com/acrobat/kb/reader-core-dll-error.html

  • I have a new computer and I want to make it my home device for I tunes. I have home sharing, and all of the music and files are on the new computer. Now what do I do to make the new computer the home computer for Itunes?

    I have a new computer and I want to make it my home device for I tunes. I have home sharing, and all of the music and files are on the new computer. Now what do I do to make the new computer the home computer for Itunes?

    The computer (windows platform) where I initially began using Itunes has four other computers/devices that are shared with it. All four of the other computers show up in my account, and can be managed. Or I can remove them. But on the new computer that I want to be my base computer (home if you will). The computer I want it to replace, when ITunes is open, has a tool bar, with various functions. All of the other devices are linked to that computer in ITunes, under Home SHaring. The new computer, shows the downloads via Home Sharing, but it does not show/have any tool bar.
    I want to activate the new computer to be the computer via ITunes where all of the devices are linked to it as the base for ITunes. And, I don't know how to make that happen.
    I hope that makes sense.

Maybe you are looking for

  • Shipping and delivery status from R/3 to CRM

    Hi all, we are creating sales orders in CRM and replicating it to R/3. CRM is the owner of the document. Now whenever changes are done to sales order in CRM, the changes are replicated to R/3. Let's say the shipping status is updated in R/3. Now the

  • Custom properties added by EWS not visible in Outlook

    Hi all I'm a first-time Exchange and Outlook addin developer and I'm stuck on a problem. I'm working on a project where we use an Outlook 2003 addin that tags items; mail, appointments and tasks with custom properties. In Outlook we do this by adding

  • Pcd folder is empty after installation

    Hi All, I have installed SAP Netweaver sneak preview 7.0.Server is running fine.I tried to get logon par (com.sap.portal.runtime.logon.par) from <J2EE_Engine_Instance>\j2ee\cluster\server<X>\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\deployment\pc

  • Display warning message

    Hi guys, I need some help with the "displaying warning message" in labview 2010 SP1 base development system. My requirement is, I would like to display a warning message (text alert) when the RPM of the pump falls below 10000 rpm. In this case I am m

  • Audio problems PP CC

    I'm having some audio issues which seem to be a recent developement, possibly since the last update. some audio files on my timeline have a click at the begining of the file, even when an audio dissolve is applied. even worse, on export, some audio c