AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multi-Window Browser

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
David



Joined: 08 Aug 2004
Posts: 25
Location: Lubbock, Texas

PostPosted: Tue Mar 21, 2006 3:03 am    Post subject: Multi-Window Browser Reply with quote

A short program that creates and runs an HTM file displaying your favorite sites, with each site in a separate full-window iframe. Your sites are found in mwb.dat, one line per site, with each line containing a title, a comma (with no following space), and the URL. Lots of room for improvement but it does the job for me.

Code:
; Multi-Window Browser (mwb.ahk)
;
; This program creates an HTML file containing one window for each URL
; in the mwb.dat file, which must exist in the same directory as mwb.ahk.
; Example mwb.dat file (start in column one, omit semicolons):
;   Fox News,http://www.foxnews.com/
;   Drudge,http://www.drudgereport.com/
;   Late Night Jokes,http://www.newsmax.com/liners.shtml
;   Sudoku,http://www.websudoku.com/

fileName = %A_WorkingDir%\mwb
htmFile  = %fileName%.htm
datFile  = %fileName%.dat

IfNotExist, %datFile%
{
  MsgBox, URL file not found:`n`n%datFile%`n`nExiting ...
  Exit
}

IfExist, %htmFile%
  FileRecycle, %htmFile%

FileAppend, <html>`n, %htmFile%
FileAppend, <head>`n, %htmFile%
FileAppend, <title>MultiWindow Browser</title>`n, %htmFile%
FileAppend, <style type="text/css">`n, %htmFile%
FileAppend, /*<![CDATA[*/`n, %htmFile%
FileAppend, body { margin: 0px 0px 0px 0px }`n, %htmFile%
; Next line is long
FileAppend, h1 { background-color: #000000; color: #ffffff; text-align: center; margin-top: 0px; margin-bottom: 0px; padding-top: 16px; padding-bottom: 16px; }`n, %htmFile%
FileAppend, /*]]>*/`n, %htmFile%
FileAppend, </style>`n, %htmFile%
FileAppend, </head>`n, %htmFile%
FileAppend, <body>`n, %htmFile%

Loop, Read, %datFile%, %htmFile%
{
  Loop, Parse, A_LoopReadLine, CSV
  {
    IfEqual, A_Index, 1
    {
      FileAppend, <h1>
      FileAppend, %A_LoopField%
      FileAppend </h1>`n
    }
    Else
    {
      FileAppend, <iframe src="
      FileAppend, %A_LoopField%
      FileAppend, " width="100`%" height="100`%" frameborder="0"></iframe>`n
    }
  }
}

FileAppend, </body>`n</html>`n, %htmFile%

Run, %htmFile%, %A_WorkingDir%
Exit
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Mar 22, 2006 11:00 am    Post subject: Multi-Window Browsel Reply with quote

This multi-window browser is an excellent idea!
Thanks for sharing it. Please do not hesitate to post new ideas or improvements.
Back to top
David



Joined: 08 Aug 2004
Posts: 25
Location: Lubbock, Texas

PostPosted: Wed Mar 22, 2006 2:32 pm    Post subject: Example Reply with quote

Forgot to post an example: http://members.cox.net/david193/mwb.htm
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group