Re: Dumb Finder scripting question
Re: Dumb Finder scripting question
- Subject: Re: Dumb Finder scripting question
- From: "Mark J. Reed" <email@hidden>
- Date: Sun, 16 Dec 2007 13:26:25 -0500
On Dec 16, 2007 12:51 PM, Ed Stockly <
email@hidden> wrote:
>>> It's just a case of my script having to compute something that it should, in a sensible world, be getting from the app instead.
That's the whole chicken and egg thing for appleScript on this list.
Not really.
Why not be mildly annoyed that there's not a single command to convert avi files to mov file if there's not already a mov file with the same name in the same directory?
Because the situation is quite different. I don't expect app writers to solve all my needs. I'm just talking about basic API politeness.
It works like this: I'm having a chat with QuickTime, and I ask it to do something on my behalf. As a result of that action, one of the things we're talking about changes names, but QuickTime doesn't bother to tell me this fact. And then when I ask about that thing using the old name, it claims to have no memory of it ever existing.
This violates several principles of good API design, starting with the principle of least surprise. It has nothing to do with the particular technology in question, or the degree of functionality being supplied by the app vs the script. It makes a change behind the scenes that the script is expected to somehow notice through means that have nothing to do with the scripted interaction responsible for the change in the first place.
when opened in quicktime the window name is not the same as the file name and the window name does not change after the app does the save as.
Ah, so it's even worse than impolite: it's inconsistent.
tell
doc
save self contained
in
POSIX file
movPath
close
end
tell
Sadly, that doesn't work OMM either. The close fails with the same error about the doc not being found.
That works, as does "close document 1", although it's not the right behavior if QT player happened to already be running with something open..
--
Mark J. Reed <
email@hidden>
_______________________________________________
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