Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Using AppleScript to copy a file name?

Using AppleScript to copy a file name?
Thread Tools
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Oct 9, 2003, 04:34 PM
 
Hey there. I just got a new G5 at work where, up until now, there hasnt been a Mac for about a decade. Anyway, I discovered the hard way that graphics copied into a FileMaker Pro database by a Windows-based machine do not show up on a Macintosh, so I need to update over 10,000 photos. The easiest way to do this involves passing a file name to a FileMaker script which, of course, involves copying said file name to the clipboard.

Does anyone know how to do this?!?

Thanks!
“The trouble with quotes on the Internet is that you can never tell if they’re attributed to the right person.”
—Abraham Lincoln
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 10, 2003, 12:52 AM
 
Code:
tell application "Finder" set the clipboard to the name of someFile as string end tell
...where someFile is, obviously, some file.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Oct 10, 2003, 06:10 AM
 
I was missing the as string. Its always something ridiculously simple, aint it?

Thanks!
“The trouble with quotes on the Internet is that you can never tell if they’re attributed to the right person.”
—Abraham Lincoln
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 07:15 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2