 
 Now all we need to add is
1. Something
2. A whadyoucallit
3. Something else
4. A thingyamyjig
5. The other thing
6. An oujamadoojy
7. Anythingelse
 
 
1. Remember underpantsPerkin wrote:Thanks Fangbeast

Now all we need to add is
1. Something
2. A whadyoucallit
3. Something else
4. A thingyamyjig
5. The other thing
6. An oujamadoojy
7. Anythingelse

 .
 .
Painful. I have to reinstall windows 7 as it keeps crashing randomly after I used their system file checker to repair some files:):) Got to love MS.Perkin wrote:I'll give the new version a try soon, just installing a new sytem.

Yes, it's my lovely wife wanting sponsorship for the breast cancer march:):) Oh, oh, we have been found!!! Oh no, srod's steaming underpants will get us!!!!rsts wrote:Hi Fangles,
Is that Suzie speaking sponsorship on your web page from you, or is it a site generated ad?
cheers

I've no experience 'scraping' a web page for data but if you have a sample (it would all have to be the same format from all people or I would be in even more trouble than I am now!!), then I could give it a go.Perkin wrote:Working great Fangles.
One thing I'd like to suggest (yes another one)
When Importing a list, would it be possible to import a *.hml|*.html file exported by IE or Firefox
(Just site/address - ignoring add_date etc.)

Okay, I am now very confused. Do you mean exported from my program, or from somewhere else?My fault, I meant an exported favourites list file.
Yep that's the one, export from firefox (or IE) as html, import into Sitelist.Fangbeast wrote:D'oh!! Never mind. I will export some of my FireFox favourites and see what I can do with it:):):)
 but as usual - I knew what I meant.
  but as usual - I knew what I meant.  

LOL!! I never know what I mean.Perkin wrote:Yep that's the one, export from firefox (or IE) as html, import into Sitelist.Fangbeast wrote:D'oh!! Never mind. I will export some of my FireFox favourites and see what I can do with it:):):)
Should have explained clearly to start with,but as usual - I knew what I meant.
 At least until I later complain that the comment isn't stored as well
 At least until I later complain that the comment isn't stored as well  )
 )
Perkin, try the code below (grab 2 of your own button graphics) on a copy of your exported firefox bookmarks and tell me if it works for you as it should. It works here.Perkin wrote:I think as long as the Title and the URL are imported, that should do.
(At least until I later complain that the comment isn't stored as well
)
Code: Select all
Enumeration 1
  #Window_BookMarks
EndEnumeration
#WindowIndex = #PB_Compiler_EnumerationValue
Enumeration 1
  #Gadget_BookMarks_fmain
  #Gadget_BookMarks_BookMarks
  #Gadget_BookMarks_fcontrol
  #Gadget_BookMarks_OpenFile
  #Gadget_BookMarks_ExitProgram
EndEnumeration
#GadgetIndex = #PB_Compiler_EnumerationValue
Enumeration 1
  #Image_BookMarks_OpenFile
  #Image_BookMarks_ExitProgram
EndEnumeration
#ImageIndex = #PB_Compiler_EnumerationValue
CatchImage(#Image_BookMarks_OpenFile,     ?_OPT_BookMarks_OpenFile)
CatchImage(#Image_BookMarks_ExitProgram,  ?_OPT_BookMarks_ExitProgram)
DataSection
  _OPT_BookMarks_OpenFile     : IncludeBinary "Images\open32x32.ico"
  _OPT_BookMarks_ExitProgram  : IncludeBinary "Images\exit32x32.ico"
EndDataSection
Procedure.l Window_BookMarks()
  If OpenWindow(#Window_BookMarks,65,76,750,600,"",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
      Frame3DGadget(#Gadget_BookMarks_fmain,5,0,740,530,"")
      ListIconGadget(#Gadget_BookMarks_BookMarks,15,15,720,505,"Bookmark",200,#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
        AddGadgetColumn(#Gadget_BookMarks_BookMarks,1,"Description",200)
        AddGadgetColumn(#Gadget_BookMarks_BookMarks,2,"Category",150)
        AddGadgetColumn(#Gadget_BookMarks_BookMarks,3,"Owner",150)
        SetGadgetFont(#Gadget_BookMarks_BookMarks,LoadFont(#Gadget_BookMarks_BookMarks,"Arial",11,0))
      Frame3DGadget(#Gadget_BookMarks_fcontrol,5,530,740,65,"")
      ButtonImageGadget(#Gadget_BookMarks_OpenFile,15,545,40,40,ImageID(#Image_BookMarks_OpenFile))
      ButtonImageGadget(#Gadget_BookMarks_ExitProgram,695,545,40,40,ImageID(#Image_BookMarks_ExitProgram))
      HideWindow(#Window_BookMarks,0)
      ProcedureReturn WindowID(#Window_BookMarks)
  EndIf
EndProcedure
Declare OpenBookMarks()
Structure ProgramData
  QuitValue.i                                                                           ; Program quit flag
  CurrentDir.s                                                                          ; The current program startup directory
EndStructure
Global Program.ProgramData                                                             ; Structure to hold program data
Program\CurrentDir    = GetCurrentDirectory()                                           ; Get the current directory name
Procedure OpenBookMarks()
  BookMarkFile.s = OpenFileRequester("Select FireFix Bookmarks file", Program\CurrentDir, "HTM (*.htm)|*.htm;*.html", 1)
  If BookMarkFile.s
    ExpressionId.i = CreateRegularExpression(#PB_Any, "\<[^\<]+\>")
    OwnerName.s = RepQuote(StringField(GetHomeDirectory(), 3, "\"))
    InFileId.i = ReadFile(#PB_Any, BookMarkFile.s)
    If InFileId.i
      While Eof(InFileId) = 0
        TempString.s = ReadString(InFileId.i)
        If FindString(TempString.s, "<DT>", 1) And FindString(TempString.s, "A HREF", 1)
          TempURL.s   = StringField(TempString.s, 2, Chr(34))
          TempTitle.s = LTrim(RTrim(ReplaceRegularExpression(ExpressionId.i, TempString.s, "")))
          AddGadgetItem(#Gadget_BookMarks_BookMarks, -1, TempURL.s + Chr(10) + TempTitle.s + Chr(10) + "FireFox BookMark" + Chr(10) + OwnerName.s)
        EndIf
      Wend
    EndIf
  EndIf
EndProcedure
If Window_BookMarks()
  Program\QuitValue = 0
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_CloseWindow
        Select EventWindow()
          Case #Window_BookMarks              : Program\QuitValue = 1
        EndSelect
      Case #PB_Event_Gadget
        Select EventGadget()
          Case #Gadget_BookMarks_OpenFile     : OpenBookMarks()
          Case #Gadget_BookMarks_ExitProgram  : Program\QuitValue = 1
        EndSelect
    EndSelect
  Until Program\QuitValue
  CloseWindow(#Window_BookMarks)
EndIf
End