1. I need someone to test this on Windows

Altho I have Windows I can't use it for the internet.

(I use Linux for internet stuff. The last time I tried to fix the Windows
internet problem I wrecked everything. I don't dare try that again.)

So I need someone to test the internet functions in ndsearcher on Windows.

If you choose to test this, go to:
http://ocii.com/~jstory/programs-nutrition.html
Then download ndsearcher.zip
It's about 600K. It is based on wxEuphoria.

The internet searches work on Linux. They need to also work on Windows.
The problem, if there is any, will most likely be one little line in
nd_internet.e
constant
LNX_INTERNET_PROGS = {"galeon","mozilla"}, -- This works.
WIN_INTERNET_PROGS = {"start"} -- I don't have a clue whether this works.


If I learn how to fix this problem in this program, then I will know how to fix
it in some other programs that also have internet searches.

new topic     » topic index » view message » categorize

2. Re: I need someone to test this on Windows

I've downloaded the program.  What do I do with it?

new topic     » goto parent     » topic index » view message » categorize

3. Re: I need someone to test this on Windows

I think I understand what to do with it now.

I click on a subject and then click on one of the search buttons.

Using WinXP Pro.  A command window opens  with the title
www.google.com/search?hl=n&q= .....etc,etc.

Just the file path appears in the window.

new topic     » goto parent     » topic index » view message » categorize

4. Re: I need someone to test this on Windows

Hi Jerry,

I can confirm Evan's findings.  I believe you would want to use ShellExecute to
achieve the desired effect in Windows.

E.g. Lauch MS website in default browser:

r = ShellExecute(NULL, "open", "http://www.microsoft.com", NULL, NULL,
SW_SHOWNORMAL)

-- Brian

Jerry Story wrote:
> 
> Altho I have Windows I can't use it for the internet.
> 
> (I use Linux for internet stuff. The last time I tried to fix the Windows
> internet
> problem I wrecked everything. I don't dare try that again.)
> 
> So I need someone to test the internet functions in ndsearcher on Windows.
> 
> If you choose to test this, go to:
> <a
> href="http://ocii.com/~jstory/programs-nutrition.html">http://ocii.com/~jstory/programs-nutrition.html</a>
> Then download ndsearcher.zip
> It's about 600K. It is based on wxEuphoria.
> 
> The internet searches work on Linux. They need to also work on Windows.
> The problem, if there is any, will most likely be one little line in
> nd_internet.e
> }}}
<eucode>
> constant
> LNX_INTERNET_PROGS = {"galeon","mozilla"}, -- This works.
> WIN_INTERNET_PROGS = {"start"} -- I don't have a clue whether this works.
> </eucode>
{{{

> 
> If I learn how to fix this problem in this program, then I will know how to
> fix it in some other programs that also have internet searches.

new topic     » goto parent     » topic index » view message » categorize

5. Re: I need someone to test this on Windows

Brian Broker wrote:
> 
> Hi Jerry,
> 
> I can confirm Evan's findings.
> I believe you would want to use ShellExecute
> to achieve the desired effect in Windows.
> 
> E.g. Lauch MS website in default browser:
> 
> r = ShellExecute(NULL, "open", "<a
> href="http://www.microsoft.com">http://www.microsoft.com</a>",
> NULL, NULL, SW_SHOWNORMAL)
> 
> -- Brian
I don't see ShellExecute() in the EU2.5 documentation.
Do you mean system_exec()?

new topic     » goto parent     » topic index » view message » categorize

6. Re: I need someone to test this on Windows

Jerry Story wrote:
> 
> Brian Broker wrote:
> > 
> > Hi Jerry,
> > 
> > I can confirm Evan's findings.
> > I believe you would want to use ShellExecute
> > to achieve the desired effect in Windows.
> > 
> > E.g. Lauch MS website in default browser:
> > 
> > r = ShellExecute(NULL, "open", "http://www.microsoft.com"
> > NULL, NULL, SW_SHOWNORMAL)
> > 
> > -- Brian
> I don't see ShellExecute() in the EU2.5 documentation.
> Do you mean system_exec()?

No, I mean you'd have to wrap the windows API "ShellExecute" function.  I don't
know if wx has a similar function or not but Win32Lib has a wrapper for it.  Let
me know if you'd like assistance with a standalone wrapper.

-- Brian

new topic     » goto parent     » topic index » view message » categorize

7. Re: I need someone to test this on Windows

Brian Broker wrote:
> 
> Jerry Story wrote:
> > 
> > Brian Broker wrote:
> > > 
> > > Hi Jerry,
> > > 
> > > I can confirm Evan's findings.
> > > I believe you would want to use ShellExecute
> > > to achieve the desired effect in Windows.
> > > 
> > > E.g. Lauch MS website in default browser:
> > > 
> > > r = ShellExecute(NULL, "open", "<a
> > > href="http://www.microsoft.com">http://www.microsoft.com</a>"
> > > NULL, NULL, SW_SHOWNORMAL)
> > > 
> > > -- Brian
> > I don't see ShellExecute() in the EU2.5 documentation.
> > Do you mean system_exec()?
> 
> No, I mean you'd have to wrap the windows API "ShellExecute" function.  I
> don't
> know if wx has a similar function or not but Win32Lib has a wrapper for it.
>  Let me know if you'd like assistance with a standalone wrapper.
> 
> -- Brian

Or you could try something like this (instead of "start"):

RunDll32.exe url.dll,FileProtocolHandler "http://www.rapideuphoria.com"

-- Brian

new topic     » goto parent     » topic index » view message » categorize

8. Re: I need someone to test this on Windows

Brian Broker wrote:
> 
> > Do you mean system_exec()?
> No, I mean you'd have to wrap the windows API "ShellExecute" function.  I
> don't
> know if wx has a similar function or not but Win32Lib has a wrapper for it.
>  Let me know if you'd like assistance with a standalone wrapper.

Win32Lib has a shellExecute() proc/func... Works great! :)

-=ck
"Programming in a state of Euphoria."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

9. Re: I need someone to test this on Windows

On Sat, 01 Apr 2006 21:16:00 -0800, cklester <guest at RapidEuphoria.com>
wrote:

>Brian Broker wrote:
>> 
>> No, I mean you'd have to wrap the windows API "ShellExecute" function.  I
>> don't
>> know if wx has a similar function or not but Win32Lib has a wrapper for it.
>>  Let me know if you'd like assistance with a standalone wrapper.
>
>Win32Lib has a shellExecute() proc/func... Works great! :)

I think the best thing would be to take (eg) system_wait from the
archives and modify it to also work on Linux.

Pete

new topic     » goto parent     » topic index » view message » categorize

10. Re: I need someone to test this on Windows

Brian Broker wrote:
> Or you could try something like this (instead of "start"):
> 
> RunDll32.exe url.dll,FileProtocolHandler
> "<a href="http://www.rapideuphoria.com">http://www.rapideuphoria.com</a>"

How would you put that in Euphoria's system() or system_exec() ?

Even if I get it right, I have no way to test it on Windows. So I guess I need
to rely on someone else to figure it out and to test it and to tell me how they
dunnit (the line of code).

ndsearcher.exw (Nutrients vs Diseases on user contributions) is supposed to
search any of 140+ nutrients (or poisons), or any of 3500+ disease names, or any
nutrient + any disease, on any of several search engines. This works on Linux.
Supposed to also work on Windows.

new topic     » goto parent     » topic index » view message » categorize

11. Re: I need someone to test this on Windows

Jerry Story wrote:
> 
> Brian Broker wrote:
> > Or you could try something like this (instead of "start"):
> > 
> > RunDll32.exe url.dll,FileProtocolHandler
> > "<a href="http://www.rapideuphoria.com">http://www.rapideuphoria.com</a>"
> 
> How would you put that in Euphoria's system() or system_exec() ?
> 
> Even if I get it right, I have no way to test it on Windows. So I guess I need
> to rely on someone else to figure it out and to test it and to tell me how
> they
> dunnit (the line of code).
> 
> ndsearcher.exw (Nutrients vs Diseases on user contributions) is supposed to
> search any of 140+ nutrients (or poisons), or any of 3500+ disease names, or
> any nutrient + any disease, on any of several search engines. This works on
> Linux. Supposed to also work on Windows.

I tried replacing
WIN_INTERNET_PROGS = {"start"}
with
WIN_INTERNET_PROGS = {"RunDll32.exe url.dll,FileProtocolHandler"}

but it only partially worked.  It opens a command window and sits there.  When I
close the command window, it opens up the web page...

There must be a better way.

-- Brian

new topic     » goto parent     » topic index » view message » categorize

12. Re: I need someone to test this on Windows

Jerry Story wrote:
> 
> The internet searches work on Linux. They need to also work on Windows.
> The problem, if there is any, will most likely be one little line in
> nd_internet.e
> }}}
<eucode>
> constant
> LNX_INTERNET_PROGS = {"galeon","mozilla"}, -- This works.
> WIN_INTERNET_PROGS = {"start"} -- I don't have a clue whether this works.
> </eucode>
{{{

> 
> If I learn how to fix this problem in this program, then I will know how to
> fix it in some other programs that also have internet searches.

The problem seems to be that the windows shell doesn't recognize that 
you're trying to open a web page when the URL is inside quotes.  A 
solution is to build your command string like this:

start http://"www.google.com/search?hl=en&q=abdominal+cramps&btnG=Google+Search"

It needs to be in quotes because of the ampersands.  The shell seems to 
interpret this correctly, and opens the desired page into my default browser
(Firefox).

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

13. Re: I need someone to test this on Windows

Brian Broker wrote:
> I tried replacing
> WIN_INTERNET_PROGS = {"start"}
> with
> WIN_INTERNET_PROGS = {"RunDll32.exe url.dll,FileProtocolHandler"}
> 
> but it only partially worked.
> It opens a command window and sits there.  When
> I close the command window, it opens up the web page...
> 
> There must be a better way.

Thanks for the effort. Does system_exec() work better than system() ?
The Euphoria documentations says that system() starts a new DOS shell
and system_exec() does not.

new topic     » goto parent     » topic index » view message » categorize

14. Re: I need someone to test this on Windows

Jerry Story wrote:
> 
> Brian Broker wrote:
> > I tried replacing
> > WIN_INTERNET_PROGS = {"start"}
> > with
> > WIN_INTERNET_PROGS = {"RunDll32.exe url.dll,FileProtocolHandler"}
> > 
> > but it only partially worked.
> > It opens a command window and sits there.  When
> > I close the command window, it opens up the web page...
> > 
> > There must be a better way.
> 
> Thanks for the effort. Does system_exec() work better than system() ?
> The Euphoria documentations says that system() starts a new DOS shell
> and system_exec() does not.


nul = system_exec(cmd,0) does not show a console window but it still takes a
good 30 seconds for it to bring up the browser window w/ search.  Matt's solution
worked the same.  When I reported earlier the need to close the stubborn console
window, it really meant that I was impatient and didn't wait for it to close (and
then open the browser /w search).

I'm not sure why that is... I've always avoided the 'system' commands thinking
they were more geared for a Dead Operating System.

I'm back to thinking the shellexecute wrapper might be best.  Unless you or
someone else already has a solution, I could try that idea tomorrow.

-Brian

new topic     » goto parent     » topic index » view message » categorize

15. Re: I need someone to test this on Windows

Brian Broker wrote:
> 
> Jerry Story wrote:
> > 
> > Brian Broker wrote:
> > > I tried replacing
> > > WIN_INTERNET_PROGS = {"start"}
> > > with
> > > WIN_INTERNET_PROGS = {"RunDll32.exe url.dll,FileProtocolHandler"}
> > > 
> > > but it only partially worked.
> > > It opens a command window and sits there.  When
> > > I close the command window, it opens up the web page...
> > > 
> > > There must be a better way.
> > 
> > Thanks for the effort. Does system_exec() work better than system() ?
> > The Euphoria documentations says that system() starts a new DOS shell
> > and system_exec() does not.
> 
> 
> nul = system_exec(cmd,0) does not show a console window but it still takes a
> good 30 seconds for it to bring up the browser window w/ search.  Matt's
> solution
> worked the same.  When I reported earlier the need to close the stubborn
> console
> window, it really meant that I was impatient and didn't wait for it to close
> (and then open the browser /w search).
> 
> I'm not sure why that is... I've always avoided the 'system' commands thinking
> they were more geared for a Dead Operating System.
> 
> I'm back to thinking the shellexecute wrapper might be best.  Unless you or
> someone else already has a solution, I could try that idea tomorrow.

Since Jerry's using wxEuphoria, he could use wx_shell() instead.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

16. Re: I need someone to test this on Windows

Now I think maybe I have it working on Windows.
ndsearcher.zip
http://ocii.com/~jstory/programs-nutrition.html
Can someone test it again?
Click on any nutrient and on any disease.
Then click on any of the large search buttons (Search Both, Search Only
Nutrient, Search Only Disease). Also try the Check for Update button.

On my computer on Windows, it looks like it would work if Internet Explorer was
set up to work. It gets the correct string.

new topic     » goto parent     » topic index » view message » categorize

17. Re: I need someone to test this on Windows

Looks like it is working.  Pretty neat.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu