Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   More AppleScript Help (http://www.mac-forums.com/forums/os-x-development-darwin/188776-more-applescript-help.html)

Babkockdood 01-28-2010 09:07 PM

More AppleScript Help
 
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.

http://img717.imageshack.us/img717/6414/picture1g.png

It compiles without error, but doesn't do anything I want it to. Can someone tell me how to do this correctly?

scathe 01-29-2010 07:25 AM

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

Babkockdood 01-29-2010 06:55 PM

Thanks, man. I'm making an AppleScript application, this is not for my own convenience.

scathe 01-29-2010 07:04 PM

Quote:

Originally Posted by Babkockdood (Post 989953)
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

Babkockdood 01-29-2010 07:14 PM

Quote:

Originally Posted by scathe (Post 989957)
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.

pidge1 02-14-2010 04:28 AM

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.


All times are GMT -4. The time now is 12:24 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.