Jump to content
Sign in to follow this  
DarkHo

Web Address Problem

Recommended Posts

DarkHo

I'm trying to make a web browser that i only want to read index.html but the problem is that the browser needs the fool address to the file but i move the folder around i need to change the address agen. Can i make so it only read's index.html. The index file is in the same folder that the autoit script is.

#include <GUIConstants.au3>
#include <IE.au3>
$GUI = GUICreate("Web Browser", 671, 404)
$object = ObjCreate("Shell.Explorer.2")
$object_ctrl = GUICtrlCreateObj($object, 0, 0, 671, 404)
_IENavigate($object, "index.html")
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select


    Case $msg = $GUI_EVENT_CLOSE
        Exit
    EndSelect
WEnd

Thanks :mellow:

Edited by DarkHo

Share this post


Link to post
Share on other sites
JRowe

Share this post


Link to post
Share on other sites
DarkHo

Check out "macros" in the help file. The one you're looking for is "@ScriptDir". Hope that helps!

hmm not really. Any examples? There are non in Help file. :mellow:

@ScriptDir

Edited by DarkHo

Share this post


Link to post
Share on other sites
DarkHo

Check out "macros" in the help file. The one you're looking for is "@ScriptDir". Hope that helps!

hmm not really, any examples. There are non in Help file. :mellow:

I tryd this but i get error

_IENavigate(@ScriptDir & "\index.html")
Edited by DarkHo

Share this post


Link to post
Share on other sites
JRowe

In the help file: Contents -> AutoIt -> Macro Reference

If you tried, but got an error, then try something different. Just a thought. :mellow:

Share this post


Link to post
Share on other sites
JRowe
DarkHo

Excellent, glad it works for you. :mellow:

Yeah thanks to you :(


Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.