xmen Posted April 24, 2005 Posted April 24, 2005 I am newbie in Autoit, so a lot to learn from, i got a problem here, after searching the forum inside and manual file, no answer for me, so i got to ask in here. FileOpen ("c:\abc.txt", 0) ; doesn't open it in notepad or wordpad for reading instead, i got to use ultra edit / notepad to open it run('C:\Program Files\UltraEdit\uedit32.exe "c:\abc.txt"') Hope someone to explain me, millions thanks
GaryFrost Posted April 24, 2005 Posted April 24, 2005 The fileopen used in conjunction with FileRead or FileReadLine gives you direct access to the data in the file. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
ezzetabi Posted April 26, 2005 Posted April 26, 2005 if you use FileOpen remember FileClose too... Btw, you may find useful for starting files with associated program: Func _ShellExecuteDllCall($sCmd, $sVerb, $sArg, $sFolder) ;return will be a int greater than 0 if something goes wrong. Local $aRet $aRet = DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", $sVerb, _ "string", $sCmd, "string", $sArg, "string", $sFolder, "long", @SW_SHOWNORMAL) Return $aRet[0] - 32 EndFunc ;==>_ShellExecuteDllCall
steveR Posted April 29, 2005 Posted April 29, 2005 If you just wanted to open the file for reading, this will work also: run("cmd /c start c:\MyFile.txt", "", @SW_HIDE) Will open it with the default .txt editor (works with xp) AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass.
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