Re: file type bzy?
Re: file type bzy?
- Subject: Re: file type bzy?
- From: "Daniel A. Shockley" <email@hidden>
- Date: Wed, 19 Jun 2002 15:47:35 -0400
Well, for the code below, you really should put a delay 1 or delay 2
or something like that inside the repeat loop. As the code currently
stands, the script will take over the CPU.
That aside - you shouldn't have to have a loop to check the status
anyway. If the script is timing out, you need to put a 'with timeout
[x] seconds' block around the 'move' command. If the code below is
inside a Finder tell block, the next command should not execute until
the file is done being moved.
Is a timeout the problem you were tryign to solve? If so, don't use
the code you posted, use something like:
tell app "Finder"
with timeout 300 seconds -- which is 5 minutes, increase if needed
move file moveThis of thePath to the folder magFolder of dstFolder
end timeout
end tell
However, I would guess that thePath is a string, not a reference to a
folder, in which case you're still going to have problems, so try:
tell app "Finder"
with timeout 300 seconds -- which is 5 minutes, increase if needed
move file (thePath & moveThis) to the folder magFolder of dstFolder
end timeout
end tell
As long as thePath, moveThis, and magFolder are strings, and that
dstFolder is a reference to a folder somewhere, not just a string.
See Emmanuel's comment below.
At 5:11 PM +0200 19/6/02, Steve Suranie wrote:
>move file moveThis of thePath to the folder magFolder of dstFolder
repeat until (file type of file moveThis of folder magFolder of
folder dstFolder is not equal to "bzy ")
end repeat
This can't work - whatever dstFolder contains - since it uses both "of
dstFolder" and "of folder dstFolder". (I think)
You should be more specific about the contents of the various variables.
And, if you're running inside a "tell" wrapper, it may be useful that you
let us know.
--
----
Daniel A. Shockley
email@hidden
email@hidden
http://www.danshockley.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.