You are here

How do I properly use the [FileWriteN] function?

5 posts / 0 new
Last post
majix560
Offline
Last seen: 13 years 1 month ago
Joined: 2010-08-03 22:57
How do I properly use the [FileWriteN] function?

How do I properly use the [FileWriteN] function?
I can't seem to figure it out, not even after reading the manual's page on it.
PLEASE HELP ME!

dagardner
dagardner's picture
Offline
Last seen: 4 years 9 months ago
Developer
Joined: 2007-09-20 14:41
What are you trying to

What are you trying to accomplish?

majix560
Offline
Last seen: 13 years 1 month ago
Joined: 2010-08-03 22:57
This

[FileWrite1]
File=%PAL:DataDir%\settings\gm7pref.reg
Type=ConfigWrite
Entry="Directory"
Value="Directory"="%PAL:AppDir:DoubleBackslash%\\Game_Maker8\\"

And I need the quotation marks to be part of what is searched-for/written

dagardner
dagardner's picture
Offline
Last seen: 4 years 9 months ago
Developer
Joined: 2007-09-20 14:41
Is the value right?

I've had good luck writting to registry files like they are INI files (the format is the same), but you will need to add the Key to the FileWriteN you provided.

Do you really want the value to be:

"Directory"="%PAL:AppDir:DoubleBackslash%\\Game_Maker8\\"

Or are you trying to give "Directory" a value of "%PAL:AppDir:DoubleBackslash%\\Game_Maker8\\"

I'm guessing that you want the latter:

[FileWrite1]
File=%PAL:DataDir%\settings\gm7pref.reg
Type=INI
Key=[the key "Directory" is under]
Entry="Directory"
Value="%PAL:AppDir:DoubleBackslash%\\Game_Maker8\\"

If I'm misunderstanding, let me know, and I will try to help you get where you want to go.

Mark Sikkema
Offline
Last seen: 12 years 7 months ago
Developer
Joined: 2009-07-20 14:55
If you want to keep the quotes,...

I think you'll need to double them, e.g.:

Value='"%PAL:AppDir:DoubleBackslash%\\Game_Maker8\\"'

As an alternative it's also possible to use [RegistryValueWrite], then (I thought to remember) you do not need the quotes at all !

Formerly Gringoloco
Windows XP Pro sp3 x32

Log in or register to post comments