Launching Internet Explorer with a pre-determined file 
Author Message
 Launching Internet Explorer with a pre-determined file


Quote:


>> i'm trying to use TP to produce a html file with basic information added

>>from a related file and then when the file is produced I want to use TP to

>> launch Internet Explorer with the created file on display.

>> does anyone know how this can be done or indeed has anyone done it before
>> that can help me with source code?

>> any help will be greatly appreciated.

> (untested)
> Search for iexplore.exe, and pass the html file to it?

if you can use TP for Windooze then maybe WINEXEC will help...
otherwise install Arachne, a Browser for DOS, and execute him with EXEC.

Markus



Mon, 18 Aug 2003 02:45:51 GMT  
 Launching Internet Explorer with a pre-determined file


Quote:



> >> i'm trying to use TP to produce a html file with basic
information added

> >>from a related file and then when the file is produced I want to
use TP to

> >> launch Internet Explorer with the created file on display.

> >> does anyone know how this can be done or indeed has anyone done
it before
> >> that can help me with source code?

> >> any help will be greatly appreciated.

> > (untested)
> > Search for iexplore.exe, and pass the html file to it?

> if you can use TP for Windooze then maybe WINEXEC will help...
> otherwise install Arachne, a Browser for DOS, and execute him with

EXEC.

or execute your Windows COMMAND.COM (getenv('COMSPEC')) with a command
line like ' /C START x.HTML'

FP



Mon, 18 Aug 2003 18:54:33 GMT  
 Launching Internet Explorer with a pre-determined file


Quote:






> > >> i'm trying to use TP to produce a html file with basic
> information added

> > >>from a related file and then when the file is produced I want to
> use TP to

> > >> launch Internet Explorer with the created file on display.

> > >> does anyone know how this can be done or indeed has anyone done
> it before
> > >> that can help me with source code?

> > >> any help will be greatly appreciated.

> > > (untested)
> > > Search for iexplore.exe, and pass the html file to it?

> > if you can use TP for Windooze then maybe WINEXEC will help...
> > otherwise install Arachne, a Browser for DOS, and execute him with
> EXEC.

> or execute your Windows COMMAND.COM (getenv('COMSPEC')) with a command
> line like ' /C START x.HTML'

> FP

Thanks a lot for the help (i am yvette.thomas or rather she is my mum and i
use her internet account) i'm having trouble implementing this, how do you
add the /c start x.htm to the command.  i'm fairly novice so i'm a bit
confused!

thanks for your help

shapshankly

- Show quoted text -



Tue, 19 Aug 2003 08:30:16 GMT  
 Launching Internet Explorer with a pre-determined file


Quote:



> > or execute your Windows COMMAND.COM (getenv('COMSPEC')) with a
command
> > line like ' /C START x.HTML'

> Thanks a lot for the help (i am yvette.thomas or rather she is my
mum and i
> use her internet account) i'm having trouble implementing this, how
do you
> add the /c start x.htm to the command.  i'm fairly novice so i'm a
bit
> confused!

Like this, for example:

{$M $4000,0,0 }
uses Dos;
begin
  SwapVectors;
  Exec(GetEnv('COMSPEC'), ' /C START X.HTML');
  SwapVectors;
  if DosError <> 0 then
    WriteLn('DosError = ', DosError)
  else
    WriteLn('Exit code = ',DosExitCode);
end.

START is a Win95 command which works out which program Win95 would use
to start a document, and then fires up that program. So obviously
Win95 (or one of its younger relations) has to be running.

GetEnv('COMSPEC') is used instead of 'C:\WINDOWS\COMMAND.COM' in case
COMMAND.COM is not installed in the usual place - COMSPEC will point
to the correct program.

Note that your program will continue as soon as the HTML page is being
displayed. There is a /W switch on START which is supposed to wait
until the started program is shut down:

  Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

but this does not seem to work with HTML pages for some reason.

FP



Tue, 19 Aug 2003 20:52:32 GMT  
 Launching Internet Explorer with a pre-determined file


Quote:





> > > or execute your Windows COMMAND.COM (getenv('COMSPEC')) with a
> command
> > > line like ' /C START x.HTML'

> > Thanks a lot for the help (i am yvette.thomas or rather she is my
> mum and i
> > use her internet account) i'm having trouble implementing this, how
> do you
> > add the /c start x.htm to the command.  i'm fairly novice so i'm a
> bit
> > confused!

> Like this, for example:

> {$M $4000,0,0 }
> uses Dos;
> begin
>   SwapVectors;
>   Exec(GetEnv('COMSPEC'), ' /C START X.HTML');
>   SwapVectors;
>   if DosError <> 0 then
>     WriteLn('DosError = ', DosError)
>   else
>     WriteLn('Exit code = ',DosExitCode);
> end.

> START is a Win95 command which works out which program Win95 would use
> to start a document, and then fires up that program. So obviously
> Win95 (or one of its younger relations) has to be running.

