Sign in to follow this  
Followers 0
DamnYouAll

opening htm of html files

5 posts in this topic

is there any command to open a .html or .htm file with auto it version 3. and if there is can i have that window minimized or hidden when it opens it??

Share this post


Link to post
Share on other sites



You should read the FAQ, particularly question 6. It answers the first part of your question.

$filename = "Mydocument.html" 
run( @ComSpec & " /c start " & $filename,".")
; ---- note the  ^  ^ space characters!

This will open an HTML document using the start command. The advantage to this method is it will automatically use whatever the default web browser is on the computer. Disadvantage is the minimize flag won't work, but you can always use WinSetState() to minimize the window as soon as it appears.

Alternatively, you can specify the browser and add the @SW_MINIMIZE flag, like this:

$filename = "Mydocument.html" 
run("C:\Program Files\Mozilla Firefox\firefox.exe " & $filename,".",@SW_MINIMIZE)

This will open the specified html file in a new minimized FireFox window. Disadvantage is you have to know which browser the person will be using.

Share this post


Link to post
Share on other sites

yeah but i dont want any to pop up and with that the command screen pops up for a sec

Share this post


Link to post
Share on other sites

So read more of the documentation, particularly the third parameter of the Run() function.

Share this post


Link to post
Share on other sites

Also you should change name.

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