ResourceWriter¶
Members¶
Constructors¶
Methods¶
ResourceWriter¶
Constructor
Arguments
| Arguments | Default | Description |
|---|---|---|
file |
|
|
clean |
|
open¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
file |
|
File name (exe or dll). |
clean |
false |
Whether to clear all existing resources. In general, only files that are not currently open can be modified. The running krkr.exe itself and plugins already linked with Plugins.link cannot be modified. |
Description
Opens the target file
close¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
write |
true |
true to write the changes. With write=false, all writeFrom* and clear operations are discarded and nothing is written. Even with write=true, nothing is written if writeFrom* / clear was never called. |
Description
Closes the target file and writes the changes
setLang¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
primaryLang |
|
|
subLang |
|
Description
Sets the language to write
The arguments are the same as ResourceReader.setLang.
clear¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
type |
|
Resource type (a string, a number, or an rt* constant). |
name |
|
Resource name (a string or a number). Note: the change is not written until close(true) is called. |
Description
Deletes the target resource
writeFromText¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
type |
|
Resource type (a string, a number, or an rt* constant). |
name |
|
Resource name (a string or a number). |
text |
|
(writeFromText only) Text to write. |
utf8 |
false |
(writeFromText only) true to write UTF-8 encoded text (false writes Unicode). |
Description
Writes a resource
writeFromFile¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
type |
|
|
name |
|
|
file |
|
writeFromOctet¶
Method
Arguments
| Arguments | Default | Description |
|---|---|---|
type |
|
|
name |
|
|
oct |
|