Sign in to follow this  
Followers 0
DarkHo

Web Address Problem

8 posts in this topic

#1 ·  Posted (edited)

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



Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

#4 ·  Posted (edited)

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

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

#6 ·  Posted (edited)

Works really good now, Thanks JRowe :mellow::(:lol:

Code is:

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

Share this post


Link to post
Share on other sites

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  
Followers 0