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
bojangles
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Oct 9, 2003, 05:34 PM
 
Hey there. I just got a new G5 at work where, up until now, there hasn�t 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
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 10, 2003, 01: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'."
     
bojangles  (op)
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Oct 10, 2003, 07:10 AM
 
I was missing the �as string��. It�s always something ridiculously simple, ain�t 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
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 11:55 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,