Vicks Posted August 17, 2006 Share Posted August 17, 2006 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] Link to comment Share on other sites More sharing options...
nitekram Posted August 17, 2006 Share Posted August 17, 2006 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 thanksI 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. 2¢ 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." 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 Link to comment Share on other sites More sharing options...
Paulie Posted August 17, 2006 Share Posted August 17, 2006 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 thanksWell, most other applications actually run another program that reads the extension, Try this sorta thing Run(@ComSpec & " /c " & '*commandName*', "", @SW_HIDE) Link to comment Share on other sites More sharing options...
blademonkey Posted August 17, 2006 Share Posted August 17, 2006 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 thanksMost 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 Link to comment Share on other sites More sharing options...
Vicks Posted August 17, 2006 Author Share Posted August 17, 2006 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] Link to comment Share on other sites More sharing options...
Paulie Posted August 18, 2006 Share Posted August 18, 2006 so there is nothing that can open up any file type, that sucks i think someone should make a udf, i would but im busyUmmm...*Points at Post #3* Link to comment Share on other sites More sharing options...
Vicks Posted August 18, 2006 Author Share Posted August 18, 2006 Ummm...*Points at Post #3* i don't get what i do with that code [s]Autoit[/s] Link to comment Share on other sites More sharing options...
Vivvic Posted August 18, 2006 Share Posted August 18, 2006 (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 August 18, 2006 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] Link to comment Share on other sites More sharing options...
erifash Posted August 18, 2006 Share Posted August 18, 2006 Search for shellexecute. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2006 Share Posted August 18, 2006 (edited) i think what you are looking for is $file = "YOUR_FILE_NAME_HERE" Run(@ComSpec & " /c Start " & $file, "", @SW_HIDE) 8) Edited August 18, 2006 by Valuater Link to comment Share on other sites More sharing options...
blademonkey Posted August 18, 2006 Share Posted August 18, 2006 (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 August 18, 2006 by blademonkey ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung 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