Jump to content

How Do You Open A Url?


 Share

Recommended Posts

The answer may be obvious, but I seem to be missing something...

I have a GUI created using the AutoIT3-GUI extensions, and I would like to include an "Help" button that opens a web page (either a local or a Web URL) in Internet Explorer (or the default web browser.) I can't seem to figure out the best way to do this.

The kicker is that I would like the GUI to remain open or available even with the Help window open.

Anyone have a good suggestion to do this?

Alternately, does anyone have a good suggestion to simply be able to open some sort of scrollable window that would contain the contents of a text file? (Maybe I could simply have it open Notepad.exe?

Thanks!

Visit Jim's Tips for lots of cool tips on Gmail, SageTV, PDA's, and whatever else interests me!

Link to comment
Share on other sites

try this:

#include "GUI_include.au3"
Opt("GuiNotifyMode",1)

guicreate("My GUI")
    $help = guisetcontrol("button","&Help",125,100,100,20)
    $exit = guisetcontrol("button","E&xit",125,150,100,20)
    
While guimsg() >0
    If guiread()= $help Then
  run("C:\Program Files\Internet Explorer\IEXPLORE.EXE help.htm")
    Endif
    If guiread()= $Exit Then Exit
Wend

Create an htm or html file that will redirect to the url you want to go to.

To view the text file it would be the same:

#include "GUI_include.au3"
Opt("GuiNotifyMode",1)

guicreate("My GUI")
    $View = guisetcontrol("button","&View",125,100,100,20)
    $exit = guisetcontrol("button","E&xit",125,150,100,20)
    
While guimsg() >0
    If guiread()= $View Then
  run("C:\Windows\notepad.exe file.txt")
    Endif
    If guiread()= $Exit Then Exit
Wend

I hope this helps :D

Triton
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...