Sign in to follow this  
Followers 0
bambus

open .txt ?

9 posts in this topic

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?

Share this post


Link to post
Share on other sites



i did.. but never find something

Share this post


Link to post
Share on other sites

FileOpen ( "test.txt", 0 )

dont work..

Share this post


Link to post
Share on other sites

FileOpen ( "test.txt", 0 )

dont work..

it DOES work. does the file you're trying to open exist? Is it already open?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 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!

Share this post


Link to post
Share on other sites

Nice example there cdkid... but if you don't want to see the cmd I'd use @SW_HIDE rather than @SW_RESTORE.


[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

Touche!:P

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!

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