HypercamJ Posted June 20, 2008 Posted June 20, 2008 I've checked everywhere in the help files but can't find out: What is the code used to create a specific file? For example, I want to create an .ini file if the common one doesn't exist in the code's directory. Prove, and I will believe...
Kickassjoe Posted June 20, 2008 Posted June 20, 2008 You can use a basic FileWrite(), or an IniWrite(), (with the right parameters of course), and if the file doesn't exist, and the directory being written to does, the file will automagically be created. What goes around comes around... Payback's a bitch.
AdmiralAlkex Posted June 20, 2008 Posted June 20, 2008 There is a _WinAPI_CreateFile() under WinAPI Management in the helpfile, but I would use FileWrite() to save space when compiled .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
LongBowNZ Posted June 20, 2008 Posted June 20, 2008 create an .ini file if the common one doesn't exist in the code's directory $ini = @ScriptDir & "\data.ini" If Not FileExists($ini) Then ; If the ini doesn't exist IniWrite($ini, "Section", "Key", "Value") ; Writes to the ini EndIf
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