I maintain html directories that consist of around a thousand records.
Several directories share the same information, so updates require
changing the data many times. I would like to make each record a
separate file accessed by the directories via #bbinclude "filename".
That way I make updates in one file, then use the Update tool on each
directory. Clearly, if I cannot automate the creation of the record
files, this will be a major undertaking and not worth any savings in
effort that result.

Using AppleScript "record" I generated a script that highlights each
record, copies the record, opens a new document, and pastes the record
into it. The problem now is saving the file with a unique filename.

The records each have a unique five digit number that is easy to
search for and copy (using grep). I'd like to use that number for the
filename. However, when I record the actions that find the number,
copy it, select "Save as", paste, add .html, and save, the script that
is generated does not reflect the action of pasting. Instead the
number that I selected and pasted during recording appears in the
script as the number itself, meaning every file will (try to) have the
same name, that of the file I used to record the script.

I have the feeling that when the "Save as" dialog box opens I am no
longer talking to BBedit, but to the Finder. I tried recording a
script of renaming a file (via Paste) in the Finder to see what that
looks like, but the paste action is not recorded there either.

Any ideas on how to save a file with a filename based on a string in
the file?

Thanks,
Bull
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.

Reply via email to