Ok, thanks everyone.
So, after moving on to come back to this issue later, I iterated through some other problems and saved a new version of the app (I know, someone said to try that earlier, and I swear I did, but was struggling with a few issues so maybe I didn't and I thought I did). My new save had the same on run... and on open... handlers described (my trial and error was over QT Timecode, but that's another post) and now I have no problem dropping onto the app with the same handler structure I started out with.
Not sure why, but it works as I initially expected now.
(Solved my TC issue too, sort of...)
Thanks everyone.
Steve
On Oct 22, 2010, at 3:36 PM, Brian Christmas wrote: On 23/10/2010, at 3:14 AM, Steve Thompson wrote: Ok, I feel sort of silly asking this, as I feel I've done this a billion times before, but somehow I'm missing something.
I've written a pretty extensive Quicktime editing script that processes one or a number of QT movies, adding black to the head, concatenating segments, etc and exporting to the desired format with a given naming convention (the text-manipulation was worse that the QT editing!). Everything works when I run the app just fine, I can select one or several source movies with my choose file with prompt.., etc, the script just chunks along happily.
I can't drop files onto the app. Dragging a QT movie does't activate the app in the finder, it doesn't select, nothing.
My structure is basically:
on run choose file with prompt "Select the feature video file(s) to process:" default location result with multiple selections allowed without invisibles set chosenFiles to result set chooseFileFolder to parentFolder(first item of chosenFiles) open chosenFiles end run
...
process stuff here
end open
shouldn't these handlers allow me to either run the app and select the files in a dialog (which works fine) and/or drop files onto the app?
My brain isn't working this Friday, I guess.
Thanks in advance.
Steve
G'day Steve
It's simple, you should have brackets.......
on open (videoFiles) set theflag to true if (count of videoFiles) > 4 then set the flag to false display dialog "Do you really want to open " & (count of videoFiles) & " items?" if result = "OK" then set theflag to true end if if theflag then repeat with theItem in videoFiles try tell application "QuickTime Player 7" open theItem end tell end try end repeat end if end open
on run set result to path to movies folder choose file with prompt "Select the feature video file(s) to process:" default location result with multiple selections allowed without invisibles set chosenFiles to result set chooseFileFolder to parentFolder(first item of chosenFiles) open chosenFiles end run
Regards
Santa
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|