MasonMill Posted April 14, 2010 Share Posted April 14, 2010 Hi it seems very simple and just need pointed in the write direction in the help file to open a new text document, so i can Consolewrite i guess? I dont want to specify a file path if at all possible, thanks! Link to comment Share on other sites More sharing options...
DoubleMcLovin Posted April 14, 2010 Share Posted April 14, 2010 (edited) Easiest way is as follows $file = FileOpen("file.txt", 33) The 33 denotes a specific read/write mode. Look in the help file for which one is specific to you. (this will create the file if it doesn't exist btw) Edited April 14, 2010 by DoubleMcLovin Link to comment Share on other sites More sharing options...
MasonMill Posted April 14, 2010 Author Share Posted April 14, 2010 cool, thanks! Link to comment Share on other sites More sharing options...
MasonMill Posted April 14, 2010 Author Share Posted April 14, 2010 If i want it to open a new text file when i push F1, why doesnt this work? HotKeySet("{F1}", "NewTextFile") While 1 sleep(100) WEnd Func NewTextFile() $file = FileOpen("file.txt", 33) Local $var = "Test" If $file = -1 Then FileOpen("file.txt", 2) WinWaitActive("file.txt") sleep(500) ConsoleWrite("var=" & $var & @CRLF) EndIf EndFunc Link to comment Share on other sites More sharing options...
MvGulik Posted April 14, 2010 Share Posted April 14, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... 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