More AppleScript Help

Joined
Oct 25, 2009
Messages
59
Reaction score
0
Points
6
In AppleScript, I want to figure out how to pick a file, pick an output folder, then copy the selected file to the selected output folder.

I've tried this.

picture1g.png


It compiles without error, but doesn't do anything I want it to. Can someone tell me how to do this correctly?
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
You can use Quicksilver to accomplish this and much faster since it finds the file as you type the name.

Imo this script won't really save you time on a daily basis since you have to manually select everything anyway ... why not just drag and drop :)

Edit:
however if you want to use applescript, I came up with the following:

choose file without invisibles
set SELECTEDFILE to the result
choose folder without invisibles
set OUTPUT to the result

tell application "Finder" to duplicate SELECTEDFILE to folder OUTPUT
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
Thanks, man. I'm making an AppleScript application, this is not for my own convenience.

I realized later that might be your intention so actually looked at the task at hand instead of offering an alternative :D

good luck with your app and future scripting
 
OP
B
Joined
Oct 25, 2009
Messages
59
Reaction score
0
Points
6
I realized later that might be your intention so actually looked at the task at hand instead of offering an alternative :D

good luck with your app and future scripting

This is my first app that handles documents, so I needed some help with it.
 
Joined
Feb 14, 2010
Messages
1
Reaction score
0
Points
1
Hi

Try this.

on open thefile
set t to choose folder
repeat with i in thefile
tell application "Finder"
move i to t
end tell
end repeat
end open

save it as an application in script editor and drop stuff on it.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top