Sign in to follow this  
Followers 0
Vicks

Autoit doesn't seem to have this

11 posts in this topic

autoit doesn't seem to want to open every type of file, considering Run() only executes EXE, BAT, COM, or PIF. so is there any function/command that opens any kind of file such as .exe .jpg .jpeg . bmp .gif .wav .bat .com .dos EVERYTHING thanks


[s]Autoit[/s]

Share this post


Link to post
Share on other sites



autoit doesn't seem to want to open every type of file, considering Run() only executes EXE, BAT, COM, or PIF. so is there any function/command that opens any kind of file such as .exe .jpg .jpeg . bmp .gif .wav .bat .com .dos EVERYTHING thanks

I think the program that is defaulted on your pc will open those types of files - AutoIt would then have to be a graphics, audio viewer as those files do not really do anything - like a txt file.

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

autoit doesn't seem to want to open every type of file, considering Run() only executes EXE, BAT, COM, or PIF. so is there any function/command that opens any kind of file such as .exe .jpg .jpeg . bmp .gif .wav .bat .com .dos EVERYTHING thanks

Well, most other applications actually run another program that reads the extension,

Try this sorta thing

Run(@ComSpec & " /c " & '*commandName*', "", @SW_HIDE)

Share this post


Link to post
Share on other sites

autoit doesn't seem to want to open every type of file, considering Run() only executes EXE, BAT, COM, or PIF. so is there any function/command that opens any kind of file such as .exe .jpg .jpeg . bmp .gif .wav .bat .com .dos EVERYTHING thanks

Most filetypes are ASSOCIATED with a program. As has already been said before me, the actual files themselves dont run, of course. Data files are just that, data. You need a program to interpret them in the right manner to get the context. In Windows, the extensions for non executable files are associated with whichever software last claims to it.

for a list of filetypes and their association open up Windows Explorer, go to Tools --> Folder Options --> File Types. You will see that each filetype is associate individually to a program, often filetypes of similar categories will be associated with one application (jpg, jpeg, gif).

Last example, the .au3 extension is associated with Scite right after you install the scite editor.

{= )


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

so there is nothing that can open up any file type, that sucks i think someone should make a udf, i would but im busy


[s]Autoit[/s]

Share this post


Link to post
Share on other sites

so there is nothing that can open up any file type, that sucks i think someone should make a udf, i would but im busy

Ummm...

*Points at Post #3*

:P

Share this post


Link to post
Share on other sites

Ummm...

*Points at Post #3*

:P

i don't get what i do with that code


[s]Autoit[/s]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Open anything like you would do in CMD, like

Run(@ComSpec & " /c " & 'calc.exe', "", @SW_HIDE)

would open the M$ Calculator

EDIT: TYPO

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

i think what you are looking for is

$file = "YOUR_FILE_NAME_HERE"

Run(@ComSpec & " /c Start " & $file, "", @SW_HIDE)

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

i think what you are looking for is

$file = "YOUR_FILE_NAME_HERE"

Run(@ComSpec & " /c Start " & $file, "", @SW_HIDE)

8)

and val for the save, yet again.

{= )

Actually vicks, if you REALLY want to learn AUTOIT the way it should learnt, check out the links at the bottom of Val's Signatures. There's nothing better than a CBT built by users for users.

Val, much respect to you for your efforts.

Ps: Sometimes i wish I could kidnap autoit folks from the forum and replace my coworkers with them. Imagine, a whole team of Autoit Coders!

Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

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