Re: Is there an easier or more elegant way to do this?
Re: Is there an easier or more elegant way to do this?
- Subject: Re: Is there an easier or more elegant way to do this?
- From: "John C. Welch" <email@hidden>
- Date: Sun, 03 Oct 2004 17:44:33 -0500
On 10/3/04 5:22 PM, "Michelle Steiner" <email@hidden> wrote:
> set foo to choose file with prompt "Which file do you want to move?"
> set bar to choose folder with prompt "Which folder do you want to move
> it to?"
The only action that you really have to work hard at is rename.
If it's cancel, then you're done, yay.
If it's replace, then move foo to bar with replacing.
So I'd redo the order a bit
Get return of dialog
If cancel, done, quit (can just be another try block if you want)
If replace then
move with replacing
Else
rename the file and then move it without replacing (since you don't want
to do this)
You could put the rename in a handler in case they try to just hit enter and
not rename the file, or make the default name example "foo1".
john
--
Q: This myasthenia gravis, does it affect your memory at all?
A: Yes.
Q: And in what ways does it affect your memory?
A: I forget.
Q: You forget? Can you give us an example of something that you've
forgotten?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden