Page 1 of 1

Embed .xml-definitions?

Posted: Wed Oct 08, 2014 8:30 pm
by xz79
Is ist possible to embed the xml-file with the GUI definitions into a compiled hollywood project?
Or do you always have to deliver it to the end user as a separate file?

Re: Embed .xml-definitions?

Posted: Wed Oct 08, 2014 10:44 pm
by airsoftsoftwair
Sure, just link the file using the @FILE preprocessor command or use the [[ ]] operator to embed the XML from your script.

Re: Embed .xml-definitions?

Posted: Wed Nov 11, 2015 1:21 am
by zylesea
airsoftsoftwair wrote:Sure, just link the file using the @FILE preprocessor command or use the [[ ]] operator to embed the XML from your script.
Sometimes I feel stupid, but how to access the included file?

Code: Select all

(...)
@FILE 1, "muidef.xml"     
(...)
mui.createGUI(FileToString(1)) 
(...)
I mean the blunt "1" as handler is not working (Kann Datei 1 nicht öffnen).

Re: Embed .xml-definitions?

Posted: Wed Nov 11, 2015 6:19 pm
by airsoftsoftwair
FileToString() requires a filename, not a handle. Try:

Code: Select all

mui.CreateGUI(ReadString(1, FileLength(1)))