> GetEnv('COMSPEC') is used instead of 'C:\WINDOWS\COMMAND.COM' in case
> COMMAND.COM is not installed in the usual place - COMSPEC will point
> to the correct program.

> Note that your program will continue as soon as the HTML page is being
> displayed. There is a /W switch on START which is supposed to wait
> until the started program is shut down:

>   Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

> but this does not seem to work with HTML pages for some reason.

thanks a lot for all of your help, this will come in really useful.

would you like to have your name credited in my project?  i feel that you
should be put in for your contribution.

once again thank you.

shapshankly

- Show quoted text -

Quote:
> FP



Wed, 20 Aug 2003 00:28:44 GMT  
 Launching Internet Explorer with a pre-determined file

Quote:

>There is a /W switch on START which is supposed to wait
>until the started program is shut down:

>  Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

>but this does not seem to work with HTML pages for some reason.

Well, you know, IE is an integral part of the OS... *cough*

--
The Scarlet Manuka



Sat, 23 Aug 2003 08:07:23 GMT  
 Launching Internet Explorer with a pre-determined file



Quote:

> >There is a /W switch on START which is supposed to wait
> >until the started program is shut down:

> >  Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

> >but this does not seem to work with HTML pages for some reason.

> Well, you know, IE is an integral part of the OS... *cough*

Well, i have to say that it is sort of a blessing that it is that way for
this project, as it means i can pretty much guarentee that any pc on which
my program is run will have internet explorer on it, and so this part of the
program will work.

apart from that all i can say is,

i have internet explorer, netscape communicator and mozilla.  i prefer
mozilla to netscape (don't like what the netscape people do the mozilla
builds) but i still prefer IE.  i have no problems with and have had no
problems with it.  i don't, however, do things that require great security
(probably for the best!) and i got in the habit of using it because it
doesn't react as badly as some other browsers to sloppy code.

at the end of the day, not sure i'd recommend IE, but i don't mind it.

Quote:

> --
> The Scarlet Manuka



Sat, 23 Aug 2003 08:25:49 GMT  
 Launching Internet Explorer with a pre-determined file


Quote:




> > >There is a /W switch on START which is supposed to wait
> > >until the started program is shut down:

> > >  Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

> > >but this does not seem to work with HTML pages for some reason.

> > Well, you know, IE is an integral part of the OS... *cough*

> Well, i have to say that it is sort of a blessing that it is that
way for
> this project, as it means i can pretty much guarentee that any pc on
which
> my program is run will have internet explorer on it, and so this
part of the
> program will work.

Actually, strictly speaking, you don't need IE for that. You're asking
Windows to start up a HTML file. If Windows has been told to use
another browser to do that - if it's had its IE pulled out and
replaced with Opera or whatever - it should still work.

I suppose Manuka's point is that Start /w would have to return
immediately because if it waited until an integral part of the OS
terminated it would have to wait forever. But I think it may be that
/W only works when starting up a program directly, rather than when
starting a document.

FP



Sun, 24 Aug 2003 18:12:23 GMT  
 Launching Internet Explorer with a pre-determined file

Quote:






> > > >There is a /W switch on START which is supposed to wait
> > > >until the started program is shut down:

> > > >  Exec(GetEnv('COMSPEC'), ' /C START /W X.HTML');

> > > >but this does not seem to work with HTML pages for some reason.

> > > Well, you know, IE is an integral part of the OS... *cough*

> > Well, i have to say that it is sort of a blessing that it is that
> way for
> > this project, as it means i can pretty much guarentee that any pc on
> which
> > my program is run will have internet explorer on it, and so this
> part of the
> > program will work.

> Actually, strictly speaking, you don't need IE for that. You're asking
> Windows to start up a HTML file. If Windows has been told to use
> another browser to do that - if it's had its IE pulled out and
> replaced with Opera or whatever - it should still work.

> I suppose Manuka's point is that Start /w would have to return
> immediately because if it waited until an integral part of the OS
> terminated it would have to wait forever. But I think it may be that
> /W only works when starting up a program directly, rather than when
> starting a document.

Exactly. Try
start /w iexplore test.htm

--
#!/usr/bin/perl
eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X
$0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"});
####################### http://learn.to/quote #######################



Mon, 25 Aug 2003 01:24:16 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. DOS Internet Explorer

2. reading a table out of internet explorer 5

3. Opening/Launching Doc/File from ListView

4. Text file pre-processor

5. Pre-loading EXE file.

6. Database Explorer reports incorrect indexes on Acces 7.0 .MDB file

7. Determining date/time file was last modified/accessed

8. Help: Opening files into a running program from Explorer

9. Determining the number of records in a typed file

10. how to determine info on unknown file

11. D4 , D5 and internet technologies that allow to create internet databases

12. Auto Dialing and File transfer in NON INTERNET

 

 
Powered by phpBB® Forum Software