Nanascalala Posted July 28, 2004 Share Posted July 28, 2004 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 Link to comment Share on other sites More sharing options...
sugi Posted July 28, 2004 Share Posted July 28, 2004 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. Link to comment Share on other sites More sharing options...
emmanuel Posted July 28, 2004 Share Posted July 28, 2004 check this outI don't think you need to do comspec to do start, do you? "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
sugi Posted July 28, 2004 Share Posted July 28, 2004 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. Link to comment Share on other sites More sharing options...
emmanuel Posted July 28, 2004 Share Posted July 28, 2004 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) Link to comment Share on other sites More sharing options...
RocTx Posted July 29, 2004 Share Posted July 29, 2004 This one works. I use it. RunWait("C:\Program Files\Internet Explorer\Iexplore.exe C:\FilePath\main.html", "",) Link to comment Share on other sites More sharing options...
emmanuel Posted July 29, 2004 Share Posted July 29, 2004 (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 July 29, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) 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