Re: applescript-users digest, Vol 2 #222 - 16 msgs
Re: applescript-users digest, Vol 2 #222 - 16 msgs
- Subject: Re: applescript-users digest, Vol 2 #222 - 16 msgs
- From: Dan Kabbes <email@hidden>
- Date: Mon, 15 Jan 2001 08:41:19 -0500
I have used excel in a similar way before to extract some info as text and then work with it in another application. This is my first reply to this
list, and I have always wanted to be able to help someone out, but I must advise that I am fairly new to AppleScript. If my advice is in error, I am
sure that someone with more experience will help us both. Here goes
tell application "Microsoft Excel"
Activate
set rowNum to 2 --2 represents the row number to start with
repeat with i from rowNum to 546 -- represents the row number to stop at
set rowNum to i
set nameCell to "R" & rowNum & "C1" as string
set custName to text of Cell nameCell --gets the name of the student in row 1
set numCell to "R" & rowNum & "C2" as string
set fileNum to text of Cell numCell --gets the number of the student in row 1
tell Application "Finder"
activate
select file nameCell of folder "Blah" of startup disk
set name of selection to numCell
end tell
end repeat
end tell
There probably are better and faster ways to do this, but it will get it done. You can change the column numbers to match your spreadsheet, and can
also change to starting and stopping row numbers. Good luck.
Dan
>
> If you'll tell me the name and version of the spreadsheet program, I'll
>
> forward this to the Applescript list.
>
>
>
> Bert
>
>
>
> on 1/10/01 5:19 PM, Joe Joyner at email@hidden wrote:
>
>
>
>> Hi,
>
>> I've got 545 Jpegs that are named with numbers. I have a spreadsheet
>
>> that lists the numbers with the associated student names. I want to
>
>> know if there is a quick way to have the computer rename each picture
>
>> with the student name (instead of the number).
>
>> I used GraphicConverter Batch to trim each picture, but I didn't see
>
>> a way to do the renaming....any ideas?
>
>> I don't have a lot of experience with scripting, but if anyone out
>
>> there has a script I could use, that'd be great....thanks..
>
>> -Joe
>
>> Thanks,
[demime 0.97c removed an attachment of type text/x-vcard which had a name of dkabbes.vcf]