Sign in to follow this  
Followers 0
brodie28

Opening a file externaly

3 posts in this topic

Is it possible to open a file, and have it open with whatever its default program is?

Like if I specify a .txt file, it will open in notepad, or if I specify a JPEG it will open in my image viewer?

Share this post


Link to post
Share on other sites



Is it possible to open a file, and have it open with whatever its default program is?

Like if I specify a .txt file, it will open in notepad, or if I specify a JPEG it will open in my image viewer?

ShellExecute()

Or

Run + @ComSpec


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ShellExecute will do just that; open with whatever program is associated to the file extension.

EDIT: doh got beat... not sure how I got beat by 5 minutes I must be slow today....

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

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