[Pythonmac-SIG] Finder Crash, after moving files....
Paul Berkowitz
berkowit at silcom.com
Tue Jul 6 23:49:18 CEST 2004
On 7/6/04 2:23 PM, "Jack Jansen" <Jack.Jansen at cwi.nl> wrote:
> Ok, you asked for it. Here's how you can get Python out of the loop:
> in stead of actually doing the move with findertools, let your Python
> script
> create an AppleScript that will do the actual moves: on stdout (or
> another
> file) print lines of the form "move XXXX to YYYY", put a 'tell
> application "Finder"'
> at the top and 'end tell' at the bottom. Open this is Script Editor and
> run it, and
> see whether it also freezes the finder after 4000 moves.
If it's an AppleScript in a Finder tell block you'll first have to coerce
POSIX file paths to standard colon-delimited AppleScript file paths, then to
aliases. In AppleScript that would be:
set XXXX to POSIX file XXXX as alias
set YYYY to POSIX file YYYY as alias -- YYYY is a directory, not a file
spec
tell application "Finder" to move XXXX to YYYY
--
Paul Berkowitz
More information about the Pythonmac-SIG
mailing list