Sign in to follow this  
Followers 0
Nanascalala

Running an HTML file with Autoit

7 posts in this topic

I cant figure out how to run a html file with AutoIt. It won't work with the Run function. I cant figure it out!!! HELP PLEASE! I just want to run main.html which is in the same directory as the script. SOmebody please help!!

Thanks for any and all help!!

-nanascalala

Share this post


Link to post
Share on other sites



Having the failing piece of code is always usefull.

I guess you're using Run('main.html')?

Try Run(@ComSpec & ' /c start main.html') instead. Run can only run programs and an html file is no program.

Share this post


Link to post
Share on other sites

check this out

I don't think you need to do comspec to do start, do you?


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

With NT4 start is an internal command belonging to the command interpreter. So If you use NT4, Win2k, XP, Win2k3 you need to use @ComSpec. If it should work on your PC you're running Win9x or somewhere on your system you have a command that's doing the same thing as the internal one... but that's no standard windows.

Share this post


Link to post
Share on other sites

With NT4 start is an internal command belonging to the command interpreter. So If you use NT4, Win2k, XP, Win2k3 you need to use @ComSpec. If it should work on your PC you're running Win9x or somewhere on your system you have a command that's doing the same thing as the internal one... but that's no standard windows.

ahhh... good to know. and thanks for fixing the wiki!

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

This one works. I use it.

RunWait("C:\Program Files\Internet Explorer\Iexplore.exe C:\FilePath\main.html", "",)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

This one works.  I use it.

RunWait("C:\Program Files\Internet Explorer\Iexplore.exe C:\FilePath\main.html", "",)

that'll work as long as IE is installed there, you know, instead of into "C:\that damned browser\\iexplore.exe" or, you know, somewhere else... you can pull that info from the registry, which would be much more reliable... 'course it all depends on the scope of your script's intended audience.

edit: btw, my linked referance includes this method.

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

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