bambus Posted January 7, 2006 Share Posted January 7, 2006 Hi.. i testet but i dont know how to open a .txt here is my script: Case $msg = $ok6button $msg = Msgbox(1,"Tool made by HoOnda","Read script") if $msg = 2 then ; else $file = Run("items\et_class.txt") endif Run("items/et_class.txt") .. is wrong.. what i have to write? Link to comment Share on other sites More sharing options...
w0uter Posted January 7, 2006 Share Posted January 7, 2006 what i have to write?you dont need to write you need to read by that i mean the helpfile My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
bambus Posted January 7, 2006 Author Share Posted January 7, 2006 i did.. but never find something Link to comment Share on other sites More sharing options...
bambus Posted January 7, 2006 Author Share Posted January 7, 2006 FileOpen ( "test.txt", 0 ) dont work.. Link to comment Share on other sites More sharing options...
seandisanti Posted January 7, 2006 Share Posted January 7, 2006 FileOpen ( "test.txt", 0 )dont work..it DOES work. does the file you're trying to open exist? Is it already open? Link to comment Share on other sites More sharing options...
Stumpii Posted January 7, 2006 Share Posted January 7, 2006 If you want to open the program associated with .txt files and have it open the .txt of your choice, then you need to use ShellExecute. Here is a link to some code: http://www.autoitscript.com/forum/index.ph...topic=13355&hl=Search the rest of the forum, there are many examples.It would be easier to help if you explained exactly what you are trying to do. It may seem obvious to you what you are trying to do, but it is not for us! “Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity. Link to comment Share on other sites More sharing options...
cdkid Posted January 7, 2006 Share Posted January 7, 2006 (edited) $filex = "C:\program files\blah.txt" start($filex) func start($filex) If Not FileExists($filex) Then Return 0 Return Run(@ComSpec & " /c " & "start " & FileGetShortName($filex),"",@SW_RESTORE) endfunc --hope this helps Edited January 7, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 7, 2006 Moderators Share Posted January 7, 2006 Nice example there cdkid... but if you don't want to see the cmd I'd use @SW_HIDE rather than @SW_RESTORE. 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. Link to comment Share on other sites More sharing options...
cdkid Posted January 7, 2006 Share Posted January 7, 2006 Touche! good point AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! 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