I dunno about all the documents in the current window, but for all
the documents in a folder (and sub-folders, thereof), I use:
-- begin script --
set SourceFolderPath to choose folder with prompt "Format HTML files
of which folder?"
tell application "Finder"
try
set FilesList to ((every file of entire contents of folder
SourceFolderPath whose name ends with ".html") as alias) as list
on error number -1700 from f
-- for >1 files trick the finder by getting an alias list of the
files from the error message:
set FilesList to f as list
end try
end tell
tell application "BBEdit"
activate
repeat with i from 1 to count FilesList
open (item i of FilesList)
tell text document 1
format mode gentle hierarchical with normalizing tag case,
normalizing attribute quotes and encode entities in attributes
close saving yes
end tell
end repeat
end tell
-- end script --
--
Greg Raven
Apple Valley, CA
Election 2006 -- Visit this site to see each candidate's stand on
illegal immigration:
http://www.betterimmigration.com/candidates/2006/featuredraces.html
On Jul 15, 2006, at 6:23 PM, Google Kreme wrote:
I have about 30-35 open html documents and I want to apply the
"Format" option to all the documents in the current window.
I assume this is trivial with an Applescript, but is there some
simpler way available I'm missing?
--
Heisenberg's only uncertainty was what pub to vomit in next and
Jung fancied Freud's mother too. -- Jared Earle
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>