Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

HTML Related (Is This Possible ?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTML Related (Is This Possible ?)

    Hello ... by double-clicking with a mouse on any
    html file, I "activate" it (bring it up for view)
    even when my Internet connection is off-line. This is
    because the file association ".html" is married to
    that particular browser(IE, in my case).

    Could I do the same thing in PB, using ASM code ?
    In other words, what would be the ASM code that would
    automatically "launch" an html file, just as if I had
    double-clicked it with a mouse ? Say I wanted to launch/
    activate "abc.html" ... what ASM code would I use within
    PB DOS to do this ?

    Another related thought ... Could I somehow stuff such
    a command (to launch the "abc.html") into the keyboard
    buffer ? If so, what would be the proper ASM code needed
    to achieve this ?

    Also, would not the ASM codes work If I had a Netscape
    Browser (or any browser), as long as my computer properly
    associates the file extension ".html" with my browser ?

    Thank you for your help.

    With best regards, Ken Wilson


  • #2
    There are two ways to do this programmatically, and neither require ASM code.

    1. Use the file association to do the work for you:
    Code:
    SHELL "START C:\DOWNLOAD\HTMLFILE.HTM"
    2. If you know the filename and location of your browser, launch that directly, and provide the HTML file as a command line parameter:
    Code:
    SHELL "C:\Progra~1\Intern~1\iexplore.exe HTMLFILE.HTM"
    Of course, if you have no browser installed, .HTM and .HTML files will likely not be associated with any application. If you have PB/CC, you can use the FindExecutable() API to find the name of the associated application, and you can SHELL to such a PB/CC app directly from your DOS code too.

    All of these methods require that at least Windows 95 or better is running.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment

    Working...
    X