Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Save file groups in TextWrangler' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Save file groups in TextWrangler
Authored by: stevenstromer on Sep 04, '08 11:34:48AM

Solved my own problem. I removed the code querying the user for a password, returning responsibility for querying to the operating system. Revised script 'Open Bookmark Collection.scpt' is as follows:

tell application "TextWrangler"
set filename to (choose file)
open filename opening in new_window
set allfilesstr to text of text document 1
close text document 1
set allfiles to rest of my splitit(allfilesstr, "||")

if length of allfiles is greater than 0 then
set afile to item 1 of allfiles
open location afile
end if
set allfiles to rest of allfiles
repeat with afile in allfiles
open location afile
end repeat
end tell

on splitit(the_string, search_string)
tell (a reference to my text item delimiters)
set {old_tid, contents} to {contents, search_string}
set {arr, contents} to {the_string's text items, old_tid}
end tell
return arr
end splitit

Thanks again to the original script writer. You have made my life worlds easier!



[ Reply to This | # ]