cwellman
August 27th, 2006, 01:18 PM
This may seem like a trivial question, but if there's a good answer it would save me some effort moving a lua script between computers.
My code ("*.lua" in luascript directory) executes a series of commands like:
img_VariableName = osd.CreateImage([[path\FileName.gif]])
The "img_VariableName" variables are then used in "ScaleDrawImage(img_VariableName....)" commands to make a pretty OSD.
It runs every time I startup the lua code (so far, so good), to create the img_VariableName user variables. However, it requires all the "gif" files to be in their proper place when it runs, and when the script is moved to another computer it requires all the gif files (along with the lua script file) to moved, and to preserve the proper path on the new computer.
Is there anyway to do the CreateImage conversion to a userdata variable, save this variable, and have it embedded somehow in the lua script file? I have to believe there is, but I can't visualize how to do this.
Any ideas?
Chris
My code ("*.lua" in luascript directory) executes a series of commands like:
img_VariableName = osd.CreateImage([[path\FileName.gif]])
The "img_VariableName" variables are then used in "ScaleDrawImage(img_VariableName....)" commands to make a pretty OSD.
It runs every time I startup the lua code (so far, so good), to create the img_VariableName user variables. However, it requires all the "gif" files to be in their proper place when it runs, and when the script is moved to another computer it requires all the gif files (along with the lua script file) to moved, and to preserve the proper path on the new computer.
Is there anyway to do the CreateImage conversion to a userdata variable, save this variable, and have it embedded somehow in the lua script file? I have to believe there is, but I can't visualize how to do this.
Any ideas?
Chris