Jump to content

Recommended Posts

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
Posted
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
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
Posted

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

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

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
×
×
  • Create New...