jackdaniels
12-25-2008, 03:15 AM
i dont know what i am doing wrong, i need help !!! trying to add url to listbox and ini file
Url = IExplorer.GetLocationURL("Plugin1");
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
if NewName ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
if NewName == "" then
Dialog.Message("Error", "You must designate a name for your favorite, it cannot be blank.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
end
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
if NewUrl ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
NewSite.Data = NewUrl
if NewUrl == "" then
Dialog.Message("Error", "URL must be defined and cannot be blank to add favorite.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
end
end
if NewSite.Text ~= "" and NewSite.Data ~= "" then
INIFile.SetValue("AutoPlay\\Docs\\Timed.ini", NewSite.Text, "Url", NewSite.Data);
FavCount = ListBox.GetCount("WEBLIST");
--FavInd = 0
if FInc == nil then
FInc = FavCount + 1
else
FInc = FInc + 1
end
ListBox.AddItem("WEBLIST", FInc, NewSite);
end
end
Url = IExplorer.GetLocationURL("Plugin1");
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
if NewName ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
if NewName == "" then
Dialog.Message("Error", "You must designate a name for your favorite, it cannot be blank.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewName = Dialog.Input("Add Favorite - Enter a name", "Please enter the name for the website to add:", "", MB_ICONQUESTION);
end
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
if NewUrl ~= "CANCEL" then
NewSite = {}
NewSite.Text = NewName
NewSite.Data = NewUrl
if NewUrl == "" then
Dialog.Message("Error", "URL must be defined and cannot be blank to add favorite.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
NewUrl = Dialog.Input("Add Favorite - Specify the address", "Please enter the url address for: "..NewName, Url, MB_ICONQUESTION);
end
end
if NewSite.Text ~= "" and NewSite.Data ~= "" then
INIFile.SetValue("AutoPlay\\Docs\\Timed.ini", NewSite.Text, "Url", NewSite.Data);
FavCount = ListBox.GetCount("WEBLIST");
--FavInd = 0
if FInc == nil then
FInc = FavCount + 1
else
FInc = FInc + 1
end
ListBox.AddItem("WEBLIST", FInc, NewSite);
end
end