1. program to load Eu docs into tabbed browser
- Posted by Dan Moyer <danielmoyer at prodigy.net> Feb 17, 2007
- 543 views
I have found it convenient to load the Euphoria doc & the Win32Lib doc & the IDE doc into a multi-tabbed browser, so I can refer to each easily as I need to (often, still). So I thought to make a program to do that, by modifying a program I found in Win32Lib demo, as below. But while it sometimes works to put each doc into a separate tab in the browser, it doesn't ALWAYS do so. Sometimes only one or two of the three are in the browser, other times more than one browser are opened with some in one & some in the other. Any suggestions as to how to do this RIGHT?
-- modification to "program to show website", -- so as to now open (default) browser with tabs, -- with all documentation showing -- in those tabs in the browser without warning include win32lib.ew constant w = create(Window, "test", 0, 0, 0, 0, 0, {WS_POPUP}) procedure a(integer self, integer e, sequence p) sequence site site = {} site &= {"C:\\Programming\\EUPHORIA\\HTML\\REFMAN.HTM"} site &= {"C:\\Programming\\EUPHORIA\\Libraries\\Win32Lib_60_5\\Docs\\index.htm"} site &= {"C:\\Programming\\EUPHORIA\\Ide\\IDE0-20-1\\Docs\\IDE.htm"} for i = 1 to length(site) do shellExecute("open", site[i], SW_SHOWNORMAL) end for closeWindow(w) end procedure setHandler(w, w32HActivate, routine_id("a")) WinMain(w, SW_HIDE)
Dan
2. Re: program to load Eu docs into tabbed browser
- Posted by don cole <doncole at pacbell.net> Feb 17, 2007
- 503 views
Hello Dan, I check your code and all I got it to do is blink. Now I see that all .htms are in a different place than yours. So first off I would put some kind of exists checker in there like so.
without warning include win32lib.ew include mygets.e constant w = create(Window, "test",0, 0, 0, 0, 0, {WS_POPUP}) global function wCheckFile(sequence file_path) integer fn VOID = setSearchPaths(file_path) fn = w32FileOpen(file_path, "r") -- looks in the search paths if fn=-1 then VOID = message_box( file_path, "Can't Find File", MB_ICONHAND+ MB_TASKMODAL ) return 0 end if return 1 end function procedure a(integer self, integer e, sequence p) sequence site site = {} site &= {"F\\EUPHORIA\\HTML\\REFMAN.HTM"} site &= {"F:\\Programming\\EUPHORIA\\Libraries\\Win32Lib_60_5\\Docs\\index.htm"} site &= {"F:\\Programming\\EUPHORIA\\Ide\\IDE0-20-1\\Docs\\IDE.htm"} for i = 1 to length(site) do VOID=wCheckFile(site[i]) shellExecute("open", site[i], SW_SHOWNORMAL) end for closeWindow(w) end procedure setHandler(w, w32HActivate, routine_id("a")) WinMain(w,SW_HIDE)
When I get all my fileNames and paths right I'll get back to you. Don Cole
3. Re: program to load Eu docs into tabbed browser
- Posted by don cole <doncole at pacbell.net> Feb 17, 2007
- 492 views
Hello again Dan, Tested! This seems to work fine for me using the IE back and forward buttons to tab. You'll have to change the site locations for it to work for you.
without warning include win32lib.ew
constant w = create(Window, "test",0, 0, 0, 0, 0, {WS_POPUP})
global function wCheckFile(sequence file_path) integer fn fn = w32FileOpen(file_path, "r") looks in the search paths if fn=-1 then VOID = message_box( file_path, "Can't Find File", MB_ICONHAND+ MB_TASKMODAL ) return 0 end if return 1 end function
constant site = {"f:
euphoria
html
refman.htm", "F:
eu
win32lib
Docs
index.htm", "F:
EUPHORIA
IDE0-20-1
Docs
IDE.htm"}
procedure a(integer self, integer e, sequence p) for i = 1 to length(site) do VOID=wCheckFile(site[i]) shellExecute("open", site[i], SW_SHOWNORMAL) end for closeWindow(w) end procedure setHandler(w, w32HActivate, routine_id("a"))
WinMain(w,SW_HIDE)
Don Cole }}}
4. Re: program to load Eu docs into tabbed browser
- Posted by Dan Moyer <danielmoyer at prodigy.net> Feb 17, 2007
- 484 views
don cole wrote: > > Hello again Dan, > > Tested! > This seems to work fine for me using the IE back and forward buttons to tab. > You'll have to change the site locations for it to work for you. > }}} <eucode> > without warning > include win32lib.ew > > constant w = create(Window, "test",0, 0, 0, 0, 0, {WS_POPUP}) > > global function wCheckFile(sequence file_path) > integer fn > fn = w32FileOpen(file_path, "r") -- looks in the search paths > if fn=-1 then > VOID = message_box( file_path, > "Can't Find File", > MB_ICONHAND+ MB_TASKMODAL ) > return 0 > end if > return 1 > end function > > constant site = {"f:\\euphoria\\html\\refman.htm", > "F:\\eu\\win32lib\\Docs\\index.htm", > "F:\\EUPHORIA\\IDE0-20-1\\Docs\\IDE.htm"} > > procedure a(integer self, integer e, sequence p) > for i = 1 to length(site) do > VOID=wCheckFile(site[i]) > shellExecute("open", site[i], SW_SHOWNORMAL) > end for > closeWindow(w) > end procedure > setHandler(w, w32HActivate, routine_id("a")) > > WinMain(w,SW_HIDE) > > Don Cole Don, Thanks for trying, but I get the same results with yours: sometimes works, sometimes doesn't load all three. I think the fundamental method is somehow flawed, as in maybe the code goes too fast for the browser to load all 3. btw, I'm talking about a TABBED browser, which has a series of tabs below toolbar(s) with the names of the site on the tabs, so they're all actually LOADED, not going back & forth to load & re-load them. Dan
5. Re: program to load Eu docs into tabbed browser
- Posted by don cole <doncole at pacbell.net> Feb 17, 2007
- 493 views
- Last edited Feb 18, 2007
Dan Moyer wrote: > > > Thanks for trying, but I get the same results with yours: sometimes works, > sometimes doesn't load all three. I think the fundamental method is somehow > flawed, as in maybe the code goes too fast for the browser to load all 3. > > btw, I'm talking about a TABBED browser, which has a series of tabs below > toolbar(s) with the names of the site on the tabs, so they're all actually > LOADED, not going back & forth to load & re-load them. > > Dan I don't know what you mean by a tabbed browser I'm using IE Internet Explorer. Each time I run it, it load all three pages ONCE ending up with ihe IDE page minimized. Clicking the back button takes me back to the second page and so on. Again I'm not having a problems with it. It dosen't seem to be re-loading. Just the first time. If you are using IE how did you get it to tab? Don Cole
6. Re: program to load Eu docs into tabbed browser
- Posted by Dan Moyer <danielmoyer at prodigy.net> Feb 18, 2007
- 483 views
don cole wrote: > > Dan Moyer wrote: > > > > > Thanks for trying, but I get the same results with yours: sometimes works, > > sometimes doesn't load all three. I think the fundamental method is somehow > > flawed, as in maybe the code goes too fast for the browser to load all 3. > > > > btw, I'm talking about a TABBED browser, which has a series of tabs below > > toolbar(s) with the names of the site on the tabs, so they're all actually > > LOADED, not going back & forth to load & re-load them. > > > > Dan > > I don't know what you mean by a tabbed browser I'm using IE Internet > Explorer. > Each time I run it, it load all three pages ONCE ending up with ihe IDE page > minimized. Clicking the back button takes me back to the second page and so > on. Again I'm not having a problems with it. > It dosen't seem to be re-loading. Just the first time. If you are using IE how > did you get it to tab? > > Don Cole Don, I'm not really sure if the browser that ends up sometimes working is exactly IE or not, it "came" with AT&T/Yahoo DSL installation, LOOKS different than IE, but in "Help/About" although it is "named" Yahoo Browser or something like that, ie includes IE version number too. And it got set as default browser, which is why it works when it does with the program under consideration. In any event, when the program WORKS, what happens is that there are 3 headings, on what look like file tabs in a file folder, at the top of the browser window just under various toolbars; those tabs have the name of the url that's displayed in the window showing on the tab, and if you click on any of the tabs, that page displays in the window. Note that the BACK BUTTON is NOT necessary to use to view any of the 3 pages, just click on any of the NAMED tabs. I think there are a number of "new" browsers that work with "tabs" like this now. Maybe someone can explain it better than I have. But thanks for experimenting with it, I suspect that the method I "hacked" to get the docs loaded into the browser was non-optimal in the first place, as in the program doesn't "wait" until one is loaded before trying to load the next, so if something system-wise delays one of them from loading, the next one just loads instead, maybe. Dan
7. Re: program to load Eu docs into tabbed browser
- Posted by don cole <doncole at pacbell.net> Feb 18, 2007
- 506 views
Dan , I know about this Yahoo Browser. I got the same thing when I install AT&T’s DSL. It installed the Yahoo browser and replaced IE as my default. You can change that but I don’t want to go into that right now. It changed my whole computer around. Trying to get me to sign up for Yahoo Groups, Change my default E-mail program, set me up with Instant Messaging and the like. The first thing I did after installing DSL was go to control panel/add remove programs and deleted everything that had the word *Yahoo* in it. I’m sure in Euphoria there’s a way to switch back and forth between Browsers on the fly. Dan Moyer wrote: > Note that the BACK BUTTON is > NOT necessary to use to view any of the 3 pages, just click on any of > the NAMED tabs. > Maybe someone can explain it better than I have. Perhaps you could explain to me, "What difference does it make whether you are using the BACK BUTTON or the NAMED tabs (button) to scroll back and forth between WebPages. Don Cole
8. Re: program to load Eu docs into tabbed browser
- Posted by Dan Moyer <danielmoyer at prodigy.net> Feb 18, 2007
- 513 views
don cole wrote: > > Dan , > > I know about this Yahoo Browser. I got the same thing when I install > AT&T’s > DSL. It installed the Yahoo browser and replaced IE as my default. You can > change > that but I don’t want to go into that right now. > It changed my whole computer around. Trying to get me to sign up for Yahoo > Groups, Change my default E-mail program, set me up with Instant Messaging and > the like. > > The first thing I did after installing DSL was go to control panel/add remove > programs and deleted everything that had the word *Yahoo* in it. > > I’m sure in Euphoria there’s a way to switch back and forth between Browsers > on the fly. > Don, Heh heh heh! I also use IE, although I didn't bother to re-set it as default, I just click on a shortcut to use it, so I didn't run into the problems you describe. But with the Yahoo still set as my default, it comes up when I run the program we've been discussing, & THAT is what shows the three docs in TABS. To switch, probably have to locate where the actual browser file is located, then preface the file to view with the browser to view it with. Note that I'm not "wedded" to the yahoo browser, it's just the TABBED feature that I like so much & was trying to employ with the docs. I'm sure there are other browsers that have that feature too. btw, before I got this post, I emailed you a screen shot of the browser, which shows the tabs when the program worked. Dan
9. Re: program to load Eu docs into tabbed browser
- Posted by don cole <doncole at pacbell.net> Feb 19, 2007
- 512 views
Check your e-mail. Don Cole