stickck
12-30-2005, 10:41 AM
alright, where am i going wrong? i have a listbox that is populated with the lua files in the script folder. when i double-click i want that lua file to load. its not working. any ideas?
atbFiles = File.Find(_SourceFolder.."\\AutoPlay\\Scripts", "*.lua", false, false, nil,nil);
if atbFiles then
for i,v in atbFiles do
ListBox.AddItem("ListBox1", String.SplitPath(v).Filename, v);
end
end and this is the double-click ( i also but this same code on the button, on-click)atbSelected = ListBox.GetSelected("ListBox1");
if atbSelected then
astrScript = ListBox.GetItemData("ListBox1", atbSelected);
Application.LoadScript(astrScript);
end
another question... how can i make changes to one of the questions and have it save the changes back to the LUA file?
thanks for any suggestions on the second question. i've been looking for an answer for that one but just cant figure out a salution.
chris
atbFiles = File.Find(_SourceFolder.."\\AutoPlay\\Scripts", "*.lua", false, false, nil,nil);
if atbFiles then
for i,v in atbFiles do
ListBox.AddItem("ListBox1", String.SplitPath(v).Filename, v);
end
end and this is the double-click ( i also but this same code on the button, on-click)atbSelected = ListBox.GetSelected("ListBox1");
if atbSelected then
astrScript = ListBox.GetItemData("ListBox1", atbSelected);
Application.LoadScript(astrScript);
end
another question... how can i make changes to one of the questions and have it save the changes back to the LUA file?
thanks for any suggestions on the second question. i've been looking for an answer for that one but just cant figure out a salution.
chris