Re: Choose location dialog - view as html
Re: Choose location dialog - view as html
- Subject: Re: Choose location dialog - view as html
- From: Andrew Oliver <email@hidden>
- Date: Tue, 18 Mar 2003 16:54:23 -0800
Simply replace the line:
display dialog "Choose Destination for backup files" ## this is
>
what I need,this If statement doesn't make any sense to me
with:
choose folder with prompt "Choose Destination for backup files"
This will display the standard file dialog, allowing the user to select a
folder using a familiar interface.
In addition, when creating a new folder, use the syntax:
tell application "Finder"
make new folder at disk "Macintosh HD" with properties {name:"New Folder
Name"}
end tell
Rather than relying on creating a folder, selecting it and setting a new
name.
Unfortunately, there's no simple way of combining the two features, i.e. a
way of letting the user define where the new folder should be created,
unless you want to create a new folder within a user-selected folder,which
is possible.
Andrew
:)
On 3/18/03 4:21 PM, "Daniel" <email@hidden> wrote:
>
Does anyone have some straight forward code for a choose location of folder
>
dialog, i also need a new folder option on the dialoge which would return be
>
similar to the first IF statement.
>
>
I started writing something but got a little lost:
>
tell application "Finder"
>
display dialog "Backup Location" buttons {"New Folder", "Cancel",
>
"Choose"}
>
set rslt to result
>
if button returned of rslt is "New Folder" then
>
display dialog ("Folder Name - You must enter name here") default
>
answer ""
>
set rslt2 to result
>
set nf to (text returned of rslt2)
>
make new folder
>
select folder "untitled folder"
>
set name of selection to nf
>
>
else
>
>
if button returned of rslt is "Choose" then
>
display dialog "Choose Destination for backup files" ## this is
>
what I need,this If statement doesn't make any sense to me
>
get id of selected
>
set dir to result The result would be the directory to place the
>
files
>
set nf to item whose id is dir
>
end if
>
end if
>
>
get id of (every item of the entire contents of folder "DR's Files")
>
whose label is 6
>
set recentjobs to result
>
copy ((every item of the entire contents of folder "DR's Files") whose id
>
is in recentjobs) to item nf
>
>
end tell
>
>
if anyone can help it would be appreciated
>
>
Daniel
>
_______________________________________________
>
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.
_______________________________________________
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.