2 Replies Latest reply: Feb 11, 2011 8:53 AM by beckmart
beckmart Level 1 (25 points)

How can I create a bookmark for
a) the current tab
b) all tabs in the current safari window
in an already existing bookmarks folder via Apple Script?
(Why? I want to define keyboard shortcuts for 3 or 4 different folders
to quickly sort my bookmarks already when saving them.)
After launching the script, i'd like to also get a text input box to
for (a) the name of the bookmark (default value like when hitting cmd-
and for (b) the name of the bookmarks folder to create with all the
tab's bookmarks.
Is there an easy way to do that?
Thank you very much,
Kind regards

MacBook 13" white 2,16 GHz, 3 GB RAM, Mac OS X (10.6.5)
  • hubionmac Level 2 (435 points)
    Do you mean a Book mark folder inside Safari or a real folder full of .webloc files?

    Beside this, for my own use I wrote an AppleScript that puts the URLs + descriptions + keywords into a simple text-file. Then I wrote a small html-file that pulls this text-file using Javascript and builds up a html-table with live-search like in itunes...
    I placed a bookmark to that lokal html-file in my bookmark-bar and now I can access this bookmark list just by pressing cmd+1 inside Safari (since it is the first Bookmark in the Bookmark-Bar).

    (This local bookmark-site works great with Safari or Firefox, but chrome resists to load the local-textfile... but it would work if the file is online... strange google )
  • beckmart Level 1 (25 points)
    thanks for yor reply!

    I meant: in Safari

    I have several big projects where I often find information while browsing (to read later)
    at the moment I'm collecting everything in a bookmark folder "read later" in my bookmarks bar (if I have several tabs in a window I normally store them in a folder nested in this "read later" folder, so that I can open the all at once in tabs in one window later as a "session")

    So I'd like to define several "read later" folders - some for the big current projects and one for all the rest and I want to have a script so send items directly there without having to change the destination folder each time in the add-bookmark-dialog (as it gets quite long messy because all the subfolders are also listed there).

    Your solution sounds interesting, but (for my understanding) it lacks a way to open all bookmarks from one surfing "session" at once in tabs.