× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



hello,

The FileProtocolHandler thing still works... but here's a slightly newer way to do it:

CHGVAR VAR(&CMD) VALUE('rundll32.exe +
shell32,ShellExec_RunDLL ' *BCAT +
'http://www.' *CAT &SITE *TCAT '.com')

Either way is 1000 times better than the hard-coded path that DLee posted. Hard-coding the location of a file is a bad idea. What if MS decides to store IE in a different location? What if different PCs have it in different locations? Not to mention that the user might want to use a different browser. Or that the hard-coded path name is longer and therefore gives you less space for the URI...


On 4/2/2010 3:25 PM, Nick_Radich@xxxxxxxxxxxxxx wrote:
Hi Pat,

This is what I have been using for a few years now here. I have a command
wrapped around this that prompts for the web site. It could also be used
without the command and you just pass in a parm for the website.


PGM PARM(&SITE)

DCL VAR(&CMD) TYPE(*CHAR) LEN(120)
DCL VAR(&SITE) TYPE(*CHAR) LEN(30)

CHGVAR VAR(&CMD) VALUE('rundll32.exe +
url.dll,FileProtocolHandler ' *BCAT +
'http://www.' *CAT&SITE *TCAT '.com')

STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)

STRPCCMD PCCMD(&CMD) PAUSE(*NO)

ENDPGM



Thanx,

Nick



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx



"Pat Landrum"<PLandrum@xxxxxxxxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/02/2010 03:12 PM
Please respond to
RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i"<rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Press enter to activate a link (DLee@xxxxxxxx)






Hello,

If you want the user to use their default web browser, use the following
as the initial value of&IE:

rundll32 url,FileProtocolHandler

To this you would append the web link. For instance, if I wanted our
user to hit our main web site, the entire command would be:

rundll32 url,FileProtocolHandler http://hcps.us

On the STRPCCMD you might want to include the option PAUSE(*NO).

Regards,
Pat Landrum
Senior Programmer/Analyst
Hanover County Public Schools
200 Berkley Street
Ashland, Va 23005
Phone: 804-365-4658 Email: plandrum@xxxxxxx


Notice: This message or any accompanying documents may contain
confidential or privileged information of Hanover County Public Schools.
If you are not the intended recipient, disclosure, copying or
distribution is strictly prohibited by state and federal law. If you
received this message in error, please notify the sender as soon as
possible.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DLee@xxxxxxxx
Sent: Friday, April 02, 2010 2:43 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Press enter to activate a link (DLee@xxxxxxxx)

Booth

Thanks for your replay, but the below suggestion didn't work for me.

Below is what I ended up doing: I modified the original program that
generates the web link, and passed it to this program, which actually
brought up the web page as expected.

This works in case anyone would find it usefull. With some tinkering, a
person could probably make this a nice service program.

PGM&WEBLNK
DCL VAR(&WEBLNK) TYPE(*CHAR) LEN(70)
DCL VAR(&SEL) TYPE(*CHAR) LEN(200)
Dcl&Quote *Char ( 1 ) Value( '"' )
DCL VAR(&SEL) TYPE(*CHAR) LEN(200)

// declare the path to internet explores
DCL VAR(&IE) TYPE(*CHAR) LEN(51) +
VALUE('"C:\Program Files\Internet +
Explorer\IEXPLORE.EXE" "') // Add quotes to
the end of the target web link
CHGVAR VAR(%SST(&WEBLNK 65 1)) VALUE(&QUOTE)
// concat the path to internet explorer to the target web page
CHGVAR VAR(&SEL) VALUE(&IE ||&WEBLNK)

STRPCO
MONMSG MSGID(CPF0000 IWS4010)
STRPCCMD PCCMD(&SEL)
RCLRSC
RETURN
ENDPGM

<See if something like this might work for you:
< In your DSPF
< RTNCSRLOC(&REC&FLD)
< REC 10A H
< FLD 10A H

< In your RPG:
< select;
< when FLD = 'WSABA#'; // Enter pressed in this field< exsr
CreateWeb;< endsl;

Regards,



SWBC
9311 San Pedro Ave., Suite 600
San Antonio, TX 78216

Visit our website at www.swbc.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.