ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Stand alone bookmarks toolbar

<< < (3/4) > >>

skrommel:
 :) But won't a regular toolbar get in the way?

Anyway, here's a very early version of BookmarkBar so you can test if it's a practical approach.

Resize by editing the width:= line, no sortinging or reordering

The first time you run it, it has to fetch the favicons, so just hang in there!

Skrommel @ 2008


--- ---;BookmarkBar.ahk
; A standalone toolbar for your bookmarks
;Skrommel @ 2008

favorites=
width:=A_ScreenWidth
maxlines=33
wrap:=100
columnwidth=200

#NoEnv
#SingleInstance,Force
SetBatchLines,-1
SetWinDelay,0
CoordMode,Mouse,Screen

applicationname=BookmarkBar

FileCreateDir,FavIcons
Gui,1:Color,FFFFFF
Gui,1:Margin,0,0
Gui,1:+ToolWindow +Border +AlwaysOnTop +OwnDialogs
x=0
counter=0
If favorites=
  RegRead,favorites,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Favorites

SplitPath,favorites,,,,name_no_ext,
counter+=1
Gui,1:Add,Picture,V1%counter% GMENU x+%x% w16 h-1 Icon14,%A_WinDir%\Explorer.exe
Gui,1:Add,Text,V2%counter% GMENU x+0,%name_no_ext%
Loop,%favorites%\*.url,0,0
{
  list%counter%:=list%counter% . A_LoopFileLongPath "`n"
  IniRead,iconfile,%A_LoopFileLongPath%,InternetShortcut,IconFile
  SplitPath,A_LoopFileLongPath,,,,name_no_ext
  icon:=name_no_ext
  IfNotExist,FavIcons\%icon%.ico
    UrlDownloadToFile,*0 %iconfile%,FavIcons\%icon%.ico
}
x=10

Loop,%favorites%\*.*,1,1
{
  IfInString,A_LoopFileAttrib,D
  {
    GuiControlGet,pos,Pos,2%counter%
    If (posX+posW>width-wrap)
    {
      Gui,1:Add,Text,xm yp+17 w0
      x=0
    }
    counter+=1
    Gui,1:Add,Picture,V1%counter% GMENU x+%x% w16 h-1 Icon14,%A_WinDir%\Explorer.exe
    Gui,1:Add,Text,V2%counter% GMENU x+0, %A_LoopFileName%
    If x=0
      x=10
    list%counter%=
    Loop,%A_LoopFileLongPath%\*.*,0,0
    {
      list%counter%:=list%counter% . A_LoopFileLongPath "`n"
      IniRead,iconfile,%A_LoopFileLongPath%,InternetShortcut,IconFile
      SplitPath,A_LoopFileLongPath,,,,name_no_ext
      icon:=name_no_ext
      IfNotExist,FavIcons\%icon%.ico
        UrlDownloadToFile,*0 %iconfile%,FavIcons\%icon%.ico
    }
  }
}

Gui,1:Show,W%width%,%applicationname%
Return


MENU:
MouseGetPos,mx,my
mx+=10
my+=10
Gui,2:Destroy
Gui,2:Color,FFFFFF
Gui,2:Margin,1,1
Gui,2:+ToolWindow +AlwaysOnTop -Caption +Border +Owner1
StringTrimLeft,control,A_GuiControl,1
x=1
y=1
lines=0
Loop,parse,list%control%,`n
{
  If (lines>maxlines)
  {
    x:=x+columnwidth+27
    y=1
    lines=0
    Gui,2:Add,Text,x%x% ym w0
  }
  lines+=1
  SplitPath,A_LoopField,name,,,name_no_ext,
  IniRead,url%A_Index%,%A_LoopField%,InternetShortcut,URL
  IniRead,iconfile,%A_LoopField%,InternetShortcut,IconFile
  IniRead,iconindex,%A_LoopField%,InternetShortcut,IconIndex
  IfExist,%iconfile%
    Gui,2:Add,Picture,V3%lines% GURL x%x% yp+%y% w16 h-1 Icon%iconindex%,%iconfile%
  Else
  {
    icon:=name_no_ext
    IfExist,FavIcons\%icon%.ico
      Gui,2:Add,Picture,V3%A_Index% GURL x%x% yp+%y% w16 h-1 Icon%iconindex%,FavIcons\%icon%.ico
    Else
      Gui,2:Add,Picture,V3%A_Index% GURL x%x% yp+%y% w16 h-1 Icon15,%A_WinDir%\Explorer.exe
  }
  If y=1
    y=17
  If name_no_ext<>
    Gui,2:Add,Text,V4%A_Index% GURL x+0 w%columnwidth% -Wrap,%name_no_ext%
  Else
  {
    url:=url%A_Index%
    Gui,2:Add,Text,V4%A_Index% GURL x+0 w%columnwidth% -Wrap,%url%
  }
}
Gui,2:Show,X%mx% Y%my%,%applicationname%
Return


URL:
StringTrimLeft,control,A_GuiControl,1
url:=url%control%
Run,%url%
Return


1GuiClose:
ExitApp

Nod5:
This is a good idea app103!

It got me thinking... I'm looking for some way to have very quick access to a list of advanced searches on a whole set of bookmarks. Launchers like FARR can be used for that (that's what I'm using right now) but a specialized bookmark toolbar could be even faster for some purposes. So in addition to the regular folders on the toolbar (each folder acting as a dropdown menu for all bookmarks within it), there could also be some dropdown menus that list the results from advanced searches on a large set of bookmarks (Example: one dropdown meny lists the 20 most recent bookmarks with tag ____ in the name and with domain ___ in the URL).

superboyac:
(slightly OT and not particularly useful)
Powermarks is (was) the greatest bookmark tool ever made.

housetier:
How about SQLNotes?  ;) ;) ;) ;) ;)

app103:
I recently discovered that K-Meleon allows you to have 3 bookmark toolbars, one each for your Mozilla, Opera, and IE favs, and allows you to add links to all of them. And you don't need to have Opera installed to have that 3rd one!

I think it is the first/only browser to do that.  :-*

Skrommel,

I will test your ahk script when I am on a decent pc. Not sure when that will be, but as soon as I am and I try it, I'll let you know what I think. This pc I am stuck using right now is just way too old & slow to run much stuff and I have had to live without most of my favorite software just to be able to run the bare necessities.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version