New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Ľ Advice and insight from world-class Apple enthusiasts Ľ Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

More AppleScript Help


Post Reply New Thread Subscribe

 
Thread Tools
Babkockdood

 
Member Since: Oct 25, 2009
Posts: 59
Babkockdood is on a distinguished road

Babkockdood is offline
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.



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

 
scathe's Avatar
 
Member Since: Jan 12, 2009
Location: Prague, Czech Republic
Posts: 1,096
scathe is a jewel in the roughscathe is a jewel in the rough
Mac Specs: 2,4Ghz 15" unibody

scathe is offline
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
QUOTE Thanks
Babkockdood

 
Member Since: Oct 25, 2009
Posts: 59
Babkockdood is on a distinguished road

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

 
scathe's Avatar
 
Member Since: Jan 12, 2009
Location: Prague, Czech Republic
Posts: 1,096
scathe is a jewel in the roughscathe is a jewel in the rough
Mac Specs: 2,4Ghz 15" unibody

scathe is offline
Quote:
Originally Posted by Babkockdood View Post
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

good luck with your app and future scripting
QUOTE Thanks
Babkockdood

 
Member Since: Oct 25, 2009
Posts: 59
Babkockdood is on a distinguished road

Babkockdood is offline
Quote:
Originally Posted by scathe View Post
I realized later that might be your intention so actually looked at the task at hand instead of offering an alternative

good luck with your app and future scripting
This is my first app that handles documents, so I needed some help with it.
QUOTE Thanks
pidge1

 
Member Since: Feb 14, 2010
Posts: 1
pidge1 is on a distinguished road

pidge1 is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Script Novice Needing Help! | Boot from /Developer? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
newbie question on XCode 3.2: how to populate pop up buttons/link to applescript nickharambee OS X - Operating System 0 10-21-2009 07:10 AM
Terminal vs. Applescript tgaleza OS X - Operating System 2 09-25-2009 10:08 AM
Logic Express and Applescript via GUI Scripting albertaurus Music, Audio, and Podcasting 0 04-09-2009 01:13 PM
Run applescript on start-up slugzzz Running Windows (or anything else) on your Mac 3 09-11-2007 01:51 AM
[ANN] New comprehensive AppleScript book hanaan OS X - Development and Darwin 0 11-06-2004 07:28 PM

All times are GMT -4. The time now is 05:45 PM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?