DarkHo Posted February 28, 2010 Share Posted February 28, 2010 (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 Edited February 28, 2010 by DarkHo Link to comment Share on other sites More sharing options...
JRowe Posted February 28, 2010 Share Posted February 28, 2010 Check out "macros" in the help file. The one you're looking for is "@ScriptDir". Hope that helps! [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
DarkHo Posted February 28, 2010 Author Share Posted February 28, 2010 (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. @ScriptDir Edited February 28, 2010 by DarkHo Link to comment Share on other sites More sharing options...
DarkHo Posted February 28, 2010 Author Share Posted February 28, 2010 (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. I tryd this but i get error _IENavigate(@ScriptDir & "\index.html") Edited February 28, 2010 by DarkHo Link to comment Share on other sites More sharing options...
JRowe Posted February 28, 2010 Share Posted February 28, 2010 In the help file: Contents -> AutoIt -> Macro Reference If you tried, but got an error, then try something different. Just a thought. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
DarkHo Posted February 28, 2010 Author Share Posted February 28, 2010 (edited) Works really good now, Thanks JRowe Code is:_IENavigate($object, @ScriptDir & "\index.html") Edited February 28, 2010 by DarkHo Link to comment Share on other sites More sharing options...
JRowe Posted February 28, 2010 Share Posted February 28, 2010 Excellent, glad it works for you. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
DarkHo Posted March 1, 2010 Author Share Posted March 1, 2010 Excellent, glad it works for you. Yeah thanks to you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now