Guest ExCeeded Posted July 31, 2005 Share Posted July 31, 2005 Place_File() Write_Something("Sup") ;;;;;;;;;;;;;;;;;; Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;-------------------------------------------------------------- Func Write_Something($Msg) Local $Exists = FileExists("C:\Any File.TxT") If $Exists = 1 Then FileMove ("Any File.TxT",@ScriptDir & "\Any File.TxT") Else FileOpen("Any File.TxT",1) FileWrite("Any File.TxT",$Msg) EndIf ReTurn EndFunc ;-------------------------------------------------------------- Func Place_File() FileMove (@scriptdir & "\Any File.TxT","C:\Any File.TxT") Return EndFunc ;-------------------------------------------------------------- I'm receiving an error. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 31, 2005 Share Posted July 31, 2005 (edited) No errors here, although you might want to be consistant to where the file is and tell what the error is and don't forget to close file. Place_File() Write_Something("Sup") ;;;;;;;;;;;;;;;;;; Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;-------------------------------------------------------------- Func Write_Something($Msg) Local $Exists = FileExists("C:\Any File.TxT") If $Exists = 1 Then FileMove ("C:\Any File.TxT",@ScriptDir & "\Any File.TxT") Else FileOpen("C:\Any File.TxT",1) FileWrite("C:\Any File.TxT",$Msg) FileClose("C:\Any File.Txt") EndIf ReTurn EndFunc ;-------------------------------------------------------------- Func Place_File() FileMove (@scriptdir & "\Any File.TxT","C:\Any File.TxT") Return EndFunc Edited July 31, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Guest ExCeeded Posted August 1, 2005 Share Posted August 1, 2005 I agree. =\ 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