Jump to content

Is it possible to open a webpage or word file through autoit?


monirul
 Share

Recommended Posts

Hi,

I'm developing a program by autoit which needs to open different types of file(.xls, .htm, .vb, .cs etc..). I've seen the 'RUN' function in Autoit which can only open/execute .exe, .pif, .com..... this types of file. Can anybody help me, will be grateful to Him/er.

Link to comment
Share on other sites

From the help file:

6. Why can I only use Run() to execute .exe files? What about .msi / .txt and others?

Only a few file extensions are usually "runable" - these are .exe, .bat, .com, .pif. Other file types like .txt and .msi are actually executed with another program. When you double click on a "myfile.msi" file what actually happens in the background is that "msiexec.exe myfile.msi" is executed. So to run a .msi file from AutoIt you would do:

RunWait("msiexec myfile.msi")

Or, an even simpler way is to run the command "start" which will automatically work out how to execute the file for you:

RunWait(@COMSPEC & " /c Start myfile.msi")

Link to comment
Share on other sites

HI,

Run(@ComSpec & ' /c start www.google.de', '', @SW_HIDE)
Run(@ComSpec & ' /c start c:\Downloads\03AntragaufZertifizierungF01.doc', '', @SW_HIDE)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

You may also want to look at _RunDOS


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